Results 1 to 8 of 8
  1. #1
    Join Date
    Dec 2008
    Posts
    5

    Unanswered: recovery of rows

    hi,

    I have one issue that, i deleted 15rows from the table test. After 10min of deletion, i need those 15rows back. So how can we get those. Explain in brief please.



    thanks & regards
    vijay

  2. #2
    Join Date
    Jul 2006
    Location
    Pune , India
    Posts
    433
    Restore and roll forward
    Rahul Singh
    Certified DB2 9 DBA / Application Developer

  3. #3
    Join Date
    May 2007
    Location
    somewhere in dbforums
    Posts
    221
    Chances of getting that increases provided you have archival mode of logging and not circular.....
    IBM Certified Database Associate, DB2 9 for LUW

  4. #4
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    or if you have recovery expert : this can recover deletes from the log
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  5. #5
    Join Date
    Dec 2008
    Posts
    5

    restore of rows

    Quote Originally Posted by rahul_s80
    Restore and roll forward
    no its not possible. i need those rows only. How
    for eg: i didnt take backup of that db. So how can we get those rows?

  6. #6
    Join Date
    Dec 2008
    Posts
    5

    restore of rows

    Quote Originally Posted by nick.ncs
    Chances of getting that increases provided you have archival mode of logging and not circular.....

    we can restore tablespace or database by using restore command. But here the point is, i need rows only. So how it will possible? HOw can we get those deleted rows.

  7. #7
    Join Date
    Dec 2003
    Location
    Duesseldorf - Germany - Europe - Earth - Galaxy
    Posts
    18
    If you say "delete from table" and commit this there is no "legal" chance to restore the rows deleted with SQL. There is no "trash"-area in relational databases except you create one yourself and handle it yourself. But as a dba you can *try* to restore them.

    At least you need a backup copy of the database containing the rows.

    Which DB2 do you use?
    DB2 zOS V8++:
    Use the UNLOAD Utility to unload all the rows of the table from that copy (needs the FROMCOPY-clause) Delete all rows not needed from the unloadfile and load the ones you want into the original table.

    DB2 UDB:
    Restore the database backup into another database usindg RESTORE REDIRECT. Use the EXPORT comand to export the rows you need and the IMPORT command to load them into the original database.

    I coult post samples for both platforms.

    Regards,
    Volker.

  8. #8
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    Quote Originally Posted by vijay0708
    we can restore tablespace or database by using restore command. But here the point is, i need rows only. So how it will possible? HOw can we get those deleted rows.
    Maybe I'm missing your point, but what's the problem? You take the backup, restore it in another system/DB2 instance that you set up, extract the rows you want and export them, then load them again in the desired target system.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

Posting Permissions

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