Results 1 to 3 of 3

Thread: DB2 Table Recovery from Online Backup

  1. #1
    Join Date
    Nov 2005
    Posts
    2

    DB2 Table Recovery from Online Backup

    If a table is dropped by user and I have an online database backup with all the logs upto the time it was backed up, how do i restore it back in DB2.

    I tried the following:
    ----------------------------------------------------------------------------
    Comment: DB2 BACKUP PROD ONLINE
    Start Time: 20051120034015
    End Time: 20051120034058
    Status: A
    ----------------------------------------------------------------------------
    EID: 1372 Location: c:\backups\PROD.0\DB2\NODE0000\CATN0000\20051120

    db2 => restore database prod from c:\backups
    db2 => restore database prod from c:\backups taken at 20051120034015
    SQL2539W Warning! Restoring to an existing database that is the same as the ba
    ckup image database. The database files will be deleted.
    Do you want to continue ? (y/n) y
    DB20000I The RESTORE DATABASE command completed successfully.
    db2 => rollforward database prod to end of logs and complete

    Rollforward Status

    Input database alias = prod
    Number of nodes have returned status = 1

    Node number = 0
    Rollforward status = not pending
    Next log file to be read =
    Log files processed = S0000033.LOG - S0000412.LOG
    Last committed transaction = 2005-11-19-22.25.01.000000

    DB20000I The ROLLFORWARD command completed successfully.
    db2 =>
    connect to prod was successful however when i gave select count(*) from test

    I get the following error:
    db2 => select count(*) from test
    SQL0204N "ADMINISTRATOR.TEST" is an undefined name. SQLSTATE=42704

    Why am i not able to see the dropped table even after the restore and rollforward are successful.

  2. #2
    Join Date
    Dec 2005
    Posts
    1
    try not to ROLLFORWARD all the logs you have .instead of rollforward to a timepoint using taken at YYYYMMDD.....

  3. #3
    Join Date
    Dec 2007
    Posts
    3
    mpm im facing this problem too. Any ideas in how to solve this?

Posting Permissions

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