2012年2月18日星期六

Any help on sp_trace_getdata

Hi
I have created a trace and then I tried reading trace through
sp_trace_getdata by specifying the correct trace id.
But query analyser become busy in continously executing sp_trace_getdata and
does return any result for long time.
Can any one suggest how should I call sp_trace_getdata to get the result
asynchronously, of the trace as when it is generated.
Thanks
Pushkar
Are you trying to consume the trace rowset? If you are using SQL Query
Analyzer, make sure you are not sending it to the grid, but to the text
window.
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2005 All rights reserved.
"Pushkar" <tiwaripushkar@.yahoo.co.in> wrote in message
news:%23pJuSu3ZFHA.3808@.TK2MSFTNGP14.phx.gbl...
> Hi
> I have created a trace and then I tried reading trace through
> sp_trace_getdata by specifying the correct trace id.
> But query analyser become busy in continously executing sp_trace_getdata
> and
> does return any result for long time.
> Can any one suggest how should I call sp_trace_getdata to get the result
> asynchronously, of the trace as when it is generated.
> Thanks
> Pushkar
>
|||Thanks a lot Gert.
When sending the output to the text it worked. But why it was not working
while sending the output to a grid?
How can I write a application or extended stored procedure that can consume
the trace rowset and update some table?
Please help me out.
Thanks a lot.
Pushkar
"Gert E.R. Drapers" <GertD@.SQLDevNet> wrote in message
news:uiN6eVBaFHA.464@.TK2MSFTNGP15.phx.gbl...
> Are you trying to consume the trace rowset? If you are using SQL Query
> Analyzer, make sure you are not sending it to the grid, but to the text
> window.
> GertD@.SQLDev.Net
> Please reply only to the newsgroups.
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> You assume all risk for your use.
> Copyright SQLDev.Net 1991-2005 All rights reserved.
> "Pushkar" <tiwaripushkar@.yahoo.co.in> wrote in message
> news:%23pJuSu3ZFHA.3808@.TK2MSFTNGP14.phx.gbl...
>
|||Because the grid will consume rows until it gets end of rowset, which in
case of SQL Trace will only happen when you stop the trace.
This is a behavior of the grid in Query Analyzer, OSQL and when using the
text window will pull rows directly and display them, like profiler does,
you can do exactly the same thing.
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2005 All rights reserved.
"Pushkar" <tiwaripushkar@.yahoo.co.in> wrote in message
news:u1oS9BCaFHA.3864@.TK2MSFTNGP10.phx.gbl...
> Thanks a lot Gert.
> When sending the output to the text it worked. But why it was not working
> while sending the output to a grid?
> How can I write a application or extended stored procedure that can
> consume
> the trace rowset and update some table?
> Please help me out.
> Thanks a lot.
> Pushkar
>
>
>
> "Gert E.R. Drapers" <GertD@.SQLDevNet> wrote in message
> news:uiN6eVBaFHA.464@.TK2MSFTNGP15.phx.gbl...
> rights.
>
|||Thanks
Pushkar
"Gert E.R. Drapers" <GertD@.SQLDevNet> wrote in message
news:eSPrx6HaFHA.3132@.TK2MSFTNGP09.phx.gbl...
> Because the grid will consume rows until it gets end of rowset, which in
> case of SQL Trace will only happen when you stop the trace.
> This is a behavior of the grid in Query Analyzer, OSQL and when using the
> text window will pull rows directly and display them, like profiler does,
> you can do exactly the same thing.
> --
> GertD@.SQLDev.Net
> Please reply only to the newsgroups.
> This posting is provided "AS IS" with no warranties, and confers no
rights.[vbcol=seagreen]
> You assume all risk for your use.
> Copyright SQLDev.Net 1991-2005 All rights reserved.
> "Pushkar" <tiwaripushkar@.yahoo.co.in> wrote in message
> news:u1oS9BCaFHA.3864@.TK2MSFTNGP10.phx.gbl...
working
>

没有评论:

发表评论