Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2006
    Posts
    13

    Unanswered: Restoring DB Error

    Windows DB2

    DB2 Backup Location: c:\DB2_PrimaryBackup
    DB2 Backup Physical Locations:
    c:\DB2_PrimaryBackup\myDB.0\DB2\Node0001\Catn0000\ 20070201
    c:\DB2_PrimaryBackup\myDB.0\DB2\Node0001\Catn0000\ 20070202
    c:\DB2_PrimaryBackup\myDB.0\DB2\Node0001\Catn0000\ 20070203

    I am attempting to restore a database but get the following errors:

    Using:
    db2 restore database myDB user chemaster using mypassword from c:\DB2_PrimaryBackup

    Error:
    More than one backup file matches the timestamp value provided for the backuped up database image.

    Using:
    db2 restore database myDB user chemaster using mypassword from c:\DB2_PrimaryBackup\myDB.0\DB2\Node0001\Catn0000\ 20070201

    or taking off any subdirectory from 20070201 back

    Error:
    No match for a database image file was found based on the source database alias "myDB" and timestamp ""

    Thanks in advance for you help!
    Last edited by chemaster; 02-26-07 at 17:16.

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Look in the Command Reference for the Restore Command. Your command should look like:

    restore db MyDB from c:\db2_primarybackup taken at 20070201010003 [more stuff goes here depending on what you want to do]

    Andy

  3. #3
    Join Date
    Feb 2006
    Posts
    13
    This didn't work:
    restore db MyDB from c:\db2_primarybackup taken at 20070201010003

    However, this seemed to work perfect:
    restore db MyDB from c:\db2_primarybackup taken at 20070201

    Is there a downside or possible problems associated with it on a Windows 2000 system?

    I'm sorry if this sounds like a stupid question but sometimes assuming something may be quite dangerous.
    Last edited by chemaster; 02-27-07 at 22:38.

  4. #4
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    I have not used DB2 on Windows, so I am no expert there. This might help:

    http://www-128.ibm.com/developerwork...2mccluney.html

    Andy

  5. #5
    Join Date
    Feb 2006
    Posts
    13
    I'm slow but think that it has been figured out.

    The following didn't work because the 010003 timestamp was wrong
    restore db MyDB from c:\db2_primarybackup taken at 20070201010003

    The following worked because I only has one file backed up for the day in question.
    restore db MyDB from c:\db2_primarybackup taken at 20070201

    However, looking at the file itself provided me with the correct timestamp so the following also works.
    restore db MyDB from c:\db2_primarybackup taken at 20070201231503

    Thank you very much for the help!!!

  6. #6
    Join Date
    Sep 2003
    Posts
    237
    In such cases by running db2ckbkup -h filename

    where filename is the backup filename, you get the correct path and time to use for restore.
    mota

Posting Permissions

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