You are on page 1of 55

Information Management for System z

An  Overview  of  the  Extended  LRSN  and  RBA  


Support  in  DB2  11  for  z/OS    

Timm  Zimmermann  
DB2  for  z/OS  Development  SWAT  Team  
!mm.zimmermann@de.ibm.com  

DB2  GSE  Workgroup  BeLux  2014  


Click  to  edit  Master  Gtle  style  
Information Management for System z

Agenda  
•  Back  in  Time  -­‐  The  basic  stuff    
•  RBA  &  LRSN  
•  DB2  logging  by  example  –  INSERT  
•  The  Challenges  with  6-­‐byte  format    
•  The  solu?on  -­‐  the  planned  new  EXTENDED  10-­‐byte  format  in  
DB2  11  
•  How  to  get  there  –  Conversion  and  Controls  

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Information Management for System z Click  to  edit  Master  Gtle  style  

Back  in  Time  

THE  BASIC  STUFF  

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Information Management for System z Click  to  edit  Master  Gtle  style  

The  Basic  Stuff  –  What  is  an  RBA  ?  


•  RBA  =  Rela?ve  Byte  Address    
•  The  posi?on  from  the  very  beginning  of  the  DB2  log  
•  Since  the  first  release  of  DB2  defined  as  a  6-­‐byte  value    
C   9   C   1   2   3   1   1   3   9   3   F  
 
•  Can  address  up  to  248  bytes    
•  Range  from  x’000000000000’  up  to  x’FFFFFFFFFFFF’  
•  256  TB  of  log  record  addressing  capability  
•  Each  record  in  the  DB2  log  is  iden?fied  by  a  con?nuously  
increasing    RBA  of  the  first  byte  of  its  header  

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Information Management for System z Click  to  edit  Master  Gtle  style  

The  Basic  Stuff  –  What  is  an  LRSN  ?  


•  LRSN  =  Log  Record  Sequence  Number  
•  Introduced  with  Data  Sharing  in  DB2  V4  
•  Used  to  serialize  log  records  from  all  DB2  members  of  a  data  sharing  
group  into  the  correct  sequence  during  restart  and  recovery  ac?ons  
 
•  It  is  the  high-­‐order  six  bytes  of  the  stored  clock  (STCK)  value    
•  The  LRSN  is  incremented  every  16  microseconds  
•  However,  it  is  only  alike  a  TIMESTAMP  
•  Can  have  an  offset  from  actual  STCK  value  
•  LRSN  overflows  on  2042/09/17  at  the  latest  (if  no  LRSN  delta  exists)  
C    9   C   1   2   3   1   1   3   9   3   F  
 
•  Kept  in  sync  across  all  data  sharing  group  members  using  the  SYSPLEX  
?mer    

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Information Management for System z Click  to  edit  Master  Gtle  style  

A  sample  INSERT  process    


Insert  one  Row   Buffer  
2
Pool   Table  Space  

1
5

at  open   at  close  
3

BSDS  
DB2  Recovery    
Log  Manager    

SYSLGRNX   LOG  BUFFERS   Archive  


4
LOGS  
Ac?ve  Log  

BEGIN_UR   OPEN   UNDO  /  REDO   UNDO  /  REDO   UNDO  /  REDO   COMMIT   END_UR   Checkpoint  
RECORD   PAGESETS   DATA     INDEX     INDEX     RECORDS   RECORD   RECORD  
DB2  RECOVERY  LOG  
RBA  1000   RBA  2000  

Begin  Unit  of  Recovery  (INSERT  DB)   End  Unit  of  Recovery    
(Commit  or  Rollback)  
June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Click  to  edit  Master  Gtle  style  
Information Management for System z

The  Challenge  

THE  6-­‐BYTE  FORMAT  AND  ITS  LIMITS  

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Information Management for System z Click  to  edit  Master  Gtle  style  

What  is  the  problem  with  6-­‐bytes  RBA/LRSN  values  ?    


•  Due  to  a  high  DB2  logging  volume  and  as  hardware  becomes  
faster,  the  total  range  (256  TB)  of  an  RBA  could  be  exhausted  
within  a  few  months  
•  Requires  to  execute  the  RBA  reset  procedure  more  onen  (outage  in  a  
non-­‐data  sharing  environment)  
•  LRSN  value  is  based  on  16  micro  seconds  granularity  
•  Can  cause  delays  on  faster  CPUs  with  high  update  rate  on  same  page  
•  Possible  CPU  consump?on  due  to  CPU  spin  to  get  a  unique  LRSN  value  
•  Leapfrog  LRSN  range  when  conver?ng  to  Data  Sharing    
•  Highest  log  RBA  of  all  members  used  +  X  (LRSN  delta)  
•  Ensures  that  LRSN  values  are  larger  than  any  RBA  encountered  before  
switching  to  data  sharing  
•  Can  cause  DB2  to  reach  the  end  of  LRSN  range  before  the  year  2042  
•  There  is  no  reset  procedure  for  LRSN!    
June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Information Management for System z Click  to  edit  Master  Gtle  style  

Reaching  the  RBA  limit  

>  ’F00000000000’X   >  ‘FFF800000000’X   >  ‘FFFF00000000’X  

RBA  Range   SOFT  LIMIT   HARD  LIMIT  

DSNJ032I  WARNING  issued   DSNJ032I  WARNING  issued   DSNJ032I  CRITICAL  issued  


Processing  con?nues   Updates  will  fail   Updates  will  fail  
User  Objects  are  in  R/O  mode   User  Objects  are  in  R/O  mode  
  DB2  will  terminate  with  RC00D10251    
 
Only  –START  DB2  ACCESS(MAINT)    
is  allowed,  otherwise  restart  light  is  forced  
   
Then  manually  reset  RBA  range!  
June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Information Management for System z Click  to  edit  Master  Gtle  style  

Reaching  the  LRSN  limit  

>  ‘FE35173EC1E1’X   >  ‘FFB20C5D6BE1’X   >  ‘FFEE65E38BE1’X  

LRSN  Range   SOFT  LIMIT   HARD  LIMIT  

DSNJ034I  WARNING  issued   DSNJ034I  WARNING  issued   DSNJ034I  CRITICAL  issued  


Processing  con?nues   Updates  will  fail   Updates  will  fail  
 User  Objects  are  in  R/O  mode   User  Objects  are  in  R/O  mode  
  DB2  will  terminate  with  RC00D10251    
 
 –START  DB2  will  fail!  

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Information Management for System z Click  to  edit  Master  Gtle  style  

When  the  hard  limit  is  reached  


•  BSDS  must  be  converted  before  start  of  DB2  aner  hard  limit    
•  Otherwise  –START  DB2  command  will  fail  
•  It  is  strongly  recommended  that  you  convert  SYSUTILX,  
SYSTSCPY,  and  SYSLGRNX  tables  to  extended  10-­‐byte  format  
before  the  hard  limit  is  reached.    
•  U?li?es  might  not  be  able  to  convert  these  objects  to  extended  10-­‐byte  
format  at  the  hard  limit!  
•  Expect  the  necessity  to  execute  formal  RBA  reset  procedure  before    

REMEMBER:  there  is  no  formal  procedure  to  reset  the  LRSN!

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Information Management for System z Click  to  edit  Master  Gtle  style  

Preparing  for  the  end  of  the  RBA  (not  the  end  of  the  world  J)    
•  Determine  the  remaining  log  RBA  range  using  DSNJU004  
[remaining  log  RBA  range]  =    X’FFFFFFFFFFFF’  -­‐  [HIGHEST  RBA  WRITTEN]  
 
   
 
[remaining  log  RBA  range]    =    X’FFF80000000’  -­‐  [HIGHEST  RBA  WRITTEN]  (32GB  log  space  len)  
•  Determine  the  average  number  of  bytes  logged  per  day  using  DSNJU004  u?lity  
(b)  =  #  of  daily  created  archive  logs  
 
        [average  number  of  RBAs  logged  per  day]  =  b  *  (ENDRBA  –  STARTRBA)  
•  Es?mate  remaining  ?me  
  [remaining  Gme  ]  =  [remaining  log  RBA  range]    /  [average  number  of  bytes  logged  per  day]  
 
 

•   Follow  well  documented  RBA  reset  procedures!  


•  hvps://ibm.biz/BdDZK6  -­‐  data  sharing  environment  
•  hvps://ibm.biz/BdDZac  -­‐  non-­‐data  sharing  environment  
 
June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Information Management for System z Click  to  edit  Master  Gtle  style  

Another  challenge  with  6-­‐byte  format:  LRSN  spinning  


•  DB2  9  NFM  introduced  a  func?on  called  LRSN  spin  avoidance  
•  Duplicate  LRSN  values  are  allowed  for  consecu?ves  log  updates  on  
different    pages  

•  DB2  10  extended  that  relief  to  support    


duplicate  LRSN  values  for  updates  on  
the  same  data  page  
•  But  limited  to  INSERT  log  types  
•  UPDATE  and  DELETE  log  type  s?ll  require    
a  unique  LRSN  value  
D B2

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Click  to  edit  Master  Gtle  style  
Information Management for System z

The  solu?on  

THE  NEW  10-­‐BYTE  FORMAT  

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Information Management for System z Click  to  edit  Master  Gtle  style  

The  new  10-­‐byte  RBA  format  in  DB2  11  


•  6-­‐byte  to  10-­‐byte  RBA  extension:  
•  Add  4  bytes  at  the  beginning  for  larger  addressing  range  
•  Total  addressability:  280  Bytes  =  1  Yovabyte  

0   0   0   0   9   A   6   5   7   4   0   A   248  Bytes  
 
 
0   0   0   0   0   0   0   0   0   0   0   0   9   A   6   5   7   4   0   A   280  Bytes  

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Click  to  edit  Master  Gtle  style  
Information Management for System z

1  Yo]abyte  illustrated  

Distance  Earth-­‐Moon:  384,000  km  (~  240,000  mi)  


 
 
 
 
 
13.5x
 
 
 
1  Yovabyte  requires  a    
stack  of  2  TB  2.5“  HDDs  
(each  9.5mm)  13.5x  as  high  
as  the  distance  Earth-­‐Moon  

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Information Management for System z Click  to  edit  Master  Gtle  style  

The  new  10-­‐byte  LRSN  format  in  DB2  11    


•  The  6-­‐byte  LRSN  (BASIC)  format  

C   C   6   2   A   6   9   D   5   E   3   5  

•  Will  be  extended  on  the  high-­‐order  and  low-­‐order  bit  side    
to  the  new  10-­‐byte  (EXTENDED)  format  
•  high-­‐order  10  bytes  of  the  stored  clock  (STCK)  value    

1  addi?onal  byte  will  extend   3  bytes  at  the  end  will  increase  
the  LRSN  range  to  cover  36,534   the  granularity  to  1  picosecond  
years  

0   0   C   C   6   2   A   6   9   D   5   E   3   5   3   3   1   0   0   0  

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Click  to  edit  Master  Gtle  style  
Information Management for System z

DB2  objects  affected  by  the  new  format  


Shared  CommunicaGon  Area  (SCA)  
The SCA structure is used to track and
communicate data pertinent to a data Database  Objects  
sharing group. This data always includes The     RBA   (non-­‐data   sharing)   and   LRSN   (data  
some LRSN and RBA values and there may sharing)    
be a large number of such values of   the   last   change   in   each   page   of   every   table  
depending on the exception states, and  index  
if any, of database objects.  

Recovery  Log  
The   log   records   themselves   are  
DB2  Catalog  columns     assigned  RBA  values  so  that  they  can  
The DB2 catalog and be  located.    
directory contain RBA and In   a   data   sharing   environment   each  
LRSN information log   record   has   an   associated   LRSN  
in several tables.   value   that   is   based   on   the   ?me   the  
Bootstrap  Data  Set  (BSDS)   log   record   was   created   (plus   any  
Contains the LRSN and RBA values LRSN  delta).    
that bound each  
active and archive log data set as well The   LRSN   value   is   used   to   sequence  
as a number of others that have log   records   from   mul?ple   members  
various purposes.   in  a  data  sharing  group.  

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Information Management for System z Click  to  edit  Master  Gtle  style  

How  DB2  11  uses  the  new  RBA/LRSN  format  


•  DB2  11  is  fundamentally  a  10-­‐byte  format  system  
•  All  values  are  processed  in  10-­‐byte  format  internally  
•  Avoids  the  complexity  of  a  dual  code  path  for  dealing    with  6-­‐byte  and  
10-­‐byte  formats  
•  Conversion  is  done  for  DB2  objects  s?ll  in  BASIC  format  
•  6-­‐byte  values  are  mapped  into  a  10-­‐byte  bucket    
•  DB2  messages  use  external  10-­‐byte  format  in  all  DB2  11  modes  
•  To  ensure  a  consistent  message  format  in  DB2  11  
•  e.g.  for  QUIESCE  or  REPORT  RECOVERY  output  
•  LRSN  values  contain  either  padded  x’00’  or  precision  value  
•  You  need  to  be  aware  of  this  when  going  to  DB2  11  CM!  
•  Maintenance  procedures  and  3rd  party  tools  must  support  DB2  11  
•  E.g.  IFCID  306  (always  new  log  format)  

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Information Management for System z Click  to  edit  Master  Gtle  style  

How  DB2  converts  EXTENDED  to  BASIC  format  


•  Happens  when  either  the  BSDS  and  log  or  the  DB2  database  
object  is  not  yet  converted  to  EXTENDED  format    
  0   0   C   9   C   1   2   3   1   1   3   9   F   A   1   4   F   6   A   4  

•  DB2  log  manager  will  create  the  next  valid  LRSN  value  based  on  
6-­‐byte,  trunca?ng  the  exis?ng  10-­‐byte  format  value  
 
  C   9   C   1   2   3   1   1   3   9   F   B  
•  If  the  next  valid  LRSN  value  would  be  beyond  valid  range  
•  UPDATE  will  be  not  possible  
•  Rollback  and  abort  processing  are  s?ll  allowed.  
•  Return  Code  00C2026D  is  issued  
•  User  Object  is  put  in  R/O  mode  un?l  converted  to  EXTENDED  format  

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Information Management for System z Click  to  edit  Master  Gtle  style  

How  to    get  there  ?  

CONVERSION  PROCESS  

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Click  to  edit  Master  Gtle  style  
Information Management for System z

DB2  11  MigraGon  Overview  (simplified)  


Convert    
DB2  Catalog  &     Convert  BSDS  
DB2  Objects  
Directory  and  SCA  
(mandatory)  

DB2  10  NFM   DB2  11  CM   DB2  11  NFM  

Convert   Convert  
DB2  Objects   BSDS  

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Information Management for System z Click  to  edit  Master  Gtle  style  

LRSN  values  in  DB2  11  CM  


Convert    
Convert  BSDS  
DB2  User  Objects  
LRSN  value  

DB2  10  NFM   DB2  11  CM   DB2  11  NFM  


00CC6292657D4E812345  
DB2  structures  
Convert   Convert  
DB2  User  Objects   BSDS  

truncated  

00CC6292657D4E812345   CC6292657D4E   CC6292657D4E   CC6292657D4E  


truncated   truncated  

DB2  messages   BSDS  &  DB2  recovery  log   DB2  catalog  columns   DB2  user  objects  

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Click  to  edit  Master  Gtle  style  
Information Management for System z

DB2  11  Coexistence  with  DB2  10  


•  Messages  are  generally  in  EXTENDED  format  as  of  CM  
•  DB2  internally  performs  conversion  between  BASIC  and  EXTENDED  
•  Addi?on  sanity  checks  for  RBA/LRSN  support  in  DB2  10  
•  APAR  PM90175      
•  APAR  PM90247    

RECOVER TABLESPACE DSNDB06.SYSTSTPT TOLOGPOINT X'00CB378D5A99‘


DSNU510I =D2T1 105 20:27:59.87 DSNUCASA - NO RECOVERY BASE AVAILABLE FOR RECOVERY OF
TABLESPACE DSNDB06.SYSTSTPT
DSNU017I 105 20:27:59.87 DSNUGBAC - UTILITY DATA BASE SERVICES MEMORY EXECUTION
ABENDED, REASON=X'00E40119‘ CAUSE=X'E4D9D4D3‘

RECOVER TABLESPACE DSNDB06.SYSTSTPT TOLOGPOINT X'00CB378D5A9900000000‘

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Information Management for System z Click  to  edit  Master  Gtle  style  

LRSN  values  in  DB2  11  NFM  –  aier  job  DSNTIJNF  


Convert    
Convert  BSDS  
DB2  User  Objects  
LRSN  value  

DB2  10  NFM   DB2  11  CM   DB2  11  NFM  


00CC6292657D4E812345  
DB2  structures  
Convert   Convert  
DB2  User  Objects   BSDS  

truncated  

00CC6292657D4E812345   CC6292657D4E   00CC6292657D4E812345   CC6292657D4E  


truncated  

DB2  messages   BSDS  &  DB2  recovery  log   DB2  catalog  columns   DB2  user  objects  

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Information Management for System z Click  to  edit  Master  Gtle  style  

New  DB2  subsystem  parameter  


•  OBJECT_CREATE_FORMAT  subsystem  parameter  
•  Controls  if  DB2  uses  BASIC  or  EXTENDED  format  when  crea?ng  new  
table  space  or  index  objects  
•  Acceptable  values  are    
•  BASIC      -­‐  new  objects  will  be  in  6-­‐byte  format  
•  EXTENDED  (default)  -­‐  new  objects  will  be  in  10-­‐byte  format    
 
•  Before  DB2  11  NFM,  the  se{ng  of  this  ZPARM  is  ignored  
•  BASIC  format  is  always  used  
•  Column  ‘RBA_FORMAT’  in  SYSIBM.SYSxxxPART  is  set  to  ‘B‘  for  new  
defined  or  objects  (possible  values  ‚B,  blank‚  U,  E)  
•  WORKFILE  objects  
•  Will  always  be  created  in  EXTENDED  format!  
•  No  SYSPLEX  QUERY  PARALLELISM  support  between  V10  and  V11  exists  if  
work  files  are  involved  
 
June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Click  to  edit  Master  Gtle  style  
Information Management for System z

ConverGng  the  BSDS  and  log  to  EXTENDED  format  


•  Run  DSNJCNVT  u?lity  to  convert  the  bootstrap  data  set  (BSDS)  
and  the  recovery  log  
•  Can  be  run  at  any  ?me  aner  migra?on  to  DB2  11  NFM  
•  There  is  NO  way  back  for  the  BSDS!  
•  In  data  sharing  mode,  BSDS  of  each  member  can  be  converted  one  at  a  
?me  
//CONVERT EXEC PGM=DSNJCNVT,REGION=64M
//SYSUT1 DD DSN=DB2A.OLD.BSDS01,DISP=SHR
//SYSUT2 DD DSN=DB2A.OLD.BSDS02,DISP=SHR
//SYSUT3 DD DSN=DB2A.BSDS01,DISP=OLD
//SYSUT4 DD DSN=DB2A.BSDS02,DISP=OLD
//SYSPRINT DD SYSOUT=*

CRCR convert started


DSNJ200I DSNJCNVT CONVERT UTILITY PROCESSING COMPLETED
SUCCESSFULLY FOR MEMBER 'xxxxxxxx'

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Information Management for System z Click  to  edit  Master  Gtle  style  

ConverGng  the  BSDS  and  log  to  EXTENDED  format  …  


•  Things  to  consider  before  running  DSNJCNVT  
•  Stop  DB2  subsystem  that  owns  the  bootstrap  data  set  
•  Any  u?lity  that  reads  from  peer  BSDS  must  be  finished  in  data  sharing  
•  RACF  user  ID  running  DSNJCNVT  must  have  read/write  access  on  the  new  
BSDSs  ,  and  read  access  on  the  old  BSDSs  
 
•  DSN1LOGP  and  REPORT  RECOVER  output  will  show  10  byte  extended  
format  LRBA/LRSN  if  only  BSDS  has  been  converted  
•  although  never  externalized  to  pagesets  (different  output,  for  DSN1PRNT  of  
pagesets)  

•  Special  considera?ons  for  Data  Replica?on  


•  Stop  any  data  replica?on  process  to  ensure  successfully  renamed  and  
replaced  BSDS  
•  Best  prac?ce  is  to  stop  the  data  replica?on  process  first,  then  stop  the  DB2  
subsystem  
•  allow  sharing  systems  to  de-­‐allocate  the  BSDSs  when  the  state  of  the  member  
changes  to  inac?ve.    

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Information Management for System z Click  to  edit  Master  Gtle  style  

DB2  11  NFM  –  only  BSDS  converted  to  EXTENDED  


Convert    
Convert  BSDS  
DB2  User  Objects  
LRSN  value  

DB2  10  NFM   DB2  11  CM   DB2  11  NFM  


00CC6292657D4E812345  
DB2  structures  
Convert   Convert  
DB2  User  Objects   BSDS  

truncated  

00CC6292657D4E812345   00CC6292657D4E812345   00CC6292657D4E812345   CC6292657D4E  

DB2  messages   BSDS  &  DB2  recovery  log   DB2  catalog   DB2  user  objects  

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Click  to  edit  Master  Gtle  style  
Information Management for System z

ConverGng  DB2  user  objects  to  EXTENDED  format    


•  DB2  user-­‐objects  can  be  converted  to  EXTENDED  by  running    
•  REORG  TABLESPACE  or  REORG  INDEX  
•  LOAD  REPLACE  
•  REBUILD  INDEX  
•  LISTDEF  enhanced  to  filter  object    based  on  format  
 
  LISTDEF REORG_LIST
  INCLUDE TABLESPACE DSNDB01.DBD01
INCLUDE TABLESPACE DSNDB01.SPT01
BASIC YES
BASIC YES
  INCLUDE TABLESPACE DSNDB01.SCT02 BASIC YES

REORG TABLESPACE LIST REORG_LIST SHRLEVEL CHANGE


LOG NO COPYDDN(SYSCOPY)
RBALRSN_CONVERSION EXTENDED
RETRY 255 TIMEOUT TERM RETRY_DELAY 1 DRAIN_WAIT 1
SORTDATA

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Information Management for System z Click  to  edit  Master  Gtle  style  

New  DB2  subsystem  parameter  …  


•  UTILITY_OBJECT_CONVERSION    subsystem  parameter  
•  Controls  if  DB2  u?li?es  that  accept  the  RBALRSN_CONVERSION  op?on  
will  perform  any  format  conversion  for  exis?ng  table  spaces  or  indexes  
•  The  default  behavior  normally  applies  when  the  u?lity  control  
statement  does  not  specify  the  RBALRSN_CONVERSION  op?on  
•  Acceptable  values  are  
•  BASIC                            -­‐  convert  exis?ng  object  to  BASIC  6-­‐byte  format  
•  EXTENDED    -­‐  convert  exis?ng  object  to  EXTENDED  10-­‐byte  format  
•  Only  allowed  when  OBJECT_CREATE_FORMAT  =  EXTENDED  
•  NOBASIC  -­‐  disables  RBALRSN_CONVERSION  =  BASIC  se{ng  
•  NONE  (default)    -­‐  does  not  perform  automa?c  conversion  
•   Before  DB2  11  NFM,  the  se{ng  of  this  ZPARM  is  ignored  
•  Column  ‘RBA_FORMAT’  in  SYSIBM.SYSxxxPART  is  set  to  ‘B‘  for  objects  which  are  reorged  
or  loaded  with  replace-­‐op?on    (possible  values  ‚B,  blank‚  U,  E)  
 

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Information Management for System z Click  to  edit  Master  Gtle  style  

DB2  11  NFM  –  only  DB2  user  objects  converted  to  EXTENDED  
Convert    
Convert  BSDS  
DB2  User  Objects  
LRSN  value  
DB2  10  NFM   DB2  11  CM   DB2  11  NFM   00CC6292657D4E812345  
DB2  structures  
Convert   Convert  
DB2  User  Objects   BSDS  

00CC6292657D4E812345   CC6292657D4E   00CC6292657D4E812345   00CC6292657D4E812345  


truncated  

DB2  messages   BSDS  &  DB2  recovery  log   DB2  catalog   DB2  user  objects  

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Information Management for System z Click  to  edit  Master  Gtle  style  

Recovery  ConsideraGons  
•  It  is  important  that  the  disaster  recovery  process  does  not  
convert  any  objects  to  or  from  10  byte  extended  RBA  or  LRSN  
format  during  the  recovery  and  rebuild  process.    
•  If  some  objects  are  in  extended  10-­‐byte  format    
•  temporarily  change  the  UTILITY_OBJECT_CONVERSION  subsystem  
parameter  to  NONE  before  you  begin  a  disaster  recovery    
•  do  not  specify  the  RBALRSN_CONVERSION  keyword  in  the  control  
statements.      
•  Aner  the  disaster  recovery  is  complete,  change  the  
UTILITY_OBJECT_CONVERSION  subsystem  parameter  to  its  original  
value.  

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Information Management for System z Click  to  edit  Master  Gtle  style  

DSN1COPY  consideraGons  
•  As  of  DB2  11,  addi?onal  sanity  checks  will  be  performed  at  
physical  open  ?me  of  the  page  set  
•  The  record  row  format  such  RRF,  BRF  or  RBA  format  such  as  6  byte  
verse  10  byte  RBA  format  will  not  be  validated  during  physical  open  
because  the  informa?on  on  the  header  page  can  represents  
 
•  DSN1COPY  will  not  update  DB2  catalog  tables  to  reflect  actual  
format  
•  Use  of  REPAIR  CATALOG  TABLESPACE  dbname.tsname    updates  values  
•  New  addi?onal  keyword  CATALOG  TEST  will  only  report  inconsistencies  
   

•  New  message  DSNU674I  will  report  any  exis?ng  mismatches  


DSNU674I csect-name - mismatch-information-type FOR DBID=X'dbid' PSID=X'psid' IS catalog-
format-type IN THE DB2 CATALOG BUT IS pageset-format-type IN THE PAGE SET

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Information Management for System z Click  to  edit  Master  Gtle  style  

Updates  in  a  mixed  Data  Sharing  Group  in  DB2  11  NFM  
to  a  Page  in  BASIC  &  EXTENDED  format  
P1   P2  
DB2  M6   DB2  M10  
LRSN  value   PGLOGRBA   PGLOGRBA   LRSN  value  
?me   (basic)   (extended)  

1st INSERT

100000000001   00100000000001000002  

00100000000001000003   00100000000001000003  

00100000000001000004   00100000000002000000  

00100000000001000005   100000000002  

100000000003   00100000000002000001  

00100000000002000003   00100000000002000003  

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Click  to  edit  Master  Gtle  style  
Information Management for System z

One  more  word  on  LRSN  spinning    


•  With  the  extended  10-­‐byte  format  in  V11,  the  LRSN  spin  
problem  is  basically  eliminated  
•  But  only  aner  
•  BSDS  converted  to  EXTENDED  format    
•  Associated  user  object  is  converted  to  EXTENDED  format  as  well  

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Information Management for System z Click  to  edit  Master  Gtle  style  

UnGl  you  are  in  a  true  10-­‐byte  DB2  11  System  


•  Once  the  BSDS  is  converted,  DB2  system  son  and  hard  limits  
are  now  based  on  the  10-­‐byte  format  
•  Checked  during  startup  and  ac?ve  log  switches  
•  But  once  DB2  passes  the  end  of  the  6-­‐byte  log  range  
•  Any  Update  to  a  user  object  in  BASIC  format  puts  it  into  R/O  mode  
•  Objects  in  BASIC  format  can  be  iden?fied  by  
•  Checking  RBA_FORMAT  column  in  SYSTABLEPART  and  SYSINDEXPART  
•  ‘B’    –  BASIC  format  
•  ‘E’    –  EXTENDED  format  
•  ‘U’    –  DEFINE  NO  op?on  used  
•  ‘blank’    –  for  migrated  objects  
•  Un?l  all  user  objects  are  converted  to  EXTENDED  
•  Monitor  the  current  high  RBA/LRSN  value  used  by  DB2  
•  And  check  against  the  DB2  10  SOFT  &  HARD  limits    
June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Information Management for System z Click  to  edit  Master  Gtle  style  

True  10-­‐byte  format  environment  in  DB2  11  NFM    


Convert    
Convert  BSDS  
DB2  User  Objects  
LRSN  value  

DB2  10  NFM   DB2  11  CM   DB2  11  NFM   00CC6292657D4E812345  
DB2  structures  
Convert   Convert  
DB2  User  Objects   BSDS  

00CC6292657D4E800000   00CC6292657D4E800000   00CC6292657D4E800000   00CC6292657D4E800000  

DB2  messages   BSDS  &  DB2  recovery  log   DB2  catalog   DB2  user  objects  

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Click  to  edit  Master  Gtle  style  
Information Management for System z

Summary  of  enhancement  based  upon  customer  input  


•  NOBASIC  ZPARM  op?on  to  prevent  REORG  conversion  from  
extended  to  basic  format.  
•  No  Abend  on  RECOVERY  of  catalog/directory    
         with  bad  RBA/LRSN  input.  
•  Add  LRSN  values  for  archive  log  informa?on  to  
         REPORT  RECOVERY  u?lity  output.  
•  Perform  sanity  check  to  guard  against  invalid  LRSN    
         values,  i.e.  6-­‐byte  LRSN  values  with  leading  byte  of  zeros.  
•  Support  10  byte  input  to  RECOVER  in  DB2  10.    

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Click  to  edit  Master  Gtle  style  
Information Management for System z

Key  Facts  Summary  


•  DB2  11  is  fundamentally  a  10-­‐byte  format  system  as  of  CM  
•  3rd  party  tools  and  procedures  must  be  compa?ble  
•  Customers  are  full  flexible  in  conver?ng  to    
the  EXTENDED  format  once  in  NFM  
•  Mixed  mode  support  in  DB2  Data  Sharing  

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Click  to  edit  Master  Gtle  style  
Information Management for System z

June  12th  2014   DB2 GSE Workgroup BeLux 2014 ©  2014  IBM  Corpora?on  
Click  to  edit  Master  Gtle  style  
Information Management for System z

Bootcamp
link

June  12th  2014   DB2 GSE Workgroup BeLux 2014 ©  2014  IBM  Corpora?on  
Click  to  edit  Master  Gtle  style  
Information Management for System z

SYSLGRNX  overview    

APPENDIX  A  

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Information Management for System z Click  to  edit  Master  Gtle  style  

How  DB2  tracks  log  changes  -­‐  SYSLGRNX  overview  


Current  Time  
DB2  log  

Open  log  ranges   A


B
C
D
E
F

StarGng   Ending     StarGng  LRSN  of  update  log   Ending  LRSN  of  update  
DBID   PSID   RBA  Range   RBA  Range   Part   in  data  sharing   log  in  data  sharing   MEMBER  

0105   000F   A   B   1   ’CF1234567890’x   ‘CF123456789A’x   0001  

0105   000F   C   D   2   ‘CF12345678B0’x   ‘CF12345678B9’x   0002  

0105   000F   E   F   1   ‘CF12345678C0’x   ‘CF12345678C4’x   0002  

•  Log  ranges  are  defined  by  page  set  and  changes  between  page  set  
open  and  pseudo-­‐closed  
•  REPORT  RECOVERY  u?lity  will  list  the  content  
•  SQL  is  not  allowed  against  SYSLGRNX  before  DB2  10  
•  Housekeeping  of  SYSLGRNX  is  done  by  running  MODIFY  RECOVERY  
June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Click  to  edit  Master  Gtle  style  
Information Management for System z

DB2  Objects  affected  by  10-­‐byte  format  change  

APPENDIX  B  

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Information Management for System z Click  to  edit  Master  Gtle  style  

DB2  Catalog  columns  


•  DB2  catalog  and  directory  object  defini?ons  are  changed  from  
6-­‐byte  to  10-­‐byte  format  during  ENFM  processing  as  part  of  job  
DSNTIJEN.  
•  The  values  stored  in  the  DB2  catalog  and  directory  objects  can  
be  6-­‐byte  or  10-­‐byte  format  
•  The  format  depends  on  which  conversion  step  is  executed  in  ENFM  
•  Not  a  locked  atomic  opera?on  
•  In  NFM,  ENFM*,  CM*,  10-­‐bytes  values  are  stored.  
•  DB2  catalog  and  directory  table  spaces  and  indexes  are  s?ll  in  
BASIC  format    aner  NFM  conversion  
•  Job  DSNTIJCV  can  be  used  to  convert  catalog  and  directory  to  
EXTENDED  format  once  in  DB2  11  NFM  

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Click  to  edit  Master  Gtle  style  
Information Management for System z

Shared  CommunicaGons  Area  (SCA)  format  


•  The  structure  of  the  SCA  is  reformaved  to  handle  the  new    
10-­‐byte  format    
•  A  rebuild  is  triggered  during  NFM  processing  as  part  of  job  DSNTIJNF  
•  This  is  not  an  op?onal  step!  
•  A  Group  Restart  can  also  trigger  a  rebuild  of  the  SCA  
•  When  s?ll  in  old  format  
•  And  Data  Sharing  group  is  not  in  CM  mode.  

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Information Management for System z Click  to  edit  Master  Gtle  style  

Bootstrap  Data  Set  (BSDS)  


•  The  BSDS  can  be  converted  at  any  ?me  aner  NFM  migra?on  by  
running  job  DSNTIJCB  or  stand-­‐alone  u?lity  DSNJCNVT  
•  The  owning  DB2  member  must  be  stopped  before  migra?on  
•  In    data  sharing  one  member  at  a  ?me  can  be  migrated  
•  Mixed-­‐mode  of  BSDSs  is  supported  in  a  data  sharing  group  
•  DB2  takes  care  of  necessary  conversions  
•  Limita?ons  of  BASIC  format  will  con?nue  un?l  all  members  are  
converted  
•  E.g.  LRSN  spinning  for  subsequent  transac?ons  involving  members  with  
BASIC  and  EXTENDED  log  formats  
•  The  BSDS  conversion  is  a  one  way  process  
•  No  fallback  to  6-­‐byte  format  possible    
•  Trunca?on  of  log  record  informa?on  to  6-­‐byte  format  not  possible  

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Click  to  edit  Master  Gtle  style  
Information Management for System z

Recovery  Log  
•  In  DB2  11  CM  the  recovery  log  content  is  iden?cal  to  DB2  10  
•  DB2  internally  operates  with  10  byte  format  
•  Which  will  be  truncated  to  6-­‐bytes  format  log  records  
•  Once  the  BSDS  is  in  EXTENDED  format,  DB2  Log  Manager  will  
generate  10-­‐byte  format  log  records  
•  The  BSDS  must  be  converted  to  ensure  enough  room  to  store  extended  
10-­‐byte  format  log  records  

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Information Management for System z Click  to  edit  Master  Gtle  style  

Database  objects  
•  User  Database  objects  are  either  in  6-­‐byte  (BASIC)  or  10-­‐byte  
(EXTENDED)  format  
•  There  is  no  automa?c  conversion  during  ENFM  or  NFM  
processing  for  any  objects  
•  Can  be  done  at  any  ?me  in  NFM  and  is  not  dependent  on  BSDS  
log  format  
•  Conversion  is  done  using  the  REORG  /  LOAD  REPLACE  /  
REBUILD  INDEX  u?li?es  once  in  NFM  
•  Two  DB2  subsystem  parameters  (ZPARMs)  exist  to  control  the  behavior  
•  The  format  of  newly  created  database  objects  
•  To  have  objects  automa?cally  converted  during  u?lity  execu?on  or  to  
restrict  the  conversion  back  to  BASIC  format  using  REORG  

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Click  to  edit  Master  Gtle  style  
Information Management for System z

SQL  TIMESTAMP  func?on  and  LISTDEF  u?lity  enhancements  

APPENDIX  C  

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Information Management for System z Click  to  edit  Master  Gtle  style  

Convert  LRSN  values  using  new  TIMESTAMP  funcGon  


•  Using  an  8-­‐byte  value  with  the  TIMESTAMP  func?on  
•  it  is  interpreted  as  being  the  value  of  a  store  clock  (STCK)  instruc?on.        
•  If  a  STCK  value  starts  with  '00'x,  then  it  is  from  the  year  1900.      
 
 
  SELECT TIMESTAMP(BX'00FBCA9A43BFFA0F')
  FROM SYSIBM.SYSDUMMY1;

  +----------------------------+
  | |
+----------------------------+
  1_| 1900-07-20-06.22.54.381055 |
  +----------------------------+

SET CURRENT APPLICATION COMPATIBILITY = 'V11R1'

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Click  to  edit  Master  Gtle  style  
Information Management for System z

Convert  LRSN  values  using  new  TIMESTAMP  funcGon  …  


•  Using  a  16-­‐byte  value  with  the  TIMESTAMP  func?on,    
•  it  is  interpreted  as  being  the  value  of  a  stock  clock  extended  (STCKE)  
instruc?on  and  '00'x  is  expected  as  the  first  byte,  un?l  the  year  
advances  to  2042  when  the  first  byte  becomes  non-­‐zero.    
 
  SELECT TIMESTAMP(BX'01000000000000000000000000000000')
  FROM SYSIBM.SYSDUMMY1;

  +----------------------------+
  | |
+----------------------------+
  1_| 2042-09-17-23.53.47.370496 |
+----------------------------+ ›

SET CURRENT APPLICATION COMPATIBILITY = 'V11R1'

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Click  to  edit  Master  Gtle  style  
Information Management for System z

LISTDEF  UGlity  
.--------------.
V |
>>-LISTDEF--list-name----list-options-+------------------------><
...

>--+----------------+--+-------------------+-------------------><
'-BASIC--+-NO--+-' '-EXTENDED--+-NO--+-'
  '-YES-' '-YES-'

•  Specifies  that  LISTDEF  is  to  perform  a  final  filtering  of  the  
INCLUDE  or  EXCLUDE  clause  contents  based  on  either    
•  BASIC  format  with  6-­‐byte  RBA  or  LRSN  values.    
•  EXTENDED  format  with  10-­‐byte  RBA  or  LRSN  values.  
•  This  opera?on  is  performed  last,  aner  LISTDEF  processes  all  
other  keywords  on  the  INCLUDE  or  EXCLUDE  clause  

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  
Information Management for System z Click  to  edit  Master  Gtle  style  

Recovery  ConsideraGons  …  
•  FLASHCOPY  CONSISTENT    
•  Format  1:  112233445566,112233445566,112233445566,  
•  Format  2:  123-­‐112233445566,123-­‐112233445566,123-­‐112233445566,    

•  Following  ENFM  conversion  of  SYSCOPY  


•  Format  3:  123+11223344556677889900,123+11223344556677889900,  
 
•  System  Level  Backup  
•  With  the  conversion  of  the  BSDS  to  EXTENDED  
•  DFSMShsm  token  now  support  22bytes  (+4)  
•  Is  reflected  in  DSNJU004  and  REPORT  RECOVERY  u?lity  
•  Correct  token  format  must  be  specified  for  the  desired  system  level  backup  

June  12th  2014   DB2  GSE  Workgroup  BeLux  2014   ©  2014  IBM  Corpora?on  

You might also like