Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2008
    Posts
    62

    Unanswered: problem in relocating database

    [db2 9.1 on SunOS.]
    Hello,

    I am trying to rename the db; also i want to change its location to different directory structure.

    I am using "db2relocatedb" to do this & getting "<dir> could not be open" error.
    See the steps which i followed:

    1) made relo.cfg file with following containts:

    DB_NAME=NEWDB,RELOC_DB
    DB_PATH=/export/home/db2inst1/,/export/home/db2inst1/Relocated
    INSTANCE=db2inst1,db2inst1


    2) executed d cmd:

    db2relocatedb -f relo.cfg

    After this it throws following error:

    DBT1006N The file/device "/export/home/db2inst1/Relocated/db2inst1/NODE0000/sqldbdir/sqldbdir" could not be opened.


    I tried with creating this directory structure, still problem persist.

    Even, i tried on WINDOWS m/c, here also it is giving the same message!!

    I used reloc.cfg as follow on WINDOWS

    DB_NAME=good,bad
    DB_PATH=D:\,C:\
    INSTANCE=db2,db2


    Please suggest where i am going wrong?
    Last edited by prashant44; 08-06-08 at 08:23.

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    have you tried to do a simple restore with redirect
    set container path
    restore continue
    see infodoc for details on redirected restore
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  3. #3
    Join Date
    Jul 2006
    Location
    Pune , India
    Posts
    433
    i have used relocatedb many times to change name but same dbpath and it works fine in that case.
    maybe this could be the reason bugging u
    http://www.mydatabasesupport.com/for...b-trouble.html
    Rahul Singh
    Certified DB2 9 DBA / Application Developer

  4. #4
    Join Date
    Feb 2008
    Posts
    62
    Yes, i got it.

    I am able to successfully change db name & its path.

    Thanks for help.

  5. #5
    Join Date
    Sep 2012
    Posts
    177
    Hi all,

    How you changed the path?

    In our setup database created in the /db2home path I tried to change to /db2prod/temp.
    using the relocate option.


    DB_NAME=TIS,TIS

    DB_PATH=/db2home,/db2prod/temp

    db2relocatedb -f relocate.cfg

    INSTANCE=db2inst1

    Getting the below error:

    [db2inst1@prddw1 ~]$ db2relocatedb -f relocate.cfg
    DBT1006N The file/device "/db2prod/temp/db2inst1/NODE0000/sqldbdir/sqldbdir" could not be opened.

    How to change the path?

    Thanks,
    laxman..

  6. #6
    Join Date
    Aug 2010
    Location
    Singapore
    Posts
    197
    Did you have privilege on that path ? Try chmod 755 on that path.
    - Ananth
    DB2 DBA LUW
    "coming second, just means you are the first loser"

Posting Permissions

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