Is it possible to view
delete statements that have recently occurred in the Transaction Log?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
you wont find the exact scripts that were executed on sql.(in the transaction log)
A transaction log is a file that contains information regarding every change that has been made to the database. This includes data modifications (transactions), database modifications, and backup/restore events.
The primary purpose the transaction log is to provide a method to be able to restore a database to a point-in-time when necessary. This can include rolling back transactions to a certain time, or to roll forward transactions from a full backup restoration.
to know more about Transaction log http://www.sqlservercentral.com/articles/Design+and+Theory/63350/
here is a script to show you recent ran delete queries
You can view the individual rows that were deleted by looking for LOP_DELETE_ROWS operations still in the log:
If the log was recycled (in simple recovery model) or truncated by backup (in full or bulk recovery model) then you will only be able to see the log operations still available in the log.
Understanding the log operations is quite complex, you need to be aware of things like undo or compensating operations to make sense of some log patterns you can encounter, but straight forward committed DELETEs are fairly easy to comprehend.