Tuesday, February 14, 2012

Command TExt

How do I best get the "entire" text of the commands being executed on my SQL
2000 server?
I would like to query the database tables or schema views, not run a trace.
Again, Profiler is not an option.
cmd column from master..sysprocesses does not provide, dbcc
inputbuffer(spid) returns a truncated value...
My goal is to have a vb client query sysprocesses for all "running"
processes, then for each running spid - what is the command it is executing.
.
TIA,
ChrisThe only way is through a trace job. Sysprocesses, dbcc inputbuffer, or
even fn_get_sql() doesn't have a large enough buffer to show all large
commands.
"Chris" <Chris@.discussions.microsoft.com> wrote in message
news:CD692AD8-2C0C-4475-9681-700CD03F4334@.microsoft.com...
> How do I best get the "entire" text of the commands being executed on my
> SQL
> 2000 server?
> I would like to query the database tables or schema views, not run a
> trace.
> Again, Profiler is not an option.
> cmd column from master..sysprocesses does not provide, dbcc
> inputbuffer(spid) returns a truncated value...
> My goal is to have a vb client query sysprocesses for all "running"
> processes, then for each running spid - what is the command it is
> executing...
> TIA,
> Chris|||fn_get_sql() should be pretty close to get what you want (cached ones
anyway).
Linchi
"Danny" <someone@.nowhere.com> wrote in message
news:Co_2f.17216$at1.15123@.trnddc05...
> The only way is through a trace job. Sysprocesses, dbcc inputbuffer, or
> even fn_get_sql() doesn't have a large enough buffer to show all large
> commands.
>
> "Chris" <Chris@.discussions.microsoft.com> wrote in message
> news:CD692AD8-2C0C-4475-9681-700CD03F4334@.microsoft.com...
>|||Hi,
SQL Profilor is ur last arm u can use.C2 trace level can do this for u
but i dont weather is it posible to trasfer that in a table.
from
Doller
Danny wrote:[vbcol=seagreen]
> The only way is through a trace job. Sysprocesses, dbcc inputbuffer, or
> even fn_get_sql() doesn't have a large enough buffer to show all large
> commands.
>
> "Chris" <Chris@.discussions.microsoft.com> wrote in message
> news:CD692AD8-2C0C-4475-9681-700CD03F4334@.microsoft.com...

No comments:

Post a Comment