Results 1 to 12 of 12
  1. #1
    Join Date
    Jun 2012
    Posts
    32

    Unanswered: DB2 set tablespace containers error help ?

    Hi Guys,

    I am getting the following error when i run the db2 set tablespace containers, any idea on how to tackle this problem ?

    Code:
    db2inst2@bob2:/dbs/temp/PODBTEMP2> db2 restore db im_rm redirect
    SQL1277W  A redirected restore operation is being performed. During a table
    space restore, only table spaces being restored can have their paths
    reconfigured. During a database restore, storage group storage paths and DMS
    table space containers can be reconfigured.
    DB20000I  The RESTORE DATABASE command completed successfully.
    db2inst2@bob2:/dbs/temp/PODBTEMP2> db2 "set tablespace containers for 0 using (file '/home/db2inst2/db2inst2/NODE0000/IM_RM/T0000000/C0000000.CAT' 70000)"
    SQL20319N  The SET TABLESPACE CONTAINERS command is not allowed on an
    automatic storage table space.  SQLSTATE=55061
    db2inst2@bob2:/dbs/temp/PODBTEMP2> db2 "set tablespace containers for 1 using (path '/home/db2inst2/db2inst2/NODE0000/IM_RM/T0000001/C0000000.TMP')"
    SQL20319N  The SET TABLESPACE CONTAINERS command is not allowed on an
    automatic storage table space.  SQLSTATE=55061
    db2inst2@bob2:/dbs/temp/PODBTEMP2> db2 "set tablespace containers for 2 using (file '/home/db2inst2/db2inst2/NODE0000/IM_RM/T0000002/C0000000.LRG' 20000)"
    SQL20319N  The SET TABLESPACE CONTAINERS command is not allowed on an
    automatic storage table space.  SQLSTATE=55061
    db2inst2@bob2:/dbs/temp/PODBTEMP2> db2 "set tablespace containers for 3 using (file '/home/db2inst2/db2inst2/NODE0000/IM_RM/T0000003/C0000000.LRG' 20000)"
    SQL20319N  The SET TABLESPACE CONTAINERS command is not allowed on an
    automatic storage table space.  SQLSTATE=55061
    db2inst2@bob2:/dbs/temp/PODBTEMP2> db2 "set tablespace containers for 4 using (path '/home/db2inst2/db2inst2/NODE0000/IM_RM/T0000004/C0000000.UTM')"
    SQL20319N  The SET TABLESPACE CONTAINERS command is not allowed on an
    automatic storage table space.  SQLSTATE=55061
    db2inst2@bob2:/dbs/temp/PODBTEMP2> db2 "set tablespace containers for 5 using (file '/home/db2inst2/db2inst2/NODE0000/IM_RM/T0000005/C0000000.USR' 82000)"
    SQL20319N  The SET TABLESPACE CONTAINERS command is not allowed on an
    automatic storage table space.  SQLSTATE=55061
    db2inst2@bob2:/dbs/temp/PODBTEMP2> db2 "set tablespace containers for 6 using (path '/home/db2inst2/db2inst2/NODE0000/IM_RM/T0000006/C0000000.TMP')"
    SQL20319N  The SET TABLESPACE CONTAINERS command is not allowed on an
    automatic storage table space.  SQLSTATE=55061
    db2inst2@bob2:/dbs/temp/PODBTEMP2> db2 "set tablespace containers for 7 using (file '/home/db2inst2/db2inst2/NODE0000/IM_RM/T0000007/C0000000.USR' 50000)"
    SQL20319N  The SET TABLESPACE CONTAINERS command is not allowed on an
    automatic storage table space.  SQLSTATE=55061
    db2inst2@bob2:/dbs/temp/PODBTEMP2> db2 "set tablespace containers for 8 using (path '/home/db2inst2/db2inst2/NODE0000/IM_RM/T0000008/C0000000.TMP')"
    SQL20319N  The SET TABLESPACE CONTAINERS command is not allowed on an
    automatic storage table space.  SQLSTATE=55061
    db2inst2@bob2:/dbs/temp/PODBTEMP2> db2 restore im_rm continue
    SQL0104N  An unexpected token "im_rm" was found following "RESTORE".  Expected
    tokens may include:  "DATABASE".  SQLSTATE=42601
    db2inst2@bob2:/dbs/temp/PODBTEMP2> db2 restore db im_rm continue
    SQL1277W  A redirected restore operation is being performed. During a table
    space restore, only table spaces being restored can have their paths
    reconfigured. During a database restore, storage group storage paths and DMS
    table space containers can be reconfigured.
    DB20000I  The RESTORE DATABASE command completed successfully.

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    I think the error message you are getting is self explanatory.

    Andy

  3. #3
    Join Date
    Apr 2012
    Posts
    1,035
    Provided Answers: 18
    If all your tablespaces are on automatic-storage pools the you don't need to use 'set tablespace containers' .

    You still need to fix the 'continue' line to include the database name.

  4. #4
    Join Date
    Jun 2012
    Posts
    32
    I am trying to restore IM_RM database from a backup image to another instance say db2inst2 , I trying to set up a testing environment to try adding features before integrating it to live environment.

    And i tried using the following commands i understand that the tablesspace is set to automatic storage, i tried keeping them but then i get the following error message later saying not able to access ready-only files.

    can some one explain to be step by step what i should do ? that will be a great help

    Code:
    db2inst2@bob2:/dbs/temp/PODBTEMP2> db2 restore db im_rm redirect
    SQL1277W  A redirected restore operation is being performed. During a table
    space restore, only table spaces being restored can have their paths
    reconfigured. During a database restore, storage group storage paths and DMS
    table space containers can be reconfigured.
    DB20000I  The RESTORE DATABASE command completed successfully.
    db2inst2@bob2:/dbs/temp/PODBTEMP2> db2 "set tablespace containers for 0 using (file '/home/db2inst2/db2inst2/NODE0000/IM_RM/T0000000/C0000000.CAT' 70000)"
    SQL20319N  The SET TABLESPACE CONTAINERS command is not allowed on an
    automatic storage table space.  SQLSTATE=55061
    db2inst2@bob2:/dbs/temp/PODBTEMP2> db2 "set tablespace containers for 1 using (path '/home/db2inst2/db2inst2/NODE0000/IM_RM/T0000001/C0000000.TMP')"
    SQL20319N  The SET TABLESPACE CONTAINERS command is not allowed on an
    automatic storage table space.  SQLSTATE=55061
    db2inst2@bob2:/dbs/temp/PODBTEMP2> db2 "set tablespace containers for 2 using (file '/home/db2inst2/db2inst2/NODE0000/IM_RM/T0000002/C0000000.LRG' 20000)"
    SQL20319N  The SET TABLESPACE CONTAINERS command is not allowed on an
    automatic storage table space.  SQLSTATE=55061
    db2inst2@bob2:/dbs/temp/PODBTEMP2> db2 "set tablespace containers for 3 using (file '/home/db2inst2/db2inst2/NODE0000/IM_RM/T0000003/C0000000.LRG' 20000)"
    SQL20319N  The SET TABLESPACE CONTAINERS command is not allowed on an
    automatic storage table space.  SQLSTATE=55061
    db2inst2@bob2:/dbs/temp/PODBTEMP2> db2 "set tablespace containers for 4 using (path '/home/db2inst2/db2inst2/NODE0000/IM_RM/T0000004/C0000000.UTM')"
    SQL20319N  The SET TABLESPACE CONTAINERS command is not allowed on an
    automatic storage table space.  SQLSTATE=55061
    db2inst2@bob2:/dbs/temp/PODBTEMP2> db2 "set tablespace containers for 5 using (file '/home/db2inst2/db2inst2/NODE0000/IM_RM/T0000005/C0000000.USR' 82000)"
    SQL20319N  The SET TABLESPACE CONTAINERS command is not allowed on an
    automatic storage table space.  SQLSTATE=55061
    db2inst2@bob2:/dbs/temp/PODBTEMP2> db2 "set tablespace containers for 6 using (path '/home/db2inst2/db2inst2/NODE0000/IM_RM/T0000006/C0000000.TMP')"
    SQL20319N  The SET TABLESPACE CONTAINERS command is not allowed on an
    automatic storage table space.  SQLSTATE=55061
    db2inst2@bob2:/dbs/temp/PODBTEMP2> db2 "set tablespace containers for 7 using (file '/home/db2inst2/db2inst2/NODE0000/IM_RM/T0000007/C0000000.USR' 50000)"
    SQL20319N  The SET TABLESPACE CONTAINERS command is not allowed on an
    automatic storage table space.  SQLSTATE=55061
    db2inst2@bob2:/dbs/temp/PODBTEMP2> db2 "set tablespace containers for 8 using (path '/home/db2inst2/db2inst2/NODE0000/IM_RM/T0000008/C0000000.TMP')"
    SQL20319N  The SET TABLESPACE CONTAINERS command is not allowed on an
    automatic storage table space.  SQLSTATE=55061
    db2inst2@bob2:/dbs/temp/PODBTEMP2> db2 restore im_rm continue
    SQL0104N  An unexpected token "im_rm" was found following "RESTORE".  Expected
    tokens may include:  "DATABASE".  SQLSTATE=42601
    db2inst2@bob2:/dbs/temp/PODBTEMP2> db2 restore db im_rm continue
    SQL1277W  A redirected restore operation is being performed. During a table
    space restore, only table spaces being restored can have their paths
    reconfigured. During a database restore, storage group storage paths and DMS
    table space containers can be reconfigured.
    DB20000I  The RESTORE DATABASE command completed successfully.

  5. #5
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Step 1) Read the documentation on the RESTORE command.

    You need to look at the ON and TO clauses.

    Andy

  6. #6
    Join Date
    Jun 2012
    Posts
    32
    After reading through documentation I THOUGH this command should have worked but I got the following error message:

    db2inst2@bob2:/dbs/temp/PODBTEMP2> db2 RESTORE DATABASE IM_RM TAKEN AT 20120707 WITHOUT ROLLING FORWARD WITHOUT PROMPTING

    SQL0970N THE SYSTEM ATTEMPTED TO WRITE TO A READ ONLY FILE. SQL STATE =55009

  7. #7
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    If you do not change any locations during the restore, then it will try to place it in the same locations as the existing database. This is useful only if you are replacing the existing database. If you are copying it to another instance, then you need to specify where you want the stuff to go, especially if both instances are on the same server.

    Andy

  8. #8
    Join Date
    Jun 2012
    Posts
    32
    So you mean to say that i should use a TO directory in the following command.
    Is that what you mean ?

    db2 RESTORE DATABASE IM_RM TAKEN AT 20120707 TO "/dbs/temp/OfflineRestore" WITHOUT ROLLING FORWARD WITHOUT PROMPTING

  9. #9
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Quote Originally Posted by marshell08 View Post
    So you mean to say that i should use a TO directory in the following command.
    Is that what you mean ?

    db2 RESTORE DATABASE IM_RM TAKEN AT 20120707 TO "/dbs/temp/OfflineRestore" WITHOUT ROLLING FORWARD WITHOUT PROMPTING
    Yes, and more. Anything else that will conflict will also have to be changed including storage paths, log paths, etc.

    Andy

  10. #10
    Join Date
    Jun 2012
    Posts
    32
    The following command worked but i got an error saying to upgrade, any pointer on how to do that ?

    db2 RESTORE DATABASE IM_RM TAKEN AT 20120707 012723 TO "/home/db2inst2/IM_RM" WITHOUT ROLLING FORWARD WITHOUT PROMPTING

    the backup image is taken at DB2 9.7.3
    the db2inst2 i am running on is 10.1


    Code:
    db2inst2@bob2:/dbs/temp/PODBTEMP2> SQL2519N  The database was restored but the restored database was not upgraded
    -bash: SQL2519N: command not found
    db2inst2@bob2:/dbs/temp/PODBTEMP2> to the current release.  Error "-1762" with tokens "*N" is returned.
    -bash: to: command not found
    
    db2inst2@bob2:/dbs/temp/PODBTEMP2> db2 connect to IM_RM
    -bash: db2inst2@bob2:/dbs/temp/PODBTEMP2: No such file or directory
    db2inst2@bob2:/dbs/temp/PODBTEMP2> SQL5035N  The database must be upgraded to the current release.
    Last edited by marshell08; 07-10-12 at 17:44.

  11. #11
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Code:
    SQL1762N  Unable to connect to database because there is not enough
          space to allocate active log files.
    
    Explanation:
    
    There is not enough disk space to allocate active log files. Possible
    reasons include:
    *  There is insufficient space available on the device used to store the
       recovery logs.
    *  If userexits are enabled, the userexit program may be failing due to
       an incorrect path, incorrect install directory, sharing violation, or
       other problem.
    
    User response:
    
     Based on the cause:
    *  Ensure that there is sufficient space on the device for the primary
       logs, as DB2 may require extra space to allocate new logs so that the
       database will start with at least LOGPRIMARY log files. Do NOT delete
       recovery logs to free space, even if they appear inactive.
    *  Ensure the userexit program is operating correctly by manually
       invoking it. Review the instructions provided in the sample userexit
       source code for compiling and installing the userexit program. Ensure
       that the archive destination path exists.
    
    As a last resort, try reducing the values for LOGPRIMARY and/or
    LOGFILSIZ database configuration parameters so that a smaller set of
    active log files are used. This will reduce the requirement for disk
    space.
    
    Reissue the connect statement after determining and correcting the
    problem.
    Are the two instances on the same server? Is there enough disk space for both databases?

    Andy

  12. #12
    Join Date
    Jun 2012
    Posts
    32
    I have successfully restored the database from the backup image. Thanks a lot for your help, i really appreciate your quick replies.

    These are the commands i used :
    Code:
    db2inst2@bob2:/dbs/temp/PODBTEMP2> db2 UPDATE DATABASE CONFIGURATION FOR IM_RM USING LOGPRIMARY 10
    DB20000I  The UPDATE DATABASE CONFIGURATION command completed successfully.
    db2inst2@bob2:/dbs/temp/PODBTEMP2> UPDATE DATABASE CONFIGURATION FOR IM_RM  USING LOGSECOND 20
    -bash: UPDATE: command not found
    db2inst2@bob2:/dbs/temp/PODBTEMP2> db2 UPDATE DATABASE CONFIGURATION FOR IM_RM  USING LOGSECOND 20
    DB20000I  The UPDATE DATABASE CONFIGURATION command completed successfully.
    db2inst2@bob2:/dbs/temp/PODBTEMP2> db2 upgrade database IM_RM                   SQL1762N  Unable to connect to database because there is not enough space to
    allocate active log files.  SQLSTATE=08004
    db2inst2@bob2:/dbs/temp/PODBTEMP2> UPDATE DATABASE CONFIGURATION FOR IM_RM USING LOGFILSZ 1000
    -bash: UPDATE: command not found
    db2inst2@bob2:/dbs/temp/PODBTEMP2> db2 UPDATE DATABASE CONFIGURATION FOR IM_RM USING LOGFILSZ 1000
    SQL0104N  An unexpected token "LOGFILSZ" was found following "USING".
    Expected tokens may include:  "ALT_COLLATE".  SQLSTATE=42601
    db2inst2@bob2:/dbs/temp/PODBTEMP2> db2 update database configuration for data_base_name using
    SQL0104N  An unexpected token "data_base_name" was found following "FOR".
    Expected tokens may include:  "<database-alias>".  SQLSTATE=42601
    db2inst2@bob2:/dbs/temp/PODBTEMP2> db2 update database configuration for IM_RM  using logfilsiz 1000
    DB20000I  The UPDATE DATABASE CONFIGURATION command completed successfully.
    db2inst2@bob2:/dbs/temp/PODBTEMP2> db2 upgrade database IM_RM                   DB20000I  The UPGRADE DATABASE command completed successfully.
    db2inst2@bob2:/dbs/temp/PODBTEMP2> db2 connect to IM_RM
    
       Database Connection Information
    
     Database server        = DB2/LINUXX8664 10.1.0
     SQL authorization ID   = DB2INST2
     Local database alias   = IM_RM

Posting Permissions

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