select top 3 convert(numeric(3,0),
loginfo(db_id(), ‘xactspanbyspid’, t.spid)) as XACTSPAN,
convert(char(4), t.spid) as SPID,
convert(char(20), t.starttime) as STARTTIME,
convert(char(4), p.suid) as SUID,
convert(char(15), p.program_name) as PROGNAME,
convert(char(15), p.cmd) as COMMAND,
convert(char(16), p.hostname) as HOSTNAME,
convert(char(16), p.hostprocess) as HOSTPROCESS
from master..systransactions t, master..sysprocesses p
where t.spid = p.spid
Viewing the Span of a Transaction
select loginfo(4, 'xactspanbyspid', 15)
as xact_span_spid15_dbid4