5

How can I view the SQL Server Transaction Log File (.trn)?

I'd like to be able to look inside the trn file at the individual transactions. Some records were deleted from a database and I need to know when, how and by who.

Thanks Neal

Edit: I have .bak files from before and after the deletion, and .trn files from during.

Edit (2010-11-16): Discussed at length here: http://www.sqlservercentral.com/Forums/Topic1019240-357-1.aspx

Neal Hudson
  • 231
  • 1
  • 5
  • 17

2 Answers2

3
Select * from ::fn_dblog(null,null)

Is a virtual table over the log

Preet Sangha
  • 64,563
  • 18
  • 145
  • 216
1

Use this command :

Select * from ::fn_dblog(null,null)

And for more information see this link : How Do You Decode A Simple Entry in the Transaction Log

Ardalan Shahgholi
  • 11,967
  • 21
  • 108
  • 144