an#overview#of#the#extended#lrsn#and#rba supportindb211forz… db2 guide benelux 2014 extend… ·...
TRANSCRIPT
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 [email protected]
DB2 GSE Workgroup BeLux 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
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
DB2 GSE Workgroup BeLux 2014 June 12th 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
THE BASIC STUFF Back in Time
June 12th 2014 DB2 GSE Workgroup BeLux 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
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
• 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
C 9 C 1 2 3 1 1 3 9 3 F
DB2 GSE Workgroup BeLux 2014 June 12th 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
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)
• Kept in sync across all data sharing group members using the SYSPLEX ?mer
C 9 C 1 2 3 1 1 3 9 3 F
DB2 GSE Workgroup BeLux 2014 June 12th 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
BSDS
A sample INSERT process
Table Space
Ac?ve Log
Archive LOGS
SYSLGRNX
DB2 Recovery Log Manager
LOG BUFFERS
BEGIN_UR RECORD
UNDO / REDO DATA
UNDO / REDO INDEX
COMMIT RECORDS
END_UR RECORD
UNDO / REDO INDEX
OPEN PAGESETS
Checkpoint RECORD
RBA 1000 RBA 2000
Begin Unit of Recovery (INSERT DB) End Unit of Recovery (Commit or Rollback)
Insert one Row Buffer Pool
DB2 RECOVERY LOG
2 1
3
4
5
at open at close
June 12th 2014 DB2 GSE Workgroup BeLux 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
THE 6-‐BYTE FORMAT AND ITS LIMITS The Challenge
June 12th 2014 DB2 GSE Workgroup BeLux 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
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!
DB2 GSE Workgroup BeLux 2014 June 12th 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
Reaching the RBA limit
RBA Range
> ’F00000000000’X > ‘FFF800000000’X > ‘FFFF00000000’X
DSNJ032I WARNING issued DSNJ032I WARNING issued DSNJ032I CRITICAL issued
Updates will fail User Objects are in R/O mode
Updates will fail 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!
Processing con?nues
SOFT LIMIT HARD LIMIT
June 12th 2014 DB2 GSE Workgroup BeLux 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
Reaching the LRSN limit
LRSN Range
> ‘FE35173EC1E1’X > ‘FFB20C5D6BE1’X > ‘FFEE65E38BE1’X
DSNJ034I WARNING issued DSNJ034I WARNING issued DSNJ034I CRITICAL issued
Updates will fail User Objects are in R/O mode
Updates will fail User Objects are in R/O mode DB2 will terminate with RC00D10251 –START DB2 will fail!
Processing con?nues
SOFT LIMIT HARD LIMIT
June 12th 2014 DB2 GSE Workgroup BeLux 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
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
DB2 GSE Workgroup BeLux 2014 June 12th 2014
REMEMBER: there is no formal procedure to reset the LRSN!
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
Preparing for the end of the RBA (not the end of the world J)
• Determine the remaining log RBA range using DSNJU004
• Determine the average number of bytes logged per day using DSNJU004 u?lity
• Es?mate remaining ?me • Follow well documented RBA reset procedures!
• hvps://ibm.biz/BdDZK6 -‐ data sharing environment • hvps://ibm.biz/BdDZac -‐ non-‐data sharing environment
[remaining log RBA range] = X’FFFFFFFFFFFF’ -‐ [HIGHEST RBA WRITTEN]
[remaining log RBA range] = X’FFF80000000’ -‐ [HIGHEST RBA WRITTEN] (32GB log space len)
(b) = # of daily created archive logs
[average number of RBAs logged per day] = b * (ENDRBA – STARTRBA)
[remaining Gme ] = [remaining log RBA range] / [average number of bytes logged per day]
DB2 GSE Workgroup BeLux 2014 June 12th 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
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
DB2
DB2 GSE Workgroup BeLux 2014 June 12th 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
THE NEW 10-‐BYTE FORMAT The solu?on
June 12th 2014 DB2 GSE Workgroup BeLux 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
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 0 0 0 0
0 0 0 0 9 A 6 5 7 4 0 A 248 Bytes
280 Bytes 0 0 0 0 9 A 6 5 7 4 0 A
DB2 GSE Workgroup BeLux 2014 June 12th 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
1 Yo]abyte illustrated
Distance Earth-‐Moon: 384,000 km (~ 240,000 mi)
1 Yovabyte requires a stack of 2 TB 2.5“ HDDs (each 9.5mm) 13.5x as high as the distance Earth-‐Moon
13.5x
June 12th 2014 DB2 GSE Workgroup BeLux 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
The new 10-‐byte LRSN format in DB2 11
• The 6-‐byte LRSN (BASIC) format
• 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
0 0 C C 6 2 A 6 9 D 5 E 3 5 3 3 1 0 0 0
1 addi?onal byte will extend the LRSN range to cover 36,534 years
3 bytes at the end will increase the granularity to 1 picosecond
C C 6 2 A 6 9 D 5 E 3 5
DB2 GSE Workgroup BeLux 2014 June 12th 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
DB2 objects affected by the new format
Database Objects The RBA (non-‐data sharing) and LRSN (data sharing) of the last change in each page of every table and index
Recovery Log The log records themselves are assigned RBA values so that they can be located. In a data sharing environment each log record has an associated LRSN value that is based on the ?me the log record was created (plus any LRSN delta). The LRSN value is used to sequence log records from mul?ple members in a data sharing group.
Bootstrap Data Set (BSDS) Contains the LRSN and RBA values that bound each active and archive log data set as well as a number of others that have various purposes.
DB2 Catalog columns T h e D B 2 c a t a l o g a n d directory contain RBA and LRSN information in several tables.
Shared CommunicaGon Area (SCA) The SCA structure is used to track and communicate data pertinent to a data sharing group. This data always includes some LRSN and RBA values and there may be a large number of such values depending on the exception states, if any, of database objects.
June 12th 2014 DB2 GSE Workgroup BeLux 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
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)
DB2 GSE Workgroup BeLux 2014 June 12th 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
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
• DB2 log manager will create the next valid LRSN value based on 6-‐byte, trunca?ng the exis?ng 10-‐byte format value • 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
0 0 C 9 C 1 2 3 1 1 3 9 F A 1 4 F 6 A 4
C 9 C 1 2 3 1 1 3 9 F B
DB2 GSE Workgroup BeLux 2014 June 12th 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
CONVERSION PROCESS How to get there ?
June 12th 2014 DB2 GSE Workgroup BeLux 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
DB2 11 MigraGon Overview (simplified)
DB2 11 CM DB2 10 NFM DB2 11 NFM
Convert BSDS Convert DB2 Objects
Convert DB2 Objects
Convert BSDS
June 12th 2014 DB2 GSE Workgroup BeLux 2014
DB2 Catalog & Directory and SCA
(mandatory)
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
LRSN values in DB2 11 CM
DB2 messages
00CC6292657D4E812345
BSDS & DB2 recovery log
CC6292657D4E
DB2 catalog columns
CC6292657D4E CC6292657D4E
DB2 user objects
truncated truncated
truncated
DB2 11 CM DB2 10 NFM DB2 11 NFM
Convert BSDS Convert DB2 User Objects
Convert DB2 User Objects
Convert BSDS
DB2 structures
00CC6292657D4E812345
LRSN value
June 12th 2014 DB2 GSE Workgroup BeLux 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
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‘
DB2 GSE Workgroup BeLux 2014 June 12th 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
LRSN values in DB2 11 NFM – aier job DSNTIJNF
DB2 messages
00CC6292657D4E812345
BSDS & DB2 recovery log
CC6292657D4E
DB2 catalog columns
00CC6292657D4E812345 CC6292657D4E
DB2 user objects
truncated
truncated
DB2 11 CM DB2 10 NFM DB2 11 NFM
Convert BSDS Convert DB2 User Objects
Convert DB2 User Objects
Convert BSDS
DB2 structures
00CC6292657D4E812345
LRSN value
June 12th 2014 DB2 GSE Workgroup BeLux 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
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
DB2 GSE Workgroup BeLux 2014 June 12th 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
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'
DB2 GSE Workgroup BeLux 2014 June 12th 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
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.
DB2 GSE Workgroup BeLux 2014 June 12th 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
DB2 11 NFM – only BSDS converted to EXTENDED
DB2 messages
00CC6292657D4E812345
BSDS & DB2 recovery log
00CC6292657D4E812345
DB2 catalog
00CC6292657D4E812345 CC6292657D4E
DB2 user objects
truncated
DB2 11 CM DB2 10 NFM DB2 11 NFM
Convert BSDS Convert DB2 User Objects
Convert DB2 User Objects
Convert BSDS
DB2 structures
00CC6292657D4E812345
LRSN value
June 12th 2014 DB2 GSE Workgroup BeLux 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
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 BASIC YES INCLUDE TABLESPACE DSNDB01.SPT01 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
DB2 GSE Workgroup BeLux 2014 June 12th 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
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)
DB2 GSE Workgroup BeLux 2014 June 12th 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
DB2 11 NFM – only DB2 user objects converted to EXTENDED
DB2 messages
00CC6292657D4E812345
BSDS & DB2 recovery log
CC6292657D4E
DB2 catalog
00CC6292657D4E812345 00CC6292657D4E812345
DB2 user objects
truncated
DB2 11 CM DB2 10 NFM DB2 11 NFM
Convert BSDS Convert DB2 User Objects
Convert DB2 User Objects
Convert BSDS
DB2 structures
00CC6292657D4E812345
LRSN value
June 12th 2014 DB2 GSE Workgroup BeLux 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
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.
DB2 GSE Workgroup BeLux 2014 June 12th 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
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
DB2 GSE Workgroup BeLux 2014 June 12th 2014
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
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
Updates in a mixed Data Sharing Group in DB2 11 NFM to a Page in BASIC & EXTENDED format
DB2 M6
00100000000001000004
00100000000001000005
DB2 M10
00100000000001000003
00100000000002000001
00100000000001000002
00100000000002000003
P2
PGLOGRBA (extended)
00100000000001000003
00100000000002000000
00100000000002000003
P1
PGLOGRBA (basic)
100000000003
100000000001
100000000002
LRSN value LRSN value ?me
June 12th 2014 DB2 GSE Workgroup BeLux 2014
1st INSERT
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
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
DB2 GSE Workgroup BeLux 2014 June 12th 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
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
DB2 GSE Workgroup BeLux 2014 June 12th 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
True 10-‐byte format environment in DB2 11 NFM
DB2 messages
00CC6292657D4E800000
BSDS & DB2 recovery log
00CC6292657D4E800000
DB2 catalog
00CC6292657D4E800000 00CC6292657D4E800000
DB2 user objects
DB2 11 CM DB2 10 NFM DB2 11 NFM
Convert BSDS Convert DB2 User Objects
Convert DB2 User Objects
Convert BSDS
DB2 structures
00CC6292657D4E812345
LRSN value
June 12th 2014 DB2 GSE Workgroup BeLux 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
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.
DB2 GSE Workgroup BeLux 2014 June 12th 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
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
DB2 GSE Workgroup BeLux 2014 June 12th 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on DB2 GSE Workgroup BeLux 2014 June 12th 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on DB2 GSE Workgroup BeLux 2014
Bootcamp link
June 12th 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
APPENDIX A SYSLGRNX overview
June 12th 2014 DB2 GSE Workgroup BeLux 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
How DB2 tracks log changes -‐ SYSLGRNX overview
• 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
A B C D E F Open log ranges
DBID PSID StarGng RBA Range
Ending RBA Range Part
StarGng LRSN of update log in data sharing
Ending LRSN of update 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
Current Time DB2 log
DB2 GSE Workgroup BeLux 2014 June 12th 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
APPENDIX B DB2 Objects affected by 10-‐byte format change
June 12th 2014 DB2 GSE Workgroup BeLux 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
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
DB2 GSE Workgroup BeLux 2014 June 12th 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
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.
DB2 GSE Workgroup BeLux 2014 June 12th 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
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
DB2 GSE Workgroup BeLux 2014 June 12th 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
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
DB2 GSE Workgroup BeLux 2014 June 12th 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
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
DB2 GSE Workgroup BeLux 2014 June 12th 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
APPENDIX C SQL TIMESTAMP func?on and LISTDEF u?lity enhancements
June 12th 2014 DB2 GSE Workgroup BeLux 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
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.
SET CURRENT APPLICATION COMPATIBILITY = 'V11R1'
SELECT TIMESTAMP(BX'00FBCA9A43BFFA0F') FROM SYSIBM.SYSDUMMY1; +----------------------------+ | | +----------------------------+ 1_| 1900-07-20-06.22.54.381055 | +----------------------------+
DB2 GSE Workgroup BeLux 2014 June 12th 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
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.
SET CURRENT APPLICATION COMPATIBILITY = 'V11R1'
SELECT TIMESTAMP(BX'01000000000000000000000000000000') FROM SYSIBM.SYSDUMMY1; +----------------------------+ | | +----------------------------+ 1_| 2042-09-17-23.53.47.370496 | +----------------------------+ ›
DB2 GSE Workgroup BeLux 2014 June 12th 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
LISTDEF UGlity
• 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
.--------------. V | >>-LISTDEF--list-name----list-options-+------------------------>< ... >--+----------------+--+-------------------+------------------->< '-BASIC--+-NO--+-' '-EXTENDED--+-NO--+-' '-YES-' '-YES-'
DB2 GSE Workgroup BeLux 2014 June 12th 2014
Click to edit Master Gtle style Information Management for System z
© 2014 IBM Corpora?on
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
DB2 GSE Workgroup BeLux 2014 June 12th 2014