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 > Backup - Restore

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-04-04, 12:47
Darsh Darsh is offline
Registered User
 
Join Date: Jan 2004
Posts: 23
Backup - Restore

DB2 version = 6.1
Operating sys = NT 4.0

There are two different Servers.

Production & Test.

I took online backup of the Production database.

While I took this backup, I provided location of the TEST Servers's backup folder.

Becuase I don't have sufficient space on Production box to keep any extra backup.

Now, I want to Restore Production database backup to the Test Server - Database and I'm using this command.

(1) RESTORE DATABASE SIEBPDB FROM F:\\DBBackup TAKEN AT 20040123143142 WITH 2 BUFFERS BUFFER 1024 WITHOUT PROMPTING
OR
RESTORE DATABASE SIEBTDB FROM D:\\DBBackup\Siebpdb.0\Db2\Node0000\Catn0000 TAKEN AT 20040123143142 WITH 2 BUFFERS BUFFER 1024 WITHOUT PROMPTING

Getting this error for both commands:

Error : SQL2542N No match for a database image file was found based on the source
database alias and timestamp provided.

How to come out from this problem ?
Please advice.
Reply With Quote
  #2 (permalink)  
Old 02-04-04, 12:54
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Re: Backup - Restore

In the from portion

D:\\DBBackup\

will do ... DB2 builds the rest of the path

Cheers

Cheers
Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 02-04-04, 13:04
Darsh Darsh is offline
Registered User
 
Join Date: Jan 2004
Posts: 23
I also tried the following command but getting the same error.

RESTORE DATABASE SIEBTDB FROM D:\\DBBackup\ TAKEN AT 20040123143142 WITH 2 BUFFERS BUFFER 1024 WITHOUT PROMPTING
Reply With Quote
  #4 (permalink)  
Old 02-04-04, 13:06
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Re: Backup - Restore

Quote:
Originally posted by Darsh
DB2 version = 6.1
Operating sys = NT 4.0

There are two different Servers.

Production & Test.

I took online backup of the Production database.

While I took this backup, I provided location of the TEST Servers's backup folder.

Becuase I don't have sufficient space on Production box to keep any extra backup.

Now, I want to Restore Production database backup to the Test Server - Database and I'm using this command.

(1) RESTORE DATABASE SIEBPDB FROM F:\\DBBackup TAKEN AT 20040123143142 WITH 2 BUFFERS BUFFER 1024 WITHOUT PROMPTING
OR
RESTORE DATABASE SIEBTDB FROM D:\\DBBackup\Siebpdb.0\Db2\Node0000\Catn0000 TAKEN AT 20040123143142 WITH 2 BUFFERS BUFFER 1024 WITHOUT PROMPTING

Getting this error for both commands:

Error : SQL2542N No match for a database image file was found based on the source
database alias and timestamp provided.

How to come out from this problem ?
Please advice.
I think since the database names are different you should use "RESTORE ... INTO":

RESTORE DB SIEBPDB TAKEN AT ... INTO SIEBTDB WITH 2 BUFFERS ...
Reply With Quote
  #5 (permalink)  
Old 02-04-04, 13:08
Darsh Darsh is offline
Registered User
 
Join Date: Jan 2004
Posts: 23

Last edited by Darsh; 02-05-04 at 12:08.
Reply With Quote
  #6 (permalink)  
Old 02-04-04, 13:23
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Have you tried to use your control centre

RESTORE DATABASE SIEBPDB FROM F:\\DBBackup into siebtdb TAKEN AT 20040123143142 WITH 2 BUFFERS BUFFER 1024 WITHOUT PROMPTING

If you have only one image in the path, you can even omit the taken at timestamp clause ...

You can get the command from command reference or by typing in db2 ? restore

or use the control centre

Cheers
Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #7 (permalink)  
Old 02-04-04, 13:27
dollar489 dollar489 is offline
Registered User
 
Join Date: Sep 2002
Posts: 456
Re: Backup - Restore

First of all, as the error message says the timestmap you are providing is wrong, so check that. Second here are the commands to do redirect restore...these are generic and you should edit them to your needs...


--===========================
-- Restore database redirect
--===========================

1. Restore using the redirect option
e.g.

RESTORE DATABASE PROD
FROM d:\backup
INTO MTEST
NEWLOGPATH d:\TEST\logs
REDIRECT
;


2. Set tablespace containers
e.g.

set tablespace containers for 0 using (path 'd:\TEST\syscat\')
;
set tablespace containers for 1 using (path 'd:\TEST\tmp\')
;
set tablespace containers for 2 using (path 'd:\TEST\user1\')
;

3. Continue the restore process
e.g.

restore database PROD continue

4. Rollforward Query Status
e.g.
rollforward database PROD query status

5. Rollforward the database
e.g.
rollforward database TEST to <timestamp> and complete overflow log path 'd:\dir-name'


Hope this helps.

dollar

Quote:
Originally posted by Darsh
DB2 version = 6.1
Operating sys = NT 4.0

There are two different Servers.

Production & Test.

I took online backup of the Production database.

While I took this backup, I provided location of the TEST Servers's backup folder.

Becuase I don't have sufficient space on Production box to keep any extra backup.

Now, I want to Restore Production database backup to the Test Server - Database and I'm using this command.

(1) RESTORE DATABASE SIEBPDB FROM F:\\DBBackup TAKEN AT 20040123143142 WITH 2 BUFFERS BUFFER 1024 WITHOUT PROMPTING
OR
RESTORE DATABASE SIEBTDB FROM D:\\DBBackup\Siebpdb.0\Db2\Node0000\Catn0000 TAKEN AT 20040123143142 WITH 2 BUFFERS BUFFER 1024 WITHOUT PROMPTING

Getting this error for both commands:

Error : SQL2542N No match for a database image file was found based on the source
database alias and timestamp provided.

How to come out from this problem ?
Please advice.
Reply With Quote
  #8 (permalink)  
Old 02-05-04, 01:43
ashaq ashaq is offline
Registered User
 
Join Date: Dec 2003
Posts: 39
redirect

Please check the following commond and customise it according to ur need

db2 restore db nc3db from /nc3temp to /db2/db200001/dbnc3db into nc3db redirect without rolling forward without prompting;
db2 "set tablespace containers for 0 using (path '/db2/db200001/dbnc3db/db200001/NODE0000/SQL00001/SQLT0000.0')"
db2 "set tablespace containers for 1 using (path '/db2/db200001/dbnc3db/db200001/NODE0000/SQL00001/SQLT0001.0')"
db2 "set tablespace containers for 3 using (path '/db2/db200001/dbnc3db/db200001/NODE0000/SQL00001/SQLT0002.0')"
Reply With Quote
  #9 (permalink)  
Old 02-05-04, 12:04
Darsh Darsh is offline
Registered User
 
Join Date: Jan 2004
Posts: 23
I'm getting this error :

"Bad container"

Do you suggest to use MOVE ?

If so, how to ?
Reply With Quote
  #10 (permalink)  
Old 02-05-04, 12:12
Darsh Darsh is offline
Registered User
 
Join Date: Jan 2004
Posts: 23
RESTORE DATABASE SIEBPDB FROM \\CMD0CLA\Backup TAKEN AT 20040204230004 INTO WRKSIEB WITH 2 BUFFERS BUFFER 1024 WITHOUT PROMPTING ;


ERror :

SQL0298N Bad container path. SQLSTATE=428B2
Reply With Quote
  #11 (permalink)  
Old 02-05-04, 12:12
dollar489 dollar489 is offline
Registered User
 
Join Date: Sep 2002
Posts: 456
Check that the path you specify is in right format

dollar

Quote:
Originally posted by Darsh
I'm getting this error :

"Bad container"

Do you suggest to use MOVE ?

If so, how to ?
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