Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How To recover db2 table data which I made clean up

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
cmsmoon

New User


Joined: 17 Jun 2010
Posts: 72
Location: Chennai

PostPosted: Thu Feb 28, 2013 11:27 am    Post subject: How To recover db2 table data which I made clean up
Reply with quote

Hi Friends,

Recently I clean up one table and loaded recent prod data.Unforuntly i didn't take back up previous table records. Is possible to recover those table records?
Back to top
View user's profile Send private message

sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Thu Feb 28, 2013 12:09 pm    Post subject:
Reply with quote

Hi cmsmoon,

It depends on, how you did the clean up, how many rows were deleted and how recent?
a) ran DELETE statement
b) Truncate
c) Dummy load

If its test, best option is to copy the data from some other environment and work on it. If you have built the data, depending on the method used to cleanup, data can be got back from the logs if possible, it also depends on the log retention policy of your shop and how important the data is.

Best person would be your DBA to make that call, because unknown to you if there are image copies taken in the weekend. You will be lucky

Thanks,
Sushanth
Back to top
View user's profile Send private message
cmsmoon

New User


Joined: 17 Jun 2010
Posts: 72
Location: Chennai

PostPosted: Thu Feb 28, 2013 12:14 pm    Post subject:
Reply with quote

sushanth bobby wrote:
Hi cmsmoon,

It depends on, how you did the clean up, how many rows were deleted and how recent?
a) ran DELETE statement
b) Truncate
c) Dummy load

If its test, best option is to copy the data from some other environment and work on it. If you have built the data, depending on the method used to cleanup, data can be got back from the logs if possible, it also depends on the log retention policy of your shop and how important the data is.

Best person would be your DBA to make that call, because unknown to you if there are image copies taken in the weekend. You will be lucky

Thanks,
Sushanth



Hi sushan,
Thanks For yor replay..I used DELETE STATEMENT..

Is possible to use RESTORE QUERY?

RESTORE DATABASE dbname TABLESPACE (tablespace_name,tablespace_name,...) FROM directory TAKEN AT timestamp
;

But, I didn't know what value we need to give in "'directory'"

for your reference

http://it.toolbox.com/blogs/db2luw/db2-recovery-basics-part-1-22758
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Thu Feb 28, 2013 12:30 pm    Post subject:
Reply with quote

cmsmoon,

That's DB2 LUW not mainframe DB2 z/OS, it will not work.

Since, you have used DELETE statement, going through the logs is your option. So to do that, you should have tools like Log Analyzer at your shop. Since it takes lots of CPU and recalls lots of log datasets, best advice to you is contact your DBA.

Thanks,
Sushanth
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Feb 28, 2013 1:03 pm    Post subject: Re: How To recover db2 table data which I made clean up
Reply with quote

cmsmoon wrote:
Recently I clean up one table and loaded recent prod data.Unforuntly i didn't take back up previous table records. Is possible to recover those table records?
The way you write it, it looks like, you've loaded the data to 'test-region'. Unless, you've your own back of the "earlier user data", chances of getting it back are very slim. Logs might be of help, as Sushanth has pointed to, but for a single user request I dobut if DBA team will be that friendly.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us