By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,313 Members | 1,240 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,313 IT Pros & Developers. It's quick & easy.

Cannot redirect restore into a different database name.

P: n/a
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.
Jun 27 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On May 13, 2:13 pm, 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?
Not sure what redirect into means. Here is how I normally do what you
describe:

db2 restore db AAA from /DBBACKUP taken at 20080512100655 into BBB
redirect without rolling forward
/Lennart

>
Thanks.
Jun 27 '08 #2

P: n/a
Does the target database already exist? It is unique on the target system?

Larry E.

sh*************@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.
Jun 27 '08 #3

P: n/a
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)
Jun 27 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.