-- What text is the sp executing?
DECLARE @sqltext VARBINARY(128)
SELECT @sqltext = sql_handle
FROM sys.sysprocesses
WHERE spid = 339
SELECT TEXT
FROM sys.dm_exec_sql_text(@sqltext)
GO
Joe's Knowledge Base - a collection of various tips-n-tricks for SQL Server. Note: best effort to site sources where applicable, otherwise curated from BOL/MSDN or self-created.
No comments:
Post a Comment