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 > Problem with RESTORE

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-28-10, 10:17
ororo ororo is offline
Registered User
 
Join Date: Nov 2010
Posts: 8
Red face Problem with RESTORE

Dear all,
I have a problem during a restore operation.
I have a db PANTH01, on the instance PANTH01, and a db PANTH02 on the instance PANTH02. I made a backup of PANTH01 db and I have to restore it into the db PANTH02. However the restore failed.

To be precise, I tried to perform the following commands:

Code:
set db2instance=panth02
db2 stop dbm force
db2 start dbm
db2 RESTORE DATABASE PANTH01 FROM D:\Restore TO D: INTO PANTH02 WITH 2 BUFFERS BUFFER 1024 REDIRECT PARALLELISM 1 WITHOUT PROMPTING
db2 SET TABLESPACE CONTAINERS FOR 0 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING(PATH "D:\PANTHERA\PANTH02\DB2TBSPC\System")
db2 SET TABLESPACE CONTAINERS FOR 1 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING(PATH "D:\PANTHERA\PANTH02\DB2TBSPC\Temp")
db2 SET TABLESPACE CONTAINERS FOR 2 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING(PATH "D:\PANTHERA\PANTH02\DB2TBSPC\User")
db2 SET TABLESPACE CONTAINERS FOR 3 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING(PATH "D:\PANTHERA\PANTH02\DB2TBSPC\finance")
db2 SET TABLESPACE CONTAINERS FOR 4 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING(PATH "D:\PANTHERA\PANTH02\DB2TBSPC\PDAT")
db2 SET TABLESPACE CONTAINERS FOR 5 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING(PATH "D:\PANTHERA\PANTH02\DB2TBSPC\PTMP")
db2 SET TABLESPACE CONTAINERS FOR 6 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING(PATH "D:\PANTHERA\PANTH02\db2tbspc\DocDgt")
db2 SET TABLESPACE CONTAINERS FOR 7 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING(PATH "D:\PANTHERA\PANTH02\db2tbspc\DocDgtOgg")    (*)
db2 RESTORE DATABASE PANTH01 CONTINUE
The first commands are successful. When I arrive to (*), the following error happens:

Code:
SQL0294N  The container is already in use.  SQLSTATE=42730
I tried to use db2untag to unlock such a container, but it didn't work too:

Code:
db2untag -f "C:\PANTHERA\PANTH02\db2tbspc\DocDgtOgg"

Using file <C:\PANTHERA\PANTH02\db2tbspc\DocDgtOgg>

ERROR: Access denied.
Do you have any idea? thank you!
Reply With Quote
  #2 (permalink)  
Old 12-28-10, 10:27
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
What's inside DocDgtOgg? SQLTAG.NAM? Try renaming DocDgtOgg and then redo the restore.
Reply With Quote
  #3 (permalink)  
Old 12-29-10, 03:37
ororo ororo is offline
Registered User
 
Join Date: Nov 2010
Posts: 8
Great!!! it works, I was so afraid to lose data that I didn't try it before.

Reply With Quote
  #4 (permalink)  
Old 12-30-10, 03:54
nivasreddy007 nivasreddy007 is offline
Registered User
 
Join Date: Jun 2007
Posts: 66
Yep renaming or recreating should work
__________________
www.db2commands.net
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