Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 how to stop SQL Profiler tracer from running

Author  Topic 

alejo46
Posting Yak Master

157 Posts

Posted - 2012-10-24 : 17:22:38
Good afternoon, i need your help plase
some days ago there is an ongoing procces which the sentence is: exec [master].dbo.sp_trace_getdata 8 asn is causing a strain to database server

so ive tried to find out which process is related to in order to stop and it has something to do with SQL Profiles.

i killed the proccess many time sbut in a few seconss the Sql Profiler triggers the command again

Im mot a DBA but ive got 2 questions:

1. is there anyway to stop from running by denyng EXEC permissions to the user ?
I identified the tracer and oen the SQL Profiler but the pay/stop buttons are disable

2nd. i tested 2 select commands i found useful in an article posted 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 yieñded 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 doenst have to do with permissions or something likke that ?
How can i solve it ?
Thnaks a lot in advanced

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-10-24 : 17:24:22
The default trace is not putting a strain on your server. What led you to believe that?

sp_trace_setstatus is the proper way to stop/close the user initiated traces. As far as denying permissions, restrict who has sysadmin.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

alejo46
Posting Yak Master

157 Posts

Posted - 2012-10-24 : 17:41:09
OK thanks, i mean a strain on the sarver because i notice performance problems on the ongoing producction sql processes which are running slower.

2nd. How doesthe sp_trace_setstatus exactly work ? and is any additional paratemer to stop/close the user initiated traces ?

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-10-24 : 17:47:02
You are running sp_trace_setstatus correctly. It's just that you can't stop/close the default trace that way. The default trace is a system generated trace and not one a user initiated. It is there by default. I highly doubt your system is at all impacted by the default trace.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -