sp_who2
DECLARE @sqltext VARBINARY(128)
SELECT @sqltext = sql_handle
FROM sys.sysprocesses
WHERE spid = 51
SELECT TEXT
FROM ::fn_get_sql(@sqltext)
sp_who2
DECLARE @sqltext VARBINARY(128)
SELECT @sqltext = sql_handle
FROM sys.sysprocesses
WHERE spid = 51
SELECT TEXT
FROM ::fn_get_sql(@sqltext)
Comments