Results 1 to 13 of 13
  1. #1
    Join Date
    Apr 2009
    Posts
    6

    Unanswered: Recover/restore db2 database from files under node directory

    Is there any way (other than normal backup/restore operation) to restore db2database using files in node directory (e.g C:\DB2\NODE0000) from one machine to another machine?

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    No. The recommended method is backup and restore.

    Andy

  3. #3
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    It may be possible to use db2relocatedb , but as Andy says, backup and restore is the recommended option.
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  4. #4
    Join Date
    Apr 2009
    Posts
    6
    Thanks, I will check with db2relocatedb.

  5. #5
    Join Date
    May 2011
    Posts
    3
    Hi all, really old thread, but I am taking my chances

    lalit_dba,

    Any luck in this endeavor? I am facing a similar problem after a system crash and so far db2relocatedb has failed to help me...

    Best regards,
    Robert

  6. #6
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    If your system crashed, then it is possible that the data on disk got corrupted so db2relocatedb will not work. You really should have used backup and restore.

    Andy

  7. #7
    Join Date
    May 2011
    Posts
    3
    Many thanks for the quick reply, Andy.

    The disk on the system is OK, the motherboard is not, however I have managed to retreive all files from the disk without problems so I do not think the files are corrupt in any way.

    Problems arise with db2relocatedb when the database to be relocated it is not found in the database directory, according to message DBT1025N.

    Robert

  8. #8
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    What DB2 version and OS are you using? Please explain in detain what you are trying to do.

    Andy

  9. #9
    Join Date
    May 2011
    Posts
    3
    The DB2-version is 9.5.0.808. Source OS is Windows Vista, target is Windows 7. As I mentioned before, the Vista system is dead and thus the instance on which the database resided does not exist anymore.

    I have retreived the database folder and files from the Vista system harddrive and I want to recreate this database from these files.

    I am using a relocadedb.cfg file in which I have experimented a little. One version I have tried looked like this (I have consulted the DB2 online help as well as google):

    DB_NAME=NAME
    DB_PATH=C:
    INSTANCE=db2
    NODENUM=0

    Here is another one:
    DB_NAME=NAME,NAME
    DB_PATH=C:,C:
    INSTANCE=db2inst1,db2inst1
    NODENUM=0

    However, both these files render the same message (DBT1025N).

    To me it seems like there is no way of using db2relocatedb for databases that no longer exist within a running db2 instance, but I might ofcourse be mistaken.

    Once more, many thanks for all help.

    Robert

  10. #10
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    I'd try copying the files to the target system using exactly the same directory structure as in the old system. Assuming you have installed DB2 and created a new instance using all the same parameters as before, issuing CATALOG DB whatever ON C: might just work.

  11. #11
    Join Date
    Dec 2008
    Posts
    44
    you may try to follow database mirroring pocedure. In db mirroring, you copy the filesystems/disks from source to target and initialize the target as mirror

  12. #12
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Quote Originally Posted by rajaraja_cholan View Post
    you may try to follow database mirroring pocedure. In db mirroring, you copy the filesystems/disks from source to target and initialize the target as mirror
    This will only work if the data on the disk is in a steady state (WRITE SUSPEND or deactivated DB).

    Andy

  13. #13
    Join Date
    Dec 2008
    Posts
    44
    Quote Originally Posted by ARWinner View Post
    This will only work if the data on the disk is in a steady state (WRITE SUSPEND or deactivated DB).

    Andy
    Yes, that is true, good catch!!

Tags for this Thread

Posting Permissions

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