Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2007
    Posts
    288

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

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

  3. #3
    Join Date
    Dec 2007
    Posts
    288
    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.

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

  5. #5
    Join Date
    Dec 2007
    Posts
    288
    Thank you for your help!! I finally got it !

Posting Permissions

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