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 > Redirected Restore Error

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-07-06, 08:39
JDionne JDionne is offline
Registered User
 
Join Date: Aug 2002
Location: Charlotte NC
Posts: 663
Redirected Restore Error

I am having problems with my redirected restore. I am restoring a DB using a backup from another DB.
The error that I am getting is:
Code:
SQL2542N  No match for a database image file was found based on the source
database alias "NAMDWH" and timestamp "" provided.
and the code is:
Code:
restore database NAMDWH user DB2admin using ******** from F:\20060301 to G: into NAMDWH redirect;
Has anyone seen this? Does any one have any thoughts on how to get around this?
__________________
------------
And back to SQL Server....I always find my way home
View my Linkedin profile
Reply With Quote
  #2 (permalink)  
Old 03-07-06, 08:49
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Try F:\ instead of F:\20060301 .. If you have more than one backup in f:\, then include the TAKEN AT Clause in the RESTORE Command.

BTW, is F:\ a local drive ?

Cheers
Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 03-07-06, 09:26
przytula przytula is offline
Registered User
 
Join Date: Nov 2004
Posts: 374
restore

If you backup a db to F:\backup there will be a directory f:\backup\instance\dbname.0\node...
the ideal is to create the same directory structure on target
note : create directories in command window, because explorer will do casemapping....
restore from f:\backup taken at xxxx
__________________
Best Regards, Guy Przytula
DB2/ORA/SQL Services
DB2 DBA & Advanced DBA Certified
DB2 Dprop Certified
http://users.skynet.be/przytula/dbss.html
Reply With Quote
  #4 (permalink)  
Old 03-07-06, 10:26
jhehir jhehir is offline
Registered User
 
Join Date: Mar 2005
Posts: 9
Don't forget to reference the database that was backed up not the database you might be restoring into.
Reply With Quote
  #5 (permalink)  
Old 03-07-06, 10:26
jhehir jhehir is offline
Registered User
 
Join Date: Mar 2005
Posts: 9
Don't forget to reference the database that was backed up not the database you might be restoring into.
Reply With Quote
  #6 (permalink)  
Old 03-07-06, 11:51
JDionne JDionne is offline
Registered User
 
Join Date: Aug 2002
Location: Charlotte NC
Posts: 663
Quote:
Originally Posted by sathyaram_s
Try F:\ instead of F:\20060301 .. If you have more than one backup in f:\, then include the TAKEN AT Clause in the RESTORE Command.

BTW, is F:\ a local drive ?

Cheers
Sathyaram
Yes F us a local drive. Unfortunatly I got the same error
__________________
------------
And back to SQL Server....I always find my way home
View my Linkedin profile
Reply With Quote
  #7 (permalink)  
Old 03-07-06, 15:26
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
What was the backup command that you used?
Reply With Quote
  #8 (permalink)  
Old 03-08-06, 09:57
dbamota dbamota is offline
Registered User
 
Join Date: Sep 2003
Posts: 237
db2ckbkup -h filename will give you the image name expected by the restore utility. 'filename' in your case is 200....... Use that name instead of F:\...
__________________
mota
Reply With Quote
  #9 (permalink)  
Old 03-09-06, 07:16
JDionne JDionne is offline
Registered User
 
Join Date: Aug 2002
Location: Charlotte NC
Posts: 663
Quote:
Originally Posted by dbamota
db2ckbkup -h filename will give you the image name expected by the restore utility. 'filename' in your case is 200....... Use that name instead of F:\...

Should I run this on the server were the backup was taken or on the server that I am trying to restore it on?
__________________
------------
And back to SQL Server....I always find my way home
View my Linkedin profile
Reply With Quote
  #10 (permalink)  
Old 03-09-06, 07:41
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Wherever you file is ...

Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #11 (permalink)  
Old 03-09-06, 08:33
JDionne JDionne is offline
Registered User
 
Join Date: Aug 2002
Location: Charlotte NC
Posts: 663
Quote:
Originally Posted by sathyaram_s
Wherever you file is ...

Sathyaram
I have done a search for the command db2ckbkup. That command is not on my server. I get the following error. Is this a UNIX only command?

Code:
D:\Program Files\IBM\SQLLIB>db2ckbkup -h I:\NamBackups\FULL\NAMDWH.0\DB2\NODE000
0\CATN0000\20060301\081853.001
'db2ckbkup' is not recognized as an internal or external command,
operable program or batch file.
__________________
------------
And back to SQL Server....I always find my way home
View my Linkedin profile
Reply With Quote
  #12 (permalink)  
Old 03-09-06, 15:08
dbamota dbamota is offline
Registered User
 
Join Date: Sep 2003
Posts: 237
The command is db2ckbkp(runs on windows also). Please look in Command reference(db2n0x82)
__________________
mota
Reply With Quote
  #13 (permalink)  
Old 03-09-06, 15:56
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by JDionne

Code:
D:\Program Files\IBM\SQLLIB>db2ckbkup -h I:\NamBackups\FULL\NAMDWH.0\DB2\NODE0000\CATN0000\20060301\081853.001
'db2ckbkup' is not recognized as an internal or external command,
operable program or batch file.
Copy the entire directory branch beginning with NAMDWH.0 onto the target system, say, into F:\RESTORE. The result should be
Code:
F:\RESTORE\NAMDWH.0\DB2\NODE0000\CATN0000\20060301\081853.001
Then issue RESTORE ... FROM F:\RESTORE...
Reply With Quote
  #14 (permalink)  
Old 03-13-06, 10:51
JDionne JDionne is offline
Registered User
 
Join Date: Aug 2002
Location: Charlotte NC
Posts: 663
I have found that in a windows environment you will have to duplicate the path from where the original backup was taken. I dont know if the drive leter must also be the same, but I now know that the folders have to be the same as to were you told the DB to backup the DB. I backed up to \nambackups\full. thats what I had to put in the restore script, not all the way to the file just what i put in the backup script. HTH others in the future.
__________________
------------
And back to SQL Server....I always find my way home
View my Linkedin profile
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