-
SP for SPID detailed information (MSSQL)?
I'm looking for a Stored Procedure in MS SQL that accepts the SPID as it's parameter and returns detail information on the process/script associated with said SPID.
-Allen
Last edited by ecka00; 03-01-2006 at 11:25 AM.
-
Try 'sp_who2 spid' like 'sp_who2 51'.
-
nope, the sp_who2 gives me essentially the same information that i can get through activity within enterprise manager. I'm looking for something that will give me the actual command of execution (textdata) like in sql profiler.
-
Then use 'dbcc inputbuffer(spid)'.
-
You can also use fn_get_sql to get more detailed information than dbcc.
DECLARE @Handle binary(20)
SELECT @Handle = sql_handle FROM sysprocesses WHERE spid = 52
SELECT * FROM ::fn_get_sql(@Handle)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|