Results 1 to 10 of 10
  1. #1
    Join Date
    Aug 2003
    Posts
    106

    Unanswered: Database backup and restore

    Version info - Source
    UDB Version 7 on windows server

    Version info - Destination
    UDB Version 8.1 Personal edition

    I took a backup of the database from the source and copied the file and was trying to restore in the destination but I am unable to proceed. It keeps on complaining about time stamp. I want to FORCE (see notes 2) restore the database

    Some notes
    1. I want to create a database in the destination which will be a image of the source
    2. In SQL server there is something like FORCED RESTORE meaning do not check any timestamp or anthing -- just restore without any checks. Does DB2 has something like this....

    Please let me know the best way to do this. Thanks

    You are the creator of your own destiny!

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    On DB2 for Windows you need to re-create the entire directory structure of the original backup file on the new server.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    Join Date
    Aug 2003
    Posts
    106
    Marcus_A,

    On DB2 for Windows you need to re-create the entire directory structure of the original backup file on the new server.
    Well...this is what I did:

    1. Backed up to some folder like c:/db2/backup/node0000/...... 110255.001 file from source server

    2. Restored the same directory structure in the destination and when restored requested that the file be picked up from this place

    Is there anything else I should do????

    You are the creator of your own destiny!

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    First run the db2ckbkp against the backup file to get the timestamp of the backup file. See the Command Reference for details.

    Once you have the timestamp, here is an example backup command for the following directory:

    E:\Backup\DB2\SAMPLE.0\DB2\NODE0000\CATN0000 (location of backup)

    RESTORE DATABASE SAMPLE FROM E:\\DB2\\Backup TAKEN AT 20040318144754 WITH 2 BUFFERS BUFFER 1024 WITHOUT PROMPTING

    where 20040318144754 is the timestamp obtained from the db2ckbkp program.

    When you backup and restore using the Control Center, you can see the commands that are generated by the "Show SQL" option, even if you don't submit the script via the Control Center.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  5. #5
    Join Date
    Aug 2003
    Posts
    106
    Marcus_A,

    I get the following message for the command DB2CKBKP -A 20040806

    DB2CKBKP ERROR: Opening file 20040806. Access denied.
    RC: -2079391743 [x840F0001] in ../tool/db2ckbkp.C at line 337
    Any help would be much appreciated

    You are the creator of your own destiny!

  6. #6
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    I thought your file name was 110255.001 ?

    This sounds like a Windows file permission problem.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  7. #7
    Join Date
    Aug 2003
    Posts
    106
    Marcus_A,

    Sorry I goofed up! That was a directory not the file! Working fine. Now trying to restore. Hopefully it works :-)

    You are the creator of your own destiny!

  8. #8
    Join Date
    Aug 2003
    Posts
    106
    Success! Thanks a lot!

    Just one question. Does the restored database need to exist to start with when I issue the restore command?

    You are the creator of your own destiny!

  9. #9
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    The restore utility can restore to a database with a name different from the database name in the backup image (in addition to being able to restore to a new database).

    You can download the Command Reference manual in PDF format from this site:
    http://www-306.ibm.com/software/data...manualsv8.html
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  10. #10
    Join Date
    Aug 2003
    Posts
    106

    Smile

    Marcus_A,

    Thanks a lot! I do have the manual - Let me read it!

    This thread is now closed

    You are the creator of your own destiny!

Posting Permissions

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