Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

sp_trace_getdata SP Expand / Collapse
Author
Message
Posted Tuesday, October 23, 2012 1:17 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Saturday, December 8, 2012 8:24 PM
Points: 40, Visits: 135
In a production system i've seen a store procedure running all the time

exec [master].dbo.sp_trace_getdata 8

even thouh i kill the proccess 1 minute later it shows uo again
could anybody tell me what it does and if this SP produces an overhead to the system?

Is there any way to know who or which client application is triggerring thas SP (Maybe a SQL Profiler) ?

If this SP produce an overhead how can i deactivate this SP ?
Thanks in advanced
Post #1376215
Posted Tuesday, October 23, 2012 2:49 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 11:55 AM
Points: 12,905, Visits: 32,165
sp_trace_getdata is used by SQL Profiler to read it's trace and return the results to the SQL Profiler GUI/application;

SQL Profiler is definitely known to have an impact on SQL server...it potentially can have a very severe performance impact if the trace is catching lots of events.

the way to deactivate it is to not allow anyone to run SQL Profiler;
you can see who's running it by running sp_who2, and find any thing that has ProgramName like SQL Profiler.
For that row(s) , look at the username and the hostname, so you know who is using Profiler, and at what machine, and make them stop using profiler.


if you need to trace something , make a server side trace and use that instead; SQL Profiler can make the trace definition for you.

a server side trace has a much much lighter impact on the server.


Lowell

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #1376248
Posted Wednesday, October 24, 2012 3:08 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Saturday, December 8, 2012 8:24 PM
Points: 40, Visits: 135

OK Thanks. Ive got the user and hostname, Im no a DBA and the question is how to make them stop using profiler ?(Maybe denyng EXEC permissios to the user ?

secondly youre right when you said it is to not allow anyone to run SQL Profiler becase when i open the tracer in the SQL profiler the reply/stop buttons are disable, besides i tested one select commands i found useful in an article posted in this great forum how to stop it from running but didnt work out, maybe you can help me out:

Execute "select * FROM ::fn_trace_getinfo(default)" - OK
Identify the traceid you using the folder name specified when starting the trace. OK

THE BELOW SENTENCES yielded me an error:

Execute these two commands replacing # with the trace id.
EXEC sp_trace_setstatus @traceid = #, @status = 0; -- Stop/pause Trace
EXEC sp_trace_setstatus @traceid = #, @status = 2; -- Close trace and delete it from the server

Server: Msg 19070, Level 16, State 1, Procedure sp_trace_setstatus, Line 1
The default trace cannot be stopped or modified. Use SP_CONFIGURE to turn it off.
the above error doent have to do with permissions or something likke that ?
How can i solve it ?
Thnaks a lot in advanced


Post #1376690
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse