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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-14-09, 15:23
claskowski claskowski is offline
Registered User
 
Join Date: Apr 2007
Posts: 3
Exclamation Redirected Restore

I am attempting to clone my production database to a backup/test server.

I have an on-line backup (logs included) of my production v9.1 Fixpack 2 LUW ESE database running on a Window 2003 Server. The data for the production db is stored in the following directory structure e:\db2data\db2\node0000\proddb\t000000n\filename.

The server that will house the cloned db does not have an E: drive and has a database named testdb with no user defined tablespaces created.

From reading several articles and books, I believe the following statements will need to be run on the cloned machine --

connect to testdb user user_id using password;

restore db proddb from d:\db2backups to testdb redirect; (there will only be one backup file in this directory)

set tablespace containers for 0 using (path 'd:\db2\node0000\testdb\T0000000');
set tablespace containers for 1 using (path 'd:\db2\node0000\testdb\T0000001');
set tablespace containers for 2 using (path 'd:\db2\node0000\testdb\T0000002');
...
set tablsepace containter for n using (path 'd:\db2\node0000\testdb\t000000n');

restore db proddb continue;

Are the above commands correct? Am I missing anything?

Thank you
Reply With Quote
  #2 (permalink)  
Old 12-14-09, 15:28
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
The commands are basically correct, except do not connect to the database just before you try to restore to it. The restore will fail. The first restore command (not the continue after the set tabslespace container line) may need more options depending on your setup.

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