MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to recover a tablespace to a particular timestamp

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
pcsingh_2000
Beginner


Joined: 13 May 2003
Posts: 15
Topics: 6
Location: Kolkata

PostPosted: Wed Jan 23, 2008 5:48 pm    Post subject: How to recover a tablespace to a particular timestamp Reply with quote

I have a requirement as below:
Suppose I have taken a full backup, then Quiesce. After that there are some insert/update/delete on my table.

I can recover upto last quiesce point or to a RBA.
But how can I recover the table to a point much after the full backup/quiesce.

If someone tell me to recover the tablespace to a point just before a batch job started which has done some wrong insert/update/delete operation.
Is there any facilty in DB2, where I can recover tablespace upto a desired timestamp from log? Is DB2 stored the information of RBAs corresponding to timestamp for regular intervals??

Regards,
Prakash.


Regards,
Prakash.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
videlord
Beginner


Joined: 09 Dec 2004
Posts: 147
Topics: 19

PostPosted: Wed Jan 23, 2008 8:32 pm    Post subject: Reply with quote

DSNJU004, find a nearst checkpoind RBA/LSRN from the output
Recover to that point

but the data may be not clean.
Back to top
View user's profile Send private message
CraigG
Intermediate


Joined: 02 May 2007
Posts: 202
Topics: 0
Location: Viginia, USA

PostPosted: Wed Jan 23, 2008 10:13 pm    Post subject: Reply with quote

In the DB2 Utilities Guide read about REPORT utility -- REPORT RECOVERY
Back to top
View user's profile Send private message
pcsingh_2000
Beginner


Joined: 13 May 2003
Posts: 15
Topics: 6
Location: Kolkata

PostPosted: Wed Jan 30, 2008 8:19 am    Post subject: Reply with quote

Thanks a lot for valuable input
_________________
prakash c. singh
voice:00-91-93315 16675
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
pcsingh_2000
Beginner


Joined: 13 May 2003
Posts: 15
Topics: 6
Location: Kolkata

PostPosted: Fri Mar 07, 2008 9:02 am    Post subject: Reply with quote

I got a simillar request from my developement team, where I need to refresh the data from production, prior to one job run. I printed the BSDS and found the closest checkpoint when the job statred. Then I restored the development table from the backup before the job run in production and then applied the log to the RBA, I obtained from BSDS. Applying production data to development is done by OBIDXLAT parameter in Recover job (Platinum Utility). Here is the sample job that I ran:
Code:

//TSG10Z  JOB ,'RF-DSFITEMH',NOTIFY=TSG10,CLASS=L,MSGCLASS=O,
//         MSGLEVEL=(1,1),COND=(7,LT)
//*==============================================================
//LOADDUMM EXEC PGM=DSNUTILB,REGION=2M,
//         PARM='DSN2,TSG10LD,'
//STEPLIB  DD DSN=SYS1.DSN2.SDSNLOAD,DISP=SHR
//*==============================================================
//*        PARM='DSN2,TSG10LD,RESTART'  USE FOR RESTART
//*==============================================================
//SYSPRINT DD   SYSOUT=*
//UTPRINT  DD   SYSOUT=*
//SYSUDUMP DD   SYSOUT=*
//SORTWK01 DD DSN=TSG10.SORTWK01,
//         DISP=(,DELETE),
//         SPACE=(CYL,(5,5),,,ROUND),
//         UNIT=SYSDA
//SORTWK02 DD DSN=TSG10.SORTWK02,
//         DISP=(,DELETE),
//         SPACE=(CYL,(5,5),,,ROUND),
//         UNIT=SYSDA
//SORTWK03 DD DSN=TSG10.SORTWK03,
//         DISP=(,DELETE),
//         SPACE=(CYL,(5,5),,,ROUND),
//         UNIT=SYSDA
//SORTWK04 DD DSN=TSG10.SORTWK04,
//         DISP=(,DELETE),
//         SPACE=(CYL,(5,5),,,ROUND),
//         UNIT=SYSDA
//SOPCN DD DUMMY
//SSIXR DD DUMMY
//SYSUT1   DD DSN=TSG10.SYSUT1,
//         DISP=(,DELETE),
//         SPACE=(CYL,(5,5),,,ROUND),
//         UNIT=SYSDA
//SYSMAP   DD DSN=TSG10.SYSMAP,
//         DISP=(,DELETE),
//         SPACE=(CYL,(5,5),,,ROUND),
//         UNIT=SYSDA
//SYSERR   DD DSN=TSG10.SYSERR,
//         DISP=(,DELETE),
//         SPACE=(CYL,(5,5),,,ROUND),
//         UNIT=SYSDA
//SORTOUT DD DSN=TSG10.SORTOUT,
//        DISP=(,DELETE),
//        SPACE=(CYL,(5,5),,,ROUND),
//        UNIT=SYSDA
//SYSIN DD *
  LOAD DATA INDDN SOPCN REPLACE LOG NO
  INTO TABLE SPU08.T1OPCN
  REPAIR OBJECT
  SET TABLESPACE DSFITEMH.SOPCN NOCOPYPEND
  LOAD DATA INDDN SSIXR REPLACE LOG NO
  INTO TABLE SPU08.T1SIXR
  REPAIR OBJECT
  SET TABLESPACE DSFITEMH.SSIXR NOCOPYPEND
//*
//*=============================================================
//* PLATINUM FAST RECOVER
//*=============================================================
//STEP010  EXEC PROC=PL0002,REGN=20M,RESTART=RESTART(BYPASS),
//         SUBSYS=DSN2,COND=(4,LT)
//*=============================================================
//*
//PL000201.ST02MSG DD SYSOUT=U
//PL000201.SL02MSG DD SYSOUT=U
//PL000201.SOPCN DD DSN=CF1M.DHGDG.DSFITEM1.SOPCN.F001.G2264V00,
//         DISP=SHR
//PL000201.SSIXR DD DSN=CF1M.DHGDG.DSFITEM1.SSIXR.F001.G6855V00,
//         DISP=SHR
//PL000201.SYSIN DD *
 RECOVER
   SORT-LOG
   TABLESPACE DSFITEMH.SOPCN DSNUM ALL
   FULLDD SOPCN
   OBIDXLAT 9,265
   STARTRBA X'0A429A1313B9'
   ENDRBA   X'0A42B5E6D36C'
   NO-NEW-COPY
   TABLESPACE DSFITEMH.SSIXR DSNUM ALL
   FULLDD SSIXR
   OBIDXLAT 24,106
   STARTRBA X'0A4299A38F2A'
   ENDRBA   X'0A42B5E6D36C'
   NO-NEW-COPY
  ALLMSGS
  MAXTASKS 1
  RETAIN YES
  STARTUP-ACCESS FORCE
  SORTDEVT SYSDA
  SORTNUM 2
  ESTIMATED-RECS 50
  SPACE-DEFN YES
   REBUILD INDEX (ALL) TABLESPACE DSFITEMH.SOPCN
   ALLMSGS
   ESTIMATED-KEYS 2546928
   MAXTASKS 1
   SORTNUM 4
   SORTDEVT SYSDA
   SPACE-DEFN YES
   STARTUP-ACCESS FORCE
   REBUILD INDEX (ALL) TABLESPACE DSFITEMH.SSIXR
   ALLMSGS
   ESTIMATED-KEYS 859920
   MAXTASKS 1
   SORTNUM 4
   SORTDEVT SYSDA
   SPACE-DEFN YES
   STARTUP-ACCESS FORCE
//*
//*==============================================
//* RUNSTATS TARGET ENVIRONMENT
//RUNSTATS EXEC PGM=DSNUTILB,REGION=2M,COND=(4,LT),
//         PARM='DSN2,DSFITEMH,'
//STEPLIB  DD DSN=SYS1.DSN2.SDSNLOAD,DISP=SHR
//*===============================================================
//*        PARM='DSN2,DSFITEMH,RESTART'  USE FOR RESTART
//*===============================================================
//SYSPRINT DD  SYSOUT=*
//UTPRINT  DD  SYSOUT=*
//SYSUDUMP DD  SYSOUT=*
//SYSIN    DD  *
 RUNSTATS TABLESPACE DSFITEMH.SOPCN INDEX(ALL) SHRLEVEL REFERENCE
 RUNSTATS TABLESPACE DSFITEMH.SSIXR INDEX(ALL) SHRLEVEL REFERENCE



Regards!
Prakash.
_________________
prakash c. singh
voice:00-91-93315 16675
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group