October 25, 2007 at 1:19 pm
I'm sysadmin on a sql 2005 machine. Trying to STOP a TRACE and receiving error message:
You do not have permission to run 'SP_TRACE_SETSTATUS'
I'm using this syntax to STOP my Trace ID=1:
-- a) Stop a Trace:
DECLARE @TraceId int
SET @TraceId=1
EXEC sp_trace_setstatus @TraceId, 0
-- b) Clear a TRACE:
DECLARE @TraceId int
SET @TraceId=1
EXEC sp_trace_setstatus @TraceId, 2
October 29, 2007 at 3:36 pm
Is it possible for u to stop the server at night time and then delete the file from error log where this Trace might be active?
October 30, 2007 at 12:39 am
Check if your id has permissions. since you say that you are a sysadmin i would see that this should execute successfully. check the rights.
Cheers,
Sugeshkumar Rajendran
SQL Server MVP
http://sugeshkr.blogspot.com
October 30, 2007 at 1:06 am
Pleaze find link, on Tracing & how to configure performance on tracing stuff///etc., Hope this will find somehow useful to you in adopting these terminologies....
October 30, 2007 at 1:31 am
I could be mistaken, but is that the default trace you're trying to delete?
If so, change the server's property to prevent it from starting. I don't think you can close the default trace with sp_trace...
exec sp_configure 'default trace enabled', 0
reconfigure
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply