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 > db2ckbkp .... help

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-19-08, 20:55
itsonlyme44 itsonlyme44 is offline
Registered User
 
Join Date: Dec 2007
Posts: 261
db2ckbkp .... help

I attempted a restore on a Database in my DB2 on windows 9.5 UDB instance

The database is failing with these kind of errors:
SQL20319N The SET TABLESPACE CONTAINERS command is not allowed on an automatic storage table space. SQLSTATE=55061

so I think I may have my tablespace definitions wrong.

according to the manual, I can get the tablespaces definitions from the backup file using the DB2ckbkp command.

can someone give me the correct syntax for the db2ckbkp command???

The DB2 manual is not very helpfull for the syntax on this.
Reply With Quote
  #2 (permalink)  
Old 12-19-08, 20:56
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Your backup contains a database with automatic storage, so you cannot do a redirected restore. But the good news is that all you have to do is specify where the database goes (path) and all the tablespaces will automatically be created under that path. Check the restore command in the Command Reference carefully for more details.
__________________
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 12-19-08, 21:40
itsonlyme44 itsonlyme44 is offline
Registered User
 
Join Date: Dec 2007
Posts: 261
Thank you so much for replying..

here is the restore command I am trying to use:


Code:
RESTORE DATABASE UATDM FROM "H:" TAKEN AT 20081219104704 TO "E:" INTO UATDM NEWLOGPATH F:\DB2\NODE0000\UATDM\ WITH 2 BUFFERS BUFFER 1024 REDIRECT PARALLELISM 1 WITHOUT PROMPTING;

SET TABLESPACE CONTAINERS FOR 0 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (FILE "E:\DB2\NODE0000\UATDM\CONTAINERS\Catalog_tbsp" 1280000 );

SET TABLESPACE CONTAINERS FOR 1 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (FILE "E:\DB2\NODE0000\UATDM\system_tbsp" 2560000 );

SET TABLESPACE CONTAINERS FOR 2 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (FILE "E:\DB2\NODE0000\uatdm\CONTAINERS\USER_TBSP" 6400000 );

SET TABLESPACE CONTAINERS FOR 3 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (FILE "E:\DB2\NODE0000\uatdm\Containers\INDSP4K_tbsp" 1920000 );

SET TABLESPACE CONTAINERS FOR 4 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (FILE "E:\DB2\NODE0000\uatdm\Containers\INDSP16K_tbsp" 64000 );

SET TABLESPACE CONTAINERS FOR 5 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (FILE "E:\DB2\NODE0000\uatdm\Containers\INDSP32K_tbsp" 240000 );

SET TABLESPACE CONTAINERS FOR 6 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (FILE "E:\DB2\NODE0000\uatdm\Containers\TBLSP4K_tbsp" 256000 );

SET TABLESPACE CONTAINERS FOR 7 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (FILE "E:\DB2\NODE0000\uatdm\Containers\TBLSP16K_tbsp" 4160000 );

SET TABLESPACE CONTAINERS FOR 8 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (FILE "E:\DB2\NODE0000\uatdm\Containers\TBLSP32K_tbsp" 640000 );

SET TABLESPACE CONTAINERS FOR 9 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (FILE "E:\DB2\NODE0000\uatdm\SQL00002\SYSTOOLSPACE" 8192 );

SET TABLESPACE CONTAINERS FOR 10 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (PATH "E:\DB2\NODE0000\uatdm\Containers\SYSTOOL");

SET TABLESPACE CONTAINERS FOR 11 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (PATH "E:\DB2\NODE0000\uatdm\Containers\SYSTEMP");
RESTORE DATABASE UATDM CONTINUE;
and here are the results:

Code:
RESTORE DATABASE UATDM FROM "H:" TAKEN AT 20081219104704 TO "E:" INTO UATDM NEWLOGPATH F:\DB2\NODE0000\UATDM\ WITH 2 BUFFERS BUFFER 1024 REDIRECT PARALLELISM 1 WITHOUT PROMPTING
SQL1277W  A redirected restore operation is being performed.  Table space 
configuration can now be viewed and table spaces that do not use automatic 
storage can have their containers reconfigured.
DB20000I  The RESTORE DATABASE command completed successfully.

SET TABLESPACE CONTAINERS FOR 0 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (FILE "E:\DB2\NODE0000\UATDM\CONTAINERS\Catalog_tbsp" 1280000 )
SQL20319N  The SET TABLESPACE CONTAINERS command is not allowed on an 
automatic storage table space.  SQLSTATE=55061

SET TABLESPACE CONTAINERS FOR 1 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (FILE "E:\DB2\NODE0000\UATDM\system_tbsp" 2560000 )
SQL20319N  The SET TABLESPACE CONTAINERS command is not allowed on an 
automatic storage table space.  SQLSTATE=55061

SET TABLESPACE CONTAINERS FOR 2 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (FILE "E:\DB2\NODE0000\uatdm\CONTAINERS\USER_TBSP" 6400000 )
SQL20319N  The SET TABLESPACE CONTAINERS command is not allowed on an 
automatic storage table space.  SQLSTATE=55061

SET TABLESPACE CONTAINERS FOR 3 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (FILE "E:\DB2\NODE0000\uatdm\Containers\INDSP4K_tbsp" 1920000 )
DB20000I  The SET TABLESPACE CONTAINERS command completed successfully.

SET TABLESPACE CONTAINERS FOR 4 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (FILE "E:\DB2\NODE0000\uatdm\Containers\INDSP16K_tbsp" 64000 )
DB20000I  The SET TABLESPACE CONTAINERS command completed successfully.

SET TABLESPACE CONTAINERS FOR 5 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (FILE "E:\DB2\NODE0000\uatdm\Containers\INDSP32K_tbsp" 240000 )
DB20000I  The SET TABLESPACE CONTAINERS command completed successfully.

SET TABLESPACE CONTAINERS FOR 6 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (FILE "E:\DB2\NODE0000\uatdm\Containers\TBLSP4K_tbsp" 256000 )
DB20000I  The SET TABLESPACE CONTAINERS command completed successfully.

SET TABLESPACE CONTAINERS FOR 7 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (FILE "E:\DB2\NODE0000\uatdm\Containers\TBLSP16K_tbsp" 4160000 )
DB20000I  The SET TABLESPACE CONTAINERS command completed successfully.

SET TABLESPACE CONTAINERS FOR 8 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (FILE "E:\DB2\NODE0000\uatdm\Containers\TBLSP32K_tbsp" 640000 )
DB20000I  The SET TABLESPACE CONTAINERS command completed successfully.

SET TABLESPACE CONTAINERS FOR 9 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (FILE "E:\DB2\NODE0000\uatdm\SQL00002\SYSTOOLSPACE" 8192 )
SQL20319N  The SET TABLESPACE CONTAINERS command is not allowed on an 
automatic storage table space.  SQLSTATE=55061

SET TABLESPACE CONTAINERS FOR 10 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (PATH "E:\DB2\NODE0000\uatdm\Containers\SYSTOOL")
SQL20319N  The SET TABLESPACE CONTAINERS command is not allowed on an 
automatic storage table space.  SQLSTATE=55061
for the automatic storage tablespaces, can you help me out with how I would change my script?? I'm really stuck here and the manual is only confusing me more.
Reply With Quote
  #4 (permalink)  
Old 12-19-08, 23:31
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
I already told you that you cannot do a redirected restore on a backup of an automatic storage database. No redirect, and no set tablespace containers. You must specify the path were the database will reside for the automatic storage database. Check the restore command in the Command Reference manual as to how to do that.

However, if you have some tablespaces with automatic storage and some without, try just doing the "set tablespace" for those tablespaces that are not automatic storage.
__________________
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 12-20-08, 06:57
itsonlyme44 itsonlyme44 is offline
Registered User
 
Join Date: Dec 2007
Posts: 261
Thank you for your help!! I finally got it !
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