If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Recover a Dropped Table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-17-03, 03:24
subbu subbu is offline
Registered User
 
Join Date: Nov 2003
Posts: 7
Arrow Recover a Dropped Table

Hi Gurus,

I got a problem it is yester evening i have taken online backup.Today my office started at 10:30. At 11:45 unexpectedly one has been dropped after 1 hour my user told that application is giving runtime error.and i verified and i found one table has been dropped regarding that transaction.The remaining tables got some transactions.

Now I want to recover that table without losing any data of that table and not disturbing our users.

Please its very very urgent.

Your answer is fully appriciated.

Thanks
Reply With Quote
  #2 (permalink)  
Old 11-17-03, 04:33
cgprakash cgprakash is offline
Registered User
 
Join Date: Feb 2002
Posts: 96
What is the state of 'drop_recovery' column in your tablespace?
Is it 'Y' or 'N' ?

Regards
Prakash
Reply With Quote
  #3 (permalink)  
Old 11-17-03, 04:49
subbu subbu is offline
Registered User
 
Join Date: Nov 2003
Posts: 7
Arrow

Hi Prakash,

The DROP_RECOVERY='Y'.
Reply With Quote
  #4 (permalink)  
Old 11-17-03, 06:08
cgprakash cgprakash is offline
Registered User
 
Join Date: Feb 2002
Posts: 96
Ok. Good.
Try the following steps.

1. db2 "list history dropped table since 20031117 for dbalias"
2. db2 "restore db dbalias tablespace (tablespace_data,tablespace_index) from xxx_location without prompting"
3. db2 "rollforward db dbalias to end of logs and stop tablespace (tablespace_data,tablespace_index) recover dropped table dropped_table_id_from_step1 to xxx_some_location"
4. In step 3, you will get data.
5. Create table and export data from step4.
6. You should have all the archived log (from online backup time).

Test these steps in development first before doing in production.
Good luck.

Regards
Prakash
Reply With Quote
  #5 (permalink)  
Old 11-17-03, 06:41
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
In the Useful DB2 Stuff / db2click.com , you will find a link to a FAQ titled 'Recovery of Accidentally Dropped Tables' which should be of help to you ...

Cheers
Sathyaram

PS: There is a note on how to use tek-tips.com . Please read it as well


Quote:
Originally posted by subbu
Hi Prakash,

The DROP_RECOVERY='Y'.
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #6 (permalink)  
Old 11-17-03, 08:28
cgprakash cgprakash is offline
Registered User
 
Join Date: Feb 2002
Posts: 96
That's great sathyaram. Your link is more detailed and descriptive.

Regards
Prakash
Reply With Quote
  #7 (permalink)  
Old 11-18-03, 01:14
subbu subbu is offline
Registered User
 
Join Date: Nov 2003
Posts: 7
Thanks for UR reply.

Thanks
Subbu
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On