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 > regarding restore db statement

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-14-07, 03:16
sree1030 sree1030 is offline
Registered User
 
Join Date: Jul 2007
Location: Bangalore
Posts: 18
regarding restore db statement

Hello friends,

i have some problem when issuing this command, just want to know is this valid or not:

"" db2 restore db ntdbb from /dev/backup into ntdb2 taken at 20061222054454 without rolling forward without prompting""

here i want to change the database name also. so, i given ""into ntdb2"

can any one plz...

Thanks & Regards
Reply With Quote
  #2 (permalink)  
Old 11-14-07, 08:27
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
First what version of DB2 and OS are you using? Second, what is the exact problem you are having? Third, does ntdb2 already exist on the server?

Andy
Reply With Quote
  #3 (permalink)  
Old 11-15-07, 00:13
sree1030 sree1030 is offline
Registered User
 
Join Date: Jul 2007
Location: Bangalore
Posts: 18
i am using db2 udb v8.1 with redhat enterprise linux4.1,

suppose to restore the database, before this i used the following commands:

# db2 restore db ntdbb /dev/backup into ntdb2 comprlib /home/db2inst1/sqllib/lib/libdb2compr.so;

# db2 rollforward db ntdb2;

# db2 rollforward db ntdb2 to end of logs;

In this case it shows an error message "" SQL4970N roll-forward requery on db "ntdb2" cannot reach the specified stop point (end-of-log 'or' point-in-time) bcz of missing log file(s) on node(s) "0" ""

I checked the specified directory for log files but i didn't found any thing there...

so, i tryed to use the above command to restore database....

the ntdb2 isn't exist....
Reply With Quote
  #4 (permalink)  
Old 11-15-07, 02:54
sueamus sueamus is offline
Registered User
 
Join Date: Apr 2007
Posts: 26
You have to create database ntdb2 before restoring into it.Do you have this created already?If not, create it first then run your restore command again.
Reply With Quote
  #5 (permalink)  
Old 11-15-07, 08:03
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Actually, you do not need to have the NTDB2 DB already existing before you do the restore, just include the clause: TO <target directory>.

The actual problem you are having is that you are missing the necessary logs to properly do the restore. If the backup was done with the INCLUDE LOGS clause, you need to use the LOGTARGET clause on the restore to extract the log files.

HTH

Andy
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