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 > Redirected Restore deletes containers?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-01-06, 01:04
meehange meehange is offline
Registered User
 
Join Date: Jul 2004
Posts: 256
Redirected Restore deletes containers?

Today I was attempting to clone a database TERRA into an already existing DB MINOTAUR. I ran the following statements:

Code:
RESTORE DATABASE TERRA FROM "D:\backups" TAKEN AT 20060228234507 TO "F:" INTO MINOTAUR WITH 2 BUFFERS BUFFER 1024 REDIRECT PARALLELISM 1 WITHOUT PROMPTING;
SET TABLESPACE CONTAINERS FOR 0 REPLAY ROLLFORWARD CONTAINER OPERATIONS USING (PATH "F:\CP_Containers\minotaur\syscat");
SET TABLESPACE CONTAINERS FOR 1 REPLAY ROLLFORWARD CONTAINER OPERATIONS USING (PATH "F:\CP_Containers\minotaur\temp");
SET TABLESPACE CONTAINERS FOR 2 REPLAY ROLLFORWARD CONTAINER OPERATIONS USING (PATH "F:\CP_Containers\minotaur\tables");
SET TABLESPACE CONTAINERS FOR 3 REPLAY ROLLFORWARD CONTAINER OPERATIONS USING (PATH "F:\CP_Containers\minotaur\pkgacm");
SET TABLESPACE CONTAINERS FOR 4 REPLAY ROLLFORWARD CONTAINER OPERATIONS USING (PATH "F:\CP_Containers\minotaur\bendtl");
SET TABLESPACE CONTAINERS FOR 5 REPLAY ROLLFORWARD CONTAINER OPERATIONS USING (PATH "F:\CP_Containers\minotaur\systool");
SET TABLESPACE CONTAINERS FOR 6 REPLAY ROLLFORWARD CONTAINER OPERATIONS USING (PATH "F:\CP_Containers\minotaur\systooltmp");
RESTORE DATABASE TERRA CONTINUE;
Basically the script had error on the first statement and then the subsequent statements failed due with a no database connection statement.

When I attempted to connect to that DB I found it had essentially been uncataloged at the server node. It was no longer available to be cataloged and on inspection of the container folders they were all empty!
WTF?
Obviously it's not a horrible problem for me as I was about to blow the data away anyhow, but I did think it was a bit scary.

Anyone any idea what may have happenned?
Reply With Quote
  #2 (permalink)  
Old 03-01-06, 15:41
dbamota dbamota is offline
Registered User
 
Join Date: Sep 2003
Posts: 237
Which version are you using? restore,set tablespace,restore continue must be executed as a unit. If there is any error start from the beginning with restore statement.
__________________
mota
Reply With Quote
  #3 (permalink)  
Old 03-01-06, 18:07
meehange meehange is offline
Registered User
 
Join Date: Jul 2004
Posts: 256
Quote:
Originally Posted by dbamota
Which version are you using? restore,set tablespace,restore continue must be executed as a unit. If there is any error start from the beginning with restore statement.
Sorry 8.2 on Win2003 (must put that in my sig.)

I did start from the beginning, that's when it told me that the database wasn't cataloged.
Reply With Quote
  #4 (permalink)  
Old 03-02-06, 11:01
DBA-Jr DBA-Jr is offline
Registered User
 
Join Date: Mar 2005
Posts: 108
There is nothing scary since you have the backup.
When an error happens before you RESTORE CONTINUE, you can always "restore db TERRA abort". That should roll back your unsuccessful restore. Let me know whether this helps.
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