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 > URGENT-please help for restore

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-28-10, 10:02
db2cap db2cap is offline
Registered User
 
Join Date: May 2010
Posts: 87
URGENT-please help for restore

db2 "restore database xyz from Path_to_BackupDirectory into abc redirect generate script xyz.clp without rolling forward"
SQL2032N The "restore_mode" parameter is not valid. SQLSTATE=55039
Reply With Quote
  #2 (permalink)  
Old 09-28-10, 10:40
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
What DB2 version and OS are you using?

Andy
Reply With Quote
  #3 (permalink)  
Old 09-28-10, 10:42
db2cap db2cap is offline
Registered User
 
Join Date: May 2010
Posts: 87
db2 V9.1 FP7 and OS AIX 5.3
Reply With Quote
  #4 (permalink)  
Old 09-28-10, 10:49
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Does the abc database exist?

Andy
Reply With Quote
  #5 (permalink)  
Old 09-28-10, 10:52
nvk@vhv nvk@vhv is offline
Registered User
 
Join Date: Jan 2010
Posts: 294
You want to generate a script???
Try without "without rolling forward". It's not needed for script generation.
Reply With Quote
  #6 (permalink)  
Old 09-28-10, 10:55
db2cap db2cap is offline
Registered User
 
Join Date: May 2010
Posts: 87
abc database exist...
specifying without rolling forward as its coldbackup image
Reply With Quote
  #7 (permalink)  
Old 09-28-10, 10:56
db2cap db2cap is offline
Registered User
 
Join Date: May 2010
Posts: 87
tried without "without rolling forward" also, same error
Reply With Quote
  #8 (permalink)  
Old 09-28-10, 10:57
db2cap db2cap is offline
Registered User
 
Join Date: May 2010
Posts: 87
source database and target database are on same server but different instance and file system, so need to generate script
Reply With Quote
  #9 (permalink)  
Old 09-28-10, 11:14
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Try adding these clauses: "REPLACE EXISTING" and "WITHOUT PROMPTING".

Andy
Reply With Quote
  #10 (permalink)  
Old 09-29-10, 04:05
db2cap db2cap is offline
Registered User
 
Join Date: May 2010
Posts: 87
Thanks for all your replies friendz but nothing worked. I tried other alternative and that helped.

1. db2 " restore database xyz (skip into part) redirect generate script scriptname.clp without rolling forward"
2. modified the database name into which restored needs to be done in the script and that way it worked but it was not ready to take "INTO DBNAME' in the command itself.

Don't know what was wrong in that.
Reply With Quote
  #11 (permalink)  
Old 12-12-11, 04:30
angoca angoca is offline
Registered User
 
Join Date: Mar 2006
Location: Bogota, Colombia
Posts: 6
I had the same problem. In my case, there was an existing database with the same name in the machine (another version of the database)
The only way to solve the problem was to drop the old database.
But I have to admit that it is very weird, because you could probably want to create a second database based on the first one.
Reply With Quote
  #12 (permalink)  
Old 12-13-11, 02:02
wolaos123 wolaos123 is offline
Registered User
 
Join Date: Nov 2011
Location: Shen Zhen,China
Posts: 37
db2 "restore database xyz from Path_to_BackupDirectory into abc redirect generate script xyz.clp without rolling forward"

changing to :

db2 "restore database abc from Path_to_BackupDirectory redirect generate script xyz.clp"

then it will work.
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