On May 13, 11:09*am, Larry <la...@nospam.netwrote:
Does the target database already exist? It is unique on the target system?
Larry E.
sharon.zhang...@gmail.com wrote:
Hi,
I'm using the following command to redirect restore from source
database AAA into target database BBB:
db2 restore db AAA from /DBBACKUP taken at 20080512100655 redirect
into BBB without rolling forward
Why does it always restore into AAA instead of BBB? What's wrong with
my command?
Thanks.- Hide quoted text -
- Show quoted text -
Try something like this:
RESTORE DATABASE AAA FROM /DBBACKUP taken at 20080512100655 TO /
Newlocation INTO BBB REDIRECT WITHOUT PROMPTING
-- Use list tablespace containers commands to obtain a list of
containers
-- Change the directory for the containers for the new location.
--
SET TABLESPACE CONTAINERS FOR 0 USING (PATH "/DB2/NODE0000/SQL00003/
SQLT0000.0")
SET TABLESPACE CONTAINERS FOR 1 USING (PATH "/DB2/NODE0000/SQL00003/
SQLT0001.0")
SET TABLESPACE CONTAINERS FOR 2 USING (PATH "/DB2/NODE0000/SQL00003/
SQLT_U4K_TMWIN.0")
SET TABLESPACE CONTAINERS FOR 3 USING (PATH "/DB2/NODE0000/SQL00003/
SQLT_U8K_TMWIN.0")
SET TABLESPACE CONTAINERS FOR 4 USING (PATH "/DB2/NODE0000/SQL00003/
SQLT9001.0")
SET TABLESPACE CONTAINERS FOR 5 USING (PATH "/DB2/NODE0000/SQL00003/
SQLT9002.0")
SET TABLESPACE CONTAINERS FOR 6 USING (PATH "/DB2/NODE0000/SQL00003/
SYSTOOLSPACE")
RESTORE DATABASE AAA CONTINUE
ROLLFORWARD DATABASE BBB TO END OF LOGS AND COMPLETE OVERFLOW LOG PATH
(/DB2BAK/DB2LOGS/DB2/GRIMSHAW/NODE0000/C0000001)