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

    Unanswered: DB21080E / SQL1119N Catch 22 (Restore incomplete)

    DB2 8.2 AIX 5.3

    Hey,

    I was doing a redirected restore on a systems with about 40 containers.
    I ran the set tablespaces commands and all looked well. Then unfortunately in a lapse of concentration I attempted to Rollforward before I issued the restore complete command. Now I am in the situation that if I issue a restore complete it says "DB21080E No previous RESTORE DATABASE command with REDIRECT...." and if I try to do anything else that involves a connection (including trying to drop the damn database) I get "SQL1119N A connection to or activation of database "SP1" cannot be made because a previous restore is incomplete. SQLSTATE=57019"

    So anyone any ideas? Can I salvage the restore? If not how can I remove the damaged db so I can start again?

    Cheers,

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Drop the database and issue the following command:
    db2 terminate

    and then start over.

    If the drop does not work do this first:

    db2 terminate
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    Join Date
    Jul 2004
    Posts
    306
    Quote Originally Posted by Marcus_A
    Drop the database and issue the following command:
    db2 terminate

    and then start over.

    If the drop does not work do this first:

    db2 terminate
    OK so I successfully dropped the DB and issued the restore command...when I issue the SET TABLESPACE command it results in "SQL0299N Container is already assigned to the table space. SQLSTATE=42731" if I issue a db2 restore db DHS continue it says "SQL1277N Restore has detected that one or more table space containers are inaccessible, or has set their state to 'storage must be defined'."

    Cheers

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Drop the database again, and this time make sure that all containers and paths are deleted that were created by the restore. Do a "db2 terminate" when required.

    If that does not work, your set tablespace commands are probably incorrect.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  5. #5
    Join Date
    Jul 2004
    Posts
    306
    Quote Originally Posted by Marcus_A
    Drop the database again, and this time make sure that all containers and paths are deleted that were created by the restore. Do a "db2 terminate" when required.
    OK So I've tried this and reached the same problem when I attempt the continue


    If that does not work, your set tablespace commands are probably incorrect.
    All I have is a raw TSM backup image and the current version of the source system to go by...it's possible I don't have the exact sizes of the containers (altho they should be bigger)
    What is the best way to build these statements?

  6. #6
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    You can run the db2ckbkp against the backup to see the tablespace containers. See the Command Reference manual for the correct parms to use to display this info.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  7. #7
    Join Date
    Sep 2003
    Posts
    237
    If you are using filesystem containers for DMS tablespaces, you can
    untag -f 'file container' ;
    it still has a bit assigning it to the old database.
    mota

Posting Permissions

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