Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2004
    Posts
    306

    Unanswered: 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?

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

  3. #3
    Join Date
    Jul 2004
    Posts
    306
    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.

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •