Results 1 to 3 of 3

Thread: db2realocatedb

  1. #1
    Join Date
    Aug 2012
    Posts
    70

    Unanswered: db2realocatedb

    Hi all

    I have a DB2 V10.5 database on a SUSE LINUX 11.3
    I created the database sample using ~/sqllib/bin/db2sampl

    I wanted to move all containers and files in another location and therefore I run db2relocatedb with the following cfg-file:

    DB_NAME=SAMPLE
    DB2_PATH=/home/db2inst1,/home/db2inst1/DATABASE/sample/metalog
    INSTANCE=dbinst1
    NODENUM=0
    STORAGE_PATH=/home/db2inst1,/home/db2inst1/DATABASE/sample/data


    I first deactivated the database, made sure that no process was running, and copied the files to the target location. I didn't delete the old files.

    The db2relocatedb command ran successfully and I could connect to the sample database.
    But as I checked the paths in the view sysibmadm.dbpaths I saw the old paths. Then I restarted the instance (db2stop/db2start) , connected again to the database I checked the paths. The sysibmadm.dbpaths shows now the correct paths.

    Furthermore: after having run successfully the db2relocatedb if I rename the old paths and then try to connect to the database (which all containers and files have been moved to the new paths) I get the error:
    SQL1042C An unexpected system error occured. SQLSTATE=58004

    Why does DB2 not recognize the new paths dynamically?

    Thanks and regards
    Renaud

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

    there is a requirement to restart the instance after db2relocatedb:

    After you run the db2relocatedb command, you must recycle the DB2 instance to allow the changes to take effect.
    Regards,
    Mark.

  3. #3
    Join Date
    Aug 2012
    Posts
    70
    Hi Mark

    Thanks a lot. This confirme what I have experienced

    best regards
    Renaud

Posting Permissions

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