标签:
转自:http://bbs.csdn.net/topics/390903317
--Step #1:
USE [LowesCaMPMS.NET_Test]
GO
SELECT
[Transaction ID],
Operation,
Context,
AllocUnitName
FROM
fn_dblog(NULL, NULL)
WHERE
Operation = ‘LOP_DELETE_ROWS‘ and
AllocUnitName= ‘dbo.Vehicle.PK_Vehicle‘
-- 这里 ‘dbo.Test.PK__Test__5F573DD6‘指表名的PK_Name
-- 可以使用 SP_Pkeys SourceTableName 查到
--Step #2:
SELECT
Operation,
[Transaction ID],
[Begin Time],
[Transaction Name],
[Transaction SID]
FROM
fn_dblog(NULL, NULL)
WHERE
[Transaction ID] =‘0000:0010847e‘ -- 这里 ‘0000:0005afba‘ 指Step #1中的Transaction ID
AND
[Operation] = ‘LOP_BEGIN_XACT‘
--Step #3:
USE MASTER
GO
SELECT SUSER_SNAME(0x01) ‘UserID‘ --这里‘0000:0005afba‘ 值Step #2中的Transaction SID
标签:
原文地址:http://www.cnblogs.com/haoxiwang001/p/5110985.html