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 > restore to a new database

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-12-04, 11:30
githareddyg githareddyg is offline
Registered User
 
Join Date: Jan 2004
Posts: 3
restore to a new database

Hi,
We just established DB2 shop. Need help in implementing a standby database. I am thinking of taking a weekly backup image and use user exit program to copy the log files. In case of hardware disaster i want to restore the backup image to the new box and apply the log files. I am testing this now, i am able to restore the backup image but unable to apply the log files. used the following command.
db2 "rollforward database testp OVERFLOW LOG PATH (/mnt/dsk2/backup/LOGS)"

It comes out with the following message.

Rollforward Status

Input database alias = testp
Number of nodes have returned status = 1

Node number = 0
Rollforward status = DB pending
Next log file to be read = S0000000.LOG
Log files processed = -
Last committed transaction = 2003-12-23-13.12.35.000000

It didnot apply any log files.
Please let me know where I am doing wrong. I think it is something to do with the "Next log file to be read".
Thanks
gg
Reply With Quote
  #2 (permalink)  
Old 01-12-04, 12:08
preetim preetim is offline
Registered User
 
Join Date: Jun 2003
Posts: 77
Re: restore to a new database

The rollforward operation will be in pending state till you add in the command "and complete" phrase. Stop/Complete both are supposed to do the same. So if you give the command -
"rollforward database testp to end of logs and complete OVERFLOW LOG PATH (/mnt/dsk2/backup/LOGS)" , it should work.


Quote:
Originally posted by githareddyg
Hi,
We just established DB2 shop. Need help in implementing a standby database. I am thinking of taking a weekly backup image and use user exit program to copy the log files. In case of hardware disaster i want to restore the backup image to the new box and apply the log files. I am testing this now, i am able to restore the backup image but unable to apply the log files. used the following command.
db2 "rollforward database testp OVERFLOW LOG PATH (/mnt/dsk2/backup/LOGS)"

It comes out with the following message.

Rollforward Status

Input database alias = testp
Number of nodes have returned status = 1

Node number = 0
Rollforward status = DB pending
Next log file to be read = S0000000.LOG
Log files processed = -
Last committed transaction = 2003-12-23-13.12.35.000000

It didnot apply any log files.
Please let me know where I am doing wrong. I think it is something to do with the "Next log file to be read".
Thanks
gg
Reply With Quote
  #3 (permalink)  
Old 01-12-04, 13:06
githareddyg githareddyg is offline
Registered User
 
Join Date: Jan 2004
Posts: 3
Re: restore to a new database

Thanks for the reply preetim. It worked.
Now i am getting following error. I want to stop rollforward at this stage and want to use the DB. Can you please let me know what to do next.


SQL1268N Roll-forward recovery stopped due to error "24" while retrieving log
file "S0000018.LOG" for database "TESTP" on node "0".

Thanks
Reply With Quote
  #4 (permalink)  
Old 01-12-04, 19:08
preetim preetim is offline
Registered User
 
Join Date: Jun 2003
Posts: 77
Re: restore to a new database

Looks like your roll forward needs S00000018.LOG file which is damaged or not found in your log path. You can check if this log file is present in your log path or not. Try to make it available.
Otherwise, instead of roll forward to end of logs, you can specify certain time up to which the log files are present in your log path.
Hope it helps.

Quote:
Originally posted by githareddyg
Thanks for the reply preetim. It worked.
Now i am getting following error. I want to stop rollforward at this stage and want to use the DB. Can you please let me know what to do next.


SQL1268N Roll-forward recovery stopped due to error "24" while retrieving log
file "S0000018.LOG" for database "TESTP" on node "0".

Thanks
Reply With Quote
  #5 (permalink)  
Old 01-12-04, 19:12
preetim preetim is offline
Registered User
 
Join Date: Jun 2003
Posts: 77
Re: restore to a new database

Rolling forward up to certain time may not work now in your current scenario since you've already attempted to rollforward till end of logs.
If you were just doing it for testing purpose, you can start over again and do a roll forward up to a point in time.


Quote:
Originally posted by preetim
Looks like your roll forward needs S00000018.LOG file which is damaged or not found in your log path. You can check if this log file is present in your log path or not. Try to make it available.
Otherwise, instead of roll forward to end of logs, you can specify certain time up to which the log files are present in your log path.
Hope it helps.
Reply With Quote
  #6 (permalink)  
Old 01-13-04, 15:02
githareddyg githareddyg is offline
Registered User
 
Join Date: Jan 2004
Posts: 3
Thanks for the info.
gg
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