Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have a SQL2008 server that runs a custom application that starts and then stops a SQL trace every 60 seconds (it does some reporting and summarization on the trace data).

The problem is that my SQL logs are filling up with the "SQL Trace ID 1 was started" and "SQL Trace stopped" entries. This makes it hard to browse through and identify other unusual events.

I can't find any way to turn logging of this event off. Any ideas?

For your reference, I did find a couple of partially-related articles:

  • Microsoft KB 307538 mentions that this was "fixed" (to add logging) in SQL2000 SP2
  • This newsgroup question asks the same question I had, the only answer given is using the "-n" startup parameter to keep all SQL events from showing up in the Application Event log. That's not what I want, though. I want to keep these from being logged in the SQL log at all.

EDIT with some additional curious findings:

This same application is also running on a SQL 2000 server (with SP4). Strangely, the trace start/stop events do not show up in the SQL logs on that server, although they do show up in the Application event log as "19030: SQL Trace started" and "19031: SQL Trace stopped".

If there were a way to revert SQL2008 to this behavior (write to app log, but not SQL log), then that would be nice :)

share|improve this question
    
We, too are experiencing this problem with SQL 2008 R2 and would like to know if there is a solution since Flag 3688 does NOT appear to supress these messages. –  user6576 Feb 9 '12 at 18:42
    
@TomL: Never found a direct solution. In our case, we stepped back and looked at why we had created the original job (to give developers access to trace data, since in SQL 2000 running the SQL profiler required SYSADMIN permissions). In SQL 2005/2008, running SQL profiler just requires ALTER TRACE permissions, so we just granted this and disabled the job. –  BradC Feb 9 '12 at 21:45
    
@TomL: One additional way you can work around this (or similar situations where the SQL log is filling up with junk) is to query the SQL log using TSQL, applying a filter. I have a script that uses INSERT INTO #ERRORLOG EXEC XP_READERRORLOG 0 to read the log into a temp table, then just SELECT FROM #ERRORLOG WHERE LogText NOT LIKE 'SQL TRACE%' or something like that. –  BradC Feb 9 '12 at 21:55
add comment

2 Answers

I believe there is a KB for your question: http://support.microsoft.com/kb/922578

share|improve this answer
add comment

Please enable Trace Flag 3688 and restart the instance. This should prevent these messages from appearing in the SQL Server Error Log

share|improve this answer
    
Will give that a shot. That trace flag is annoyingly missing from the list of supported flags at msdn.microsoft.com/en-us/library/ms188396.aspx –  BradC Feb 16 '11 at 15:54
    
Unfortunately, this trace flag doesn't seem to work in SQL 2008 –  BradC Mar 9 '11 at 20:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.