Search This Blog

Thursday, June 16, 2011

Finding out who dropped a table using the transaction log

a particular table was dropped plus the UID and SPID of who dropped it.

Drop:

SELECT
  [Transaction Id], [Transaction Name],[Begin Time], [SPID] ,[TRansaction SID] FROM ::fn_dblog (NULL, NULL) WHERE


user_transaction
DROPOBJ
CREATE INDEX
FirstPage Alloc
INSERT
NULL
UpdateQPStats
Allocate Root
SplitPage
CREATE TABLE
StartupDB
[Transaction Name] = 'DROPOBJ'

No comments:

Post a Comment