I just discovered a problem with the database restore. The tablespaces seems to keep their native path (the path on the DEV server).
Here is how the restore is done right now :
E:\DB2
S001\NODE0000\DO
S015\
.................\T0000005\
.................\T0000006\
..................SQLCRT.FLG
E:\DB2
D001\DO
D015\
.................\SMS_ST01\
.................\SMS_UR01\
.................\SMS_UR01\
.................\SYSCATSPACE\
..................SQLCRT.FLG
I would like to have all files located in the same directory instead of keeping the DEV instance name :
E:\DB2
S001\NODE0000\DO
S015\
I tried using the REDIRECT RESTORE functionnality but I'm not sure about this step :
Quote:
2. Issue a SET TABLESPACE CONTAINERS command for each table space whose containers you want to redefine. For example, in a Windows® environment:
db2 set tablespace containers for 5 using (file 'f:\ts3con1'20000, file 'f:\ts3con2'20000)
To verify that the containers of the restored database are the ones specified in this step, issue the LIST TABLESPACE CONTAINERS command for every table space whose container locations are being redefined.
|
Taken from :
IBM DB2 9.5 Information Center for Linux, UNIX, and Windows
Here is the command I used :
Code:
db2 RESTORE DATABASE DOD015 FROM "E:\BACKUP" TAKEN AT 20100628140601 TO "E:" INTO DOS015 REDIRECT WITHOUT PROMPTING
Anyone could assist please?
Thank you very much
C