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 > DB21080E / SQL1119N Catch 22 (Restore incomplete)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-02-07, 21:24
meehange meehange is offline
Registered User
 
Join Date: Jul 2004
Posts: 256
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,
Reply With Quote
  #2 (permalink)  
Old 04-02-07, 22:51
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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
Reply With Quote
  #3 (permalink)  
Old 04-03-07, 00:48
meehange meehange is offline
Registered User
 
Join Date: Jul 2004
Posts: 256
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
Reply With Quote
  #4 (permalink)  
Old 04-03-07, 02:20
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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
Reply With Quote
  #5 (permalink)  
Old 04-03-07, 02:56
meehange meehange is offline
Registered User
 
Join Date: Jul 2004
Posts: 256
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


Quote:
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?
Reply With Quote
  #6 (permalink)  
Old 04-03-07, 08:19
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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
Reply With Quote
  #7 (permalink)  
Old 04-03-07, 09:58
dbamota dbamota is offline
Registered User
 
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
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