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 a backup

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-16-04, 08:55
npierri npierri is offline
Registered User
 
Join Date: Jul 2004
Posts: 6
Exclamation restore a backup

I have a problem

I have a full backup (done with control center) and a new server.
Im trying to restore the backup but I cant. I use the control center to restor but it give me errors about timestamp and the database alias.
Ive checked and the timestamp is correct.

Can Anyone help me?

What are the correct steps?

I only have the backup
Reply With Quote
  #2 (permalink)  
Old 11-16-04, 09:19
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Reply With Quote
  #3 (permalink)  
Old 11-16-04, 09:38
npierri npierri is offline
Registered User
 
Join Date: Jul 2004
Posts: 6
sorry

sorry it was so urgent that I forgot to put info

Its a clean install
Windows 2000 advance server
DB2 8.1 Express

I have a full backup done with control center

Archivo:
165744.001

Directorio:
D:\Backup\pepe.0\DB2\NODE0000\CATN0000\20041112

commands::

RESTORE DATABASE pepe FROM "D:\Backup\pepe.0\DB2\NODE0000\CATN0000\200411 12\" TAKEN AT 20041112165744 TO "D:" INTO pepe2 NEWLOGPATH "D:\DB2\" WITH 2 BUFFERS BUFFER 1024 PARALLELISM 1 WITHOUT PROMPTING;




error

SQL2542N No match for a database image file was found based on
the source database alias "pepe" and timestamp
"20041112165744" provided.

Explanation:

The backup image file filename consists of a database alias and a
timestamp component. A filename is constructed from the source
database alias and timestamp parameters provided in the Database
Restore call. No filename existed in the source directory that
matched based on the source database alias and timestamp
provided. If this error was received from an automatic
incremental restore then a required image was not found based on
the timestamp and location in the database history.

User Response:

Ensure that the database backup image resides on the media
source. Resubmit the operation by specifying a correct timestamp
to result in a match.

If this error was received from an automatic incremental restore,
check the database history for the corresponding backup entry
and verify that the location listed matches the actual location
of the backup image. Either update the database history and
retry the operation to result in a match or issue a RESTORE
INCREMENTAL ABORT command to cleanup any resources that may have
been created during processing.
Reply With Quote
  #4 (permalink)  
Old 11-16-04, 09:46
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Try this:
Code:
RESTORE DATABASE pepe FROM "D:\Backup\" TAKEN AT ...
Reply With Quote
  #5 (permalink)  
Old 11-16-04, 09:56
npierri npierri is offline
Registered User
 
Join Date: Jul 2004
Posts: 6
Quote:
Originally Posted by n_i
Try this:
Code:
RESTORE DATABASE pepe FROM "D:\Backup\" TAKEN AT ...

????
Ive done that

that is the command that i wrote
Reply With Quote
  #6 (permalink)  
Old 11-16-04, 10:11
npierri npierri is offline
Registered User
 
Join Date: Jul 2004
Posts: 6
thanks it worked
my life is save now
Reply With Quote
  #7 (permalink)  
Old 11-01-05, 13:45
JDionne JDionne is offline
Registered User
 
Join Date: Aug 2002
Location: Charlotte NC
Posts: 663
Quote:
Originally Posted by npierri
thanks it worked
my life is save now

Can anyone post the corrected code as an example. I have been fighting a very similar problem all day and cant seem to find a working example
__________________
------------
And back to SQL Server....I always find my way home
View my Linkedin profile
Reply With Quote
  #8 (permalink)  
Old 11-01-05, 13:52
Marcus_A Marcus_A is online now
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Quote:
Originally Posted by JDionne
Can anyone post the corrected code as an example. I have been fighting a very similar problem all day and cant seem to find a working example
The trick is to use the correct (shortened) directory path in Windows. Look carefully at the path statements in the backup and restore above to figure it out.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #9 (permalink)  
Old 11-01-05, 14:03
JDionne JDionne is offline
Registered User
 
Join Date: Aug 2002
Location: Charlotte NC
Posts: 663
what if i move the file to f:\backup ?
my code
db2 restore database NAMTEST from f:\backup taken at 20051028165340 to FB2TEST into NAMTEST Redirect
__________________
------------
And back to SQL Server....I always find my way home
View my Linkedin profile
Reply With Quote
  #10 (permalink)  
Old 11-01-05, 14:10
J Petruk J Petruk is offline
Registered User
 
Join Date: Mar 2004
Location: Toronto, ON, Canada
Posts: 513
Quote:
Originally Posted by JDionne
what if i move the file to f:\backup ?
my code
db2 restore database NAMTEST from f:\backup taken at 20051028165340 to FB2TEST into NAMTEST Redirect
DB2 on Windows needs the full path structure to be in place, but only wants the top level directory in the command.

It won't work any other way.
__________________
--
Jonathan Petruk
DB2 Database Consultant
Reply With Quote
  #11 (permalink)  
Old 11-01-05, 14:16
JDionne JDionne is offline
Registered User
 
Join Date: Aug 2002
Location: Charlotte NC
Posts: 663
so I need on the server
f:\namdwh.0\db2test\node0000\catn0000\
but i only put f:\namdwh.0?
__________________
------------
And back to SQL Server....I always find my way home
View my Linkedin profile
Reply With Quote
  #12 (permalink)  
Old 11-01-05, 15:49
J Petruk J Petruk is offline
Registered User
 
Join Date: Mar 2004
Location: Toronto, ON, Canada
Posts: 513
Quote:
Originally Posted by JDionne
so I need on the server
f:\namdwh.0\db2test\node0000\catn0000\
but i only put f:\namdwh.0?
You'd actually only put f:\ in that case.

Although I expect you'd want a sub directory, ie. f:\backup or something like that.

ie. f:\backup\namdwh.0\db2test\node0000\catn0000\

and supply f:\backup to the command.
__________________
--
Jonathan Petruk
DB2 Database Consultant
Reply With Quote
  #13 (permalink)  
Old 11-01-05, 16:18
JDionne JDionne is offline
Registered User
 
Join Date: Aug 2002
Location: Charlotte NC
Posts: 663
my code:


D:\Program Files\IBM\SQLLIB\BIN>db2 restore database NAMTEST user db2admin using 29DmJj13 from f:\NAMDWH.0 taken at 20051028165340 to f:\DB2TEST into NAMTEST redirect

my error:
SQL2542N No match for a database image file was found based on the source
database alias "NAMTEST" and timestamp "20051028165340" provided.

I have moved the backup file under its native file directory of F:\NAMDWH.0\DB2TEST\NODE0000\CATN0000\20051028

The file name is 165340.001

I realy dont know what I am doing wrong. It has to be something simple...
__________________
------------
And back to SQL Server....I always find my way home
View my Linkedin profile
Reply With Quote
  #14 (permalink)  
Old 11-01-05, 16:28
J Petruk J Petruk is offline
Registered User
 
Join Date: Mar 2004
Location: Toronto, ON, Canada
Posts: 513
Read my last post again...

FROM f:\NAMDWH.0 won't work.

from f:\ should.
__________________
--
Jonathan Petruk
DB2 Database Consultant
Reply With Quote
  #15 (permalink)  
Old 11-01-05, 16:30
JDionne JDionne is offline
Registered User
 
Join Date: Aug 2002
Location: Charlotte NC
Posts: 663
I have to be overlooking something because by changing my code to "From f:\" I recieved the same error.

Is this case sensitive? Is there a way to validate my backup image?
__________________
------------
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