Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2007
    Posts
    33

    Unanswered: Moving DB from one instance to another instance

    hi,

    I have a db2 db "sample" under inst1. I wants to move this db from inst1 to inst2 without taking backup and restore.

    Is it possible in db2? How can i attach or move a database from one instance owner to another?

    do we need to change any instance or db configuration file? kindly advice

    regards

    Sanjai

  2. #2
    Join Date
    Nov 2005
    Location
    IL
    Posts
    557
    With out Star ship Enterprise beaming thingy, your only choice is to unload, rebuild all of the objects and reload on the new instance. but that is equavalent of taking a UGO to an F1 race. Can it be done, yes, should it be done....
    --
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows

    DB2 v9.7.0.6 os 6.1.0.0

  3. #3
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    You should be able to uncatalog the database from one instance, and catalog on another instance. Also, if you drop an instance, the database remains and can be re-catalogued to another instance.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  4. #4
    Join Date
    Nov 2005
    Location
    IL
    Posts
    557
    Marcus, have you ever done this before? were there any issues with doing what you are suggesting? I have never heard anyone doing this way nor have tried it my self.
    --
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows

    DB2 v9.7.0.6 os 6.1.0.0

  5. #5
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    I have dropped an instance and re-catalogued one of the databases in the old instance into another instance many times. I assume it can be done without dropping the original instance, although I don't recall if I have tried that. When the database is re-catalogued, it is catalogued specifying a PATH/DRIVE where the database is located (see the Command Reference).
    Last edited by Marcus_A; 05-19-08 at 14:36.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  6. #6
    Join Date
    Jul 2006
    Location
    Pune , India
    Posts
    433
    chk db2relocatedb command. First try it on sample db

    To move the database DATAB1 from the instance jsmith on the path /dbpath to the instance prodinst do the following:

    1.Move the files in the directory /dbpath/jsmith to /dbpath/prodinst.
    2.Use the following configuration file with the db2relocatedb command to make the changes to the database files:
    DB_NAME=DATAB1
    DB_PATH=/dbpath
    INSTANCE=jsmith,prodinst
    NODENUM=0
    Rahul Singh
    Certified DB2 9 DBA / Application Developer

  7. #7
    Join Date
    Jan 2007
    Posts
    33
    hi rahul,

    thanks for your suggestion. I have moved the db from one instance to another instance.

    tnks

    sanjai

  8. #8
    Join Date
    Nov 2005
    Location
    IL
    Posts
    557
    care to share how you did it? It is a give and take game.
    --
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows

    DB2 v9.7.0.6 os 6.1.0.0

Posting Permissions

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