Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2013
    Posts
    80

    Unanswered: relocatedb tablespace container

    Good Days Everyday,
    Just want to confirm with everyone whether db2 able to move system containers like SYSCAT to another new location or path ? I did able to move normal user tablespace container successfully but not the SYSCAT. If cannot, is there any method to move it ? The reason I move is due to I need to shrink down the LV size allocated by revamping the whole vg. This is to safe space for future others usage purposes.


    after I moved the containers to different path, database can start but cannot perform any select statement and it keep on saying the database connection is not exists.

    Any advise.

    thanks.

  2. #2
    Join Date
    Jul 2013
    Location
    Moscow, Russia
    Posts
    666
    Provided Answers: 55
    Hello,

    Can you provide more details on what you did exactly to move SYSCATSPACE to a new location?
    - type of the tablespace (SMS, DMS, Automatic)
    - the sequence of commands and their result (error codes and messages)
    Regards,
    Mark.

  3. #3
    Join Date
    Aug 2013
    Posts
    80
    Hi,
    Here my step to relocatedb for common tablespace containers

    Code:
    first to create a cfg file contains as following
    DB_NAME=DBNAME
    DB_PATH=/home/user1
    INSTANCE=inst1
    CONT_PATH=SOURCE, DESTINATION
    
    Steps to perform the relocate
    1. deactivate database dbname
    2. terminate
    3. !mv SOURCE DESTINATION
    4. relocatedb -f <relocate>.cfg
    Is this method can apply to SYSCAT and TEMP Tablespace containers ?

    Thanks

  4. #4
    Join Date
    Jul 2013
    Location
    Moscow, Russia
    Posts
    666
    Provided Answers: 55
    Hi,

    Try this:
    Code:
    $ cat test.ddl
    
    create database test on /db2fs 
    catalog tablespace managed by system using ('syscat')
    temporary tablespace managed by system using ('temp');
    
    $ cat paths.sql
    
    select varchar(path, 60) path
    from sysibmadm.dbpaths
    where type='TBSP_DIRECTORY';
    
    $ db2 -tf test.ddl
    $ db2 connect to test
    $ db2 -tf paths.sql
    
    PATH
    ------------------------------------------------------------
    /db2fs/db2inst1/NODE0000/SQL00002/temp/
    /db2fs/db2inst1/NODE0000/SQL00002/syscat/
    
    $ db2 connect reset
    $ mv /db2fs/db2inst1/NODE0000/SQL00002/syscat /db2fs/db2inst1/NODE0000/SQL00002/syscat_new
    $ mv /db2fs/db2inst1/NODE0000/SQL00002/temp /db2fs/db2inst1/NODE0000/SQL00002/temp_new
    
    $ cat config.txt
    
    DB_NAME=test
    DB_PATH=/db2fs
    INSTANCE=db2inst1
    CONT_PATH=/db2fs/db2inst1/NODE0000/SQL00002/temp,/db2fs/db2inst1/NODE0000/SQL00002/temp_new
    CONT_PATH=/db2fs/db2inst1/NODE0000/SQL00002/syscat,/db2fs/db2inst1/NODE0000/SQL00002/syscat_new
    
    $ db2relocatedb -f config.txt                             
    Files and control structures were changed successfully.
    DBT1000I  The tool completed successfully.
    
    $ db2 connect to test
    $ db2 -tf paths.sql
    
    PATH
    ------------------------------------------------------------
    /db2fs/db2inst1/NODE0000/SQL00002/temp_new/
    /db2fs/db2inst1/NODE0000/SQL00002/syscat_new/
    Regards,
    Mark.

  5. #5
    Join Date
    Aug 2013
    Posts
    80
    Thanks Mark, I will try it out.

  6. #6
    Join Date
    Aug 2013
    Posts
    80
    Hi Mark,
    I encounter following error when try to move those "automatic storage" enabled tablespaces

    Code:
    DBT1037N  CONT_PATH entries cannot be specified for an automatic storage table space.
    Btw, do you think I should disable tablespace auto_resize to off before I move ?

    Thanks

  7. #7
    Join Date
    Jul 2013
    Location
    Moscow, Russia
    Posts
    666
    Provided Answers: 55
    Hi,

    "automatic storage" and a tablespace auto_resize property are unrelated things.
    Have you tried to follow the instructions printed in the "User response" section of:
    Code:
    $ db2 "? DBT1037N"
    
    DBT1037N  CONT_PATH entries cannot be specified for an automatic storage
          table space.
    
    Explanation:
    
    An attempt has been made to relocate container paths for an automatic
    storage table space.
    
    User response:
    
    Remove the CONT_PATH entries that correspond to automatic storage table
    space. Only STORAGE_PATH entries can be used to relocate automatic
    storage table space.
    ?
    Regards,
    Mark.

Posting Permissions

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