Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2004
    Posts
    48

    Cool Unanswered: 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

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

  3. #3
    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.

  4. #4
    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.

Posting Permissions

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