| |
|
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.
|
 |

03-09-06, 06:29
|
|
Registered User
|
|
Join Date: Oct 2004
Location: Norway
Posts: 53
|
|
|
Restore into new database
|
|
I'm trying to do a socalled IMAGECOPY, extept this is on DB2 LUW 8.2 on Windows.
I've done a full offline backup and here's mu current environment:
DB = SDBT
Containers in D:\DBSPACE
I want to create a full copy of SDBT in the same instance, with the name SMIG. I also want SMIG to have its own containers under D:\SMIGSPACE
---
I've tried several commands from the manual, and the wizard in the GUI, but it always ends with either containers in use, or unknown system error.
---
A couple of questions.
- Should I use redirectet restore ?
- If yes, should I change the path for all system containers or only the custom ?
I've issued:
db2 restore database sdbt from d into smig redirect without prompting
db2 set .... (with the new path)
db2 restore sdbt continue
---
When I continue I get the different errors ...
Our DBA is not available till tomorrow, and we need a copy to work on.
Thank you in advance.
|
|

03-09-06, 07:22
|
|
Super Moderator
|
|
Join Date: Aug 2001
Location: UK
Posts: 4,534
|
|
Though I would always recommend redefining all containers, actaully only the custom ones require redefinition ..
When you say 'Container in use' which container is it complaiing about ... I remember to have experienced this atleast once in the past -- If one redirected restore fails midway - the next attempt complains - 'container in use' and the next attempt succeeds ..
Before you re-attempt the redirected restore, drop the database and also make sure the 'new' container is also deleted ... Otherwise, delete manually ...
HTH
Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
|
|

03-09-06, 08:36
|
|
Registered User
|
|
Join Date: Aug 2002
Location: Charlotte NC
Posts: 663
|
|
|
|
Quote:
|
Originally Posted by sathyaram_s
Though I would always recommend redefining all containers, actaully only the custom ones require redefinition ..
When you say 'Container in use' which container is it complaiing about ... I remember to have experienced this atleast once in the past -- If one redirected restore fails midway - the next attempt complains - 'container in use' and the next attempt succeeds ..
Before you re-attempt the redirected restore, drop the database and also make sure the 'new' container is also deleted ... Otherwise, delete manually ...
HTH
Sathyaram
|
Is it not true that in a redirected restore that the target DB needs to be created?
|
|

03-09-06, 08:46
|
|
Super Moderator
|
|
Join Date: Aug 2001
Location: UK
Posts: 4,534
|
|
No, you can restore as a new database
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
|
|

03-09-06, 09:09
|
|
Registered User
|
|
Join Date: Aug 2002
Location: Charlotte NC
Posts: 663
|
|
Quote:
|
Originally Posted by sathyaram_s
No, you can restore as a new database
|
is a full redirected restore tricker than restoring into a new DB?
|
|

03-09-06, 09:24
|
|
Super Moderator
|
|
Join Date: Aug 2001
Location: UK
Posts: 4,534
|
|
It depends what you mean 'tricker' ..
Generally I say 'No' ... Use 'WITHOUT PROMPTING' if you want to avoid manual intervention ..
Also, remember, if you are restoring to an exisiting db, the db cfg is retained as it is for the old db ,...
HTH
Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
|
|

03-10-06, 04:49
|
|
Registered User
|
|
Join Date: Oct 2004
Location: Norway
Posts: 53
|
|
I've struggled back and forth, but evry time I fix the container issues with a redirected restore, I get an unknown error.
I will come back with the solution if I find one. I'm suspecting the Federated Objects in the backup to be the source of some conflict.
|
|

03-10-06, 05:07
|
|
Super Moderator
|
|
Join Date: Aug 2001
Location: UK
Posts: 4,534
|
|
db2diag.log should give some clue on the error ..
Set the diaglevel dbm cfg to 4
Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
|
|

03-10-06, 13:14
|
|
Registered User
|
|
Join Date: Sep 2003
Posts: 237
|
|
Between successive redirected restores, you do not need to drop the database. You can just UNTAG the target (not the source)containers with db2untag -f FN where FN is the full filename. In a previous restore, the pages will have been created and in a large db it could take a long time. I refresh test db with prod data and i have had good luck with db2untag. I untag all test db container files.
__________________
mota
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|