Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2002
    Posts
    76

    Question Unanswered: Restore situation

    We are having a problem with a restore in our test environment, and while this may be a unique one wondered if anyone had experienced this or had suggestions.

    Background , is we are migrating siebel 2000 to siebel 7.5. Prod is db2 6 on NT and our migration environment is db2 7.2 also on NT.

    For this project, we only have the one windows server upgraded to 7.2 right now.

    Our test database is called siebel1t. We have an online backup of this from a milestone in the migration of a week or so ago, and want to restore it along side of our current siebel1t on the same server but in a new database to be called siebel1z.

    "restore database siebel1t to siebel1z" fails because of contention in the dms containers, it is trying to write the same file name of the existing siebel1t containers.

    Tried a re-direct restore , which apparently you can only do through the gui? , but it won't let us specify the containers, we get an error window when we click the redirect box saying that the restore must roll forward.

    First, the restore hasn't even been done, we are just trying to redirect the containers , so the error makes no sense, we can't roll forward anything yet. Also, when you click on show SQL, the restore command does not have WITHOUT ROLLING FORWARD, so it should be implied that we are going to roll forward after the restore...I know since it was an online backup, it will require rolling the logs, but the re-direct has to take place first.


    Am I doing the re-direct wrong?
    Can you not do a redirected restore from an Online backup?
    Are there other alternatives to getting these 2 databases along side each other on the same server?

    Thanks

  2. #2
    Join Date
    Nov 2002
    Location
    Rio de Janeiro - Brazil
    Posts
    78

    Re: Restore situation

    Originally posted by akratz
    We are having a problem with a restore in our test environment, and while this may be a unique one wondered if anyone had experienced this or had suggestions.

    Background , is we are migrating siebel 2000 to siebel 7.5. Prod is db2 6 on NT and our migration environment is db2 7.2 also on NT.

    For this project, we only have the one windows server upgraded to 7.2 right now.

    Our test database is called siebel1t. We have an online backup of this from a milestone in the migration of a week or so ago, and want to restore it along side of our current siebel1t on the same server but in a new database to be called siebel1z.

    "restore database siebel1t to siebel1z" fails because of contention in the dms containers, it is trying to write the same file name of the existing siebel1t containers.

    Tried a re-direct restore , which apparently you can only do through the gui? , but it won't let us specify the containers, we get an error window when we click the redirect box saying that the restore must roll forward.

    First, the restore hasn't even been done, we are just trying to redirect the containers , so the error makes no sense, we can't roll forward anything yet. Also, when you click on show SQL, the restore command does not have WITHOUT ROLLING FORWARD, so it should be implied that we are going to roll forward after the restore...I know since it was an online backup, it will require rolling the logs, but the re-direct has to take place first.


    Am I doing the re-direct wrong?
    Can you not do a redirected restore from an Online backup?
    Are there other alternatives to getting these 2 databases along side each other on the same server?

    Thanks
    Heys,

    I was wondering about the restore command you´re trying.

    Are you writing "Restore database <BD1> to <BD2>"?
    The "to" in that syntax is for the directory, but if you want to create a new DB from a Backup, you should use the "Into" instead of "To".
    Assuming that the restore statement is correct: About the Redirection of your tablespaces.
    You can do it from anywhere. Just have to take care because the tablespaces are not referenced by their names, but their ID. You can get their id using the "List tablespaces [show detail]".

    After that you´ve to do this:

    RESTORE DATABASE DB2 FROM <path> TAKEN AT 20020621215710
    INTO NEWDB REDIRECT WITHOUT PROMPTING ;
    SET TABLESPACE CONTAINERS FOR 0 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING PATH /home/path);
    .
    .
    .
    .
    .
    RESTORE DATABASE DB2 CONTINUE;


    Check to see if that´s what you´re executing.
    HTH
    Fernando

  3. #3
    Join Date
    Aug 2002
    Posts
    76

    Re: Restore situation

    Yep, that was a typo on my restore syntax, I did have into. Thanks.


    Also, thanks for the SET TABLESPACE syntax, none of the db2 books I have mention that at all or had help for the re-direct restore. I will give it a try.

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: Restore situation

    Following is the extract from Command Reference , example section of RESTORE DATABASE Command :

    HTH

    Sathyaram



    Following is a typical redirected restore scenario for a database whose alias is
    MYDB:
    1. Issue a RESTORE DATABASE command with the REDIRECT option.
    db2 restore db mydb replace existing redirect

    After successful completion of step 1, and before completing step 3, the
    restore can be aborted by issuing:
    db2 restore db mydb abort
    2. Issue a SET TABLESPACE CONTAINERS command for each table space
    whose containers must be redefined. For example, on OS/2:
    db2 set tablespace containers for 5 using
    (file 'f:\ts3con1' 20000, file 'f:\ts3con2' 20000)
    To verify that the containers of the restored database are the ones specified
    in this step, issue the LIST TABLESPACE CONTAINERS command.
    3. After successful completion of steps 1 and 2, issue:
    db2 restore db mydb continue
    This is the final step of the redirected restore.
    4. If step 3 fails, or if the restore has been aborted, the redirected restore can
    be restarted, beginning at step 1.

Posting Permissions

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