Recovering to a point in time before pending definition changes were materialized
You can recover a partition-by-growth (UTS) table space, a partition-by-range table space, a LOB table space, or an XML table space to a point in time before you materialized pending definition changes.
About this task
In some cases, recovery to a point-in-time before the materialization of a pending definition change is not supported at all, and various restrictions apply when it is supported. For more information, see "Restrictions for point-in-time recoveries" in Point-in-time recovery.
Procedure
To recover a table space to a point in time that is before materialization of pending definition changes:
Example
The following example provides a scenario that shows how you can recover a table space to a point in time before pending definition changes were materialized, and then use the REORG TABLESPACE utility with SHRLEVEL REFERENCE to complete recovery.
- You execute the following ALTER TABLESPACE statement to change the buffer
pool page size. This change is a pending definition change.
ALTER TABLESPACE DB1.TS1 BUFFERPOOL BP8K0 MAXPARTITIONS 20 ;
- You run REORG to materialize the pending definition change.
- You run the following RECOVER control statement to recover the table space to point in time
2012-10-09-07.15.22.216020.
RECOVER TABLESPACE DB1.TS1 TOLOGPOINT X'00000551BE7D'
When this statement runs, the table space is placed in REORG-pending (REORP) state, and an entry is inserted into the SYSPENDINGDDL table with OBJTYPE = 'S', for table space.
- You run the following SELECT statement to query the SYSIBM.SYSPENDINGDDL catalog
table:
SELECT DBNAME, TSNAME, OBJSCHEMA, OBJNAME, OBJTYPE, OPTION_SEQNO, OPTION_KEYWORD, OPTION_VALUE, CREATEDTS FROM SYSIBM.SYSPENDINGDDL WHERE DBNAME = 'DB1' AND TSNAME = 'TS1' ;
This query results in the following output:
Table 1. Output from the SELECT statement for the SYSPENDINGDDL catalog table after RECOVER to a point in time before materialization of pending definition changes DBNAME TSNAME OBJSCHEMA OBJNAME OBJTYPE DB1 TS1 DB1 TS1 S Table 2. Continuation of output from the SELECT statement for the SYSPENDINGDDL catalog table after RECOVER to a point in time before materialization of pending definition changes OPTION_SEQNO OPTION_KEYWORD OPTION_VALUE CREATEDTS 1 TOLOGPOINT 00000551BE7D 2012-10-04-
07.14.20.204010 - Now, you run the REORG TABLESPACE utility with SHRLEVEL REFERENCE on the entire table space. For
example:
The REORG utility completes point-in-time recovery. After the REORG utility runs, the REORG-pending (REORP) state is cleared, and all entries in the SYSPENDINGDDL table for the table space are removed.REORG TABLESPACE DB1.TS1 SHRLEVEL REFERENCE