If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > rollforward question?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-04-04, 16:15
M_RAS M_RAS is offline
Registered User
 
Join Date: Sep 2003
Location: canada
Posts: 230
rollforward question?

I am working with db2v7 and aix 4.3.3 .
I am going to restore from online backup that has been taken on july 29 , how can I found out which logs file I should use for rollforwarding and what is the sql command for rollforwarding.
thank you in advance for your help.
Reply With Quote
  #2 (permalink)  
Old 09-04-04, 19:20
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
db2 list history backup since 20040709 for database <dbname>

The output will show the 'first log file' you will need ....

Then you'll have to get all the logs since then for the rollforward to succeed ...

For the command, have a look in the command reference or google for 'db2 rollforward database'

Here's an example
rollforward database sample to end of logs and complete

HTH

Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 09-04-04, 20:03
M_RAS M_RAS is offline
Registered User
 
Join Date: Sep 2003
Location: canada
Posts: 230
Quote:
Originally Posted by sathyaram_s
db2 list history backup since 20040709 for database <dbname>

The output will show the 'first log file' you will need ....

Then you'll have to get all the logs since then for the rollforward to succeed ...

For the command, have a look in the command reference or google for 'db2 rollforward database'

Here's an example
rollforward database sample to end of logs and complete

HTH

Sathyaram
Hi Sathyaram,
let me I explaine more detail the senerio is

step1 :
1-I update tab1 set col1= xx and created table xx
2- I took online backup timestamp = xxxxxxxxxx
step2 :
1- I update tab1 set col2= YY and created table YY
2- I took online backup timestamp = YYYYYYYYYYY
step3 :
1- I update tab1 set col3= ZZ and created table ZZ
2- I took online backup timestamp = ZZZZZZZZZZZZ
I did ftp backp image YYYYYYYYYY and log file to another box and restored to database
as you told me when I rollforwarded form S000000004.LOG (I retrevied form history) by the end of log S00000009.log I have all updated from step 3!!!!!!
I do not want that I need just updated to end of step2.
Please help. thanks
Reply With Quote
  #4 (permalink)  
Old 09-05-04, 06:42
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Then you need to do point in time recovery ...

ROLLFORWARD DATABASE dbname to <iso-time> and complete

The iso time should be atleast the 'end-time' of the backup in step2 ...

HTH

Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #5 (permalink)  
Old 09-05-04, 10:55
M_RAS M_RAS is offline
Registered User
 
Join Date: Sep 2003
Location: canada
Posts: 230
Quote:
Originally Posted by sathyaram_s
Then you need to do point in time recovery ...

ROLLFORWARD DATABASE dbname to <iso-time> and complete

The iso time should be atleast the 'end-time' of the backup in step2 ...

HTH

Sathyaram
Thank you so much for your help Sathyaram
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On