|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Yesterday @ 8:39 AM
Points: 121,
Visits: 382
|
|
| How can I capture the full sql stmt if I have spid that is blocking? I use dbcc inputbuffer but getting truncated after 255 characters. neone with ne script or way to get full stmt? thanks!
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Yesterday @ 8:39 AM
Points: 121,
Visits: 382
|
|
Found it but doesn't work all time. as long as its in cache.
DECLARE @Handle binary(20) SELECT @Handle = sql_handle FROM master.dbo.sysprocesses WHERE spid = spid#
SELECT * FROM ::fn_get_sql(@Handle)
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: 2 days ago @ 11:43 AM
Points: 1,
Visits: 303
|
|
| Try capturing the results of dbcc inputbuffer to text
|
|
|
|