Neal Hudson
Neal Hudson

Reputation: 231

How can I view SQL Server 2005 Transaction log file

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

Upvotes: 5

Views: 13901

Answers (2)

Preet Sangha
Preet Sangha

Reputation: 65466

Select * from ::fn_dblog(null,null)

Is a virtual table over the log

Upvotes: 3

Ardalan Shahgholi
Ardalan Shahgholi

Reputation: 12555

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

Upvotes: 1

Related Questions