Hello all,
Is there a way to display (using TSQL) the actual statement that
a SPID is executing?
When I use dbcc inputbuffer(SPID) all I ever get is "sp_executesql;1" :-(
Thanks
PS: I cannot use the profilerPossibly fn_get_sql can be of help. There are some things to think about when using this (it was
introduced in SQL2K sp3), so Google and KB search and read about it first.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Strider" <Strider@.discussions.microsoft.com> wrote in message
news:582B477A-97A3-447C-826F-270E784D84D9@.microsoft.com...
> Hello all,
> Is there a way to display (using TSQL) the actual statement that
> a SPID is executing?
> When I use dbcc inputbuffer(SPID) all I ever get is "sp_executesql;1" :-(
> Thanks
> PS: I cannot use the profiler|||Thank you Tibor.
This is just what I needed!
"Tibor Karaszi" wrote:
> Possibly fn_get_sql can be of help. There are some things to think about when using this (it was
> introduced in SQL2K sp3), so Google and KB search and read about it first.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Strider" <Strider@.discussions.microsoft.com> wrote in message
> news:582B477A-97A3-447C-826F-270E784D84D9@.microsoft.com...
> > Hello all,
> >
> > Is there a way to display (using TSQL) the actual statement that
> > a SPID is executing?
> >
> > When I use dbcc inputbuffer(SPID) all I ever get is "sp_executesql;1" :-(
> >
> > Thanks
> >
> > PS: I cannot use the profiler
>
>
No comments:
Post a Comment