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 > How to know who deleted the rows and what sql was used ?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-03-05, 11:27
MahendraSetty MahendraSetty is offline
Registered User
 
Join Date: Apr 2004
Posts: 48
Cool How to know who deleted the rows and what sql was used ?

OS390, DB2 Ver 7

We suddenly found a large number of rows missing in one of our tables. Is there a way to find who did what and how ? We dont have any third party tools to help. Any suggestions or steps to find this info is highly appreciated.

Thanks
Reply With Quote
  #2 (permalink)  
Old 03-03-05, 12:49
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
There are tools to read the logs, but they cost money. BMC is one vendor that provides one.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 03-04-05, 05:58
WJanissen WJanissen is offline
Registered User
 
Join Date: Mar 2005
Posts: 1
Hi

You can do that only with DB2 core utilities. First, you have to run a report recovery against the table in question. There you will get a listing about UR with a time, when this UR was created and STARTRBA and STOPRBA. With these values you can run the DSN1LOGP-utility to get the records from the log (this can be a huge amount of data). In these log datasets you will find records like 'DELETE IN A PAGE' with a userid displayed. It is a little bit cumbersome, but I did it some times with success.
Reply With Quote
  #4 (permalink)  
Old 03-08-05, 12:17
MahendraSetty MahendraSetty is offline
Registered User
 
Join Date: Apr 2004
Posts: 48
Thanks very much , I was able to get the userid's. How to get the sql run to delete the rows ?

Thanks again.
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