SQL Server Logging

  • Anyone know if there is a way to stop SQL from writing certain events to the Windows Event log? Perhaps stopping it from just doing a certain event ID or something?

    We are using Idera's SQL Compliance manager to audit our environment. It uses SQL traces to collect it's data, and starts and stops about a dozen traces every 3-5 min. or so. It creates a log entry for each start and stop (about 2 dozen entries every 3-5 min, almost 100 K records a month)

    The logs don't really hurt anything exactly, but it makes it a pain to filter thru everything if you want to troubleshoot anything. And our hardware guys want us to get rid of them because they are working on somehow replicating the logs to a central server to make their work easier.

    Anyone know how to do that? I've googled arround a little bit and looked in BOL and don't see anything obvious. The only thing I see is the -n startup option, but it looks like that totally stops it from writing all event log records.

    (examples of events)

    Event Type:Information

    Event Source:MSSQLSERVER

    Event Category:(2)

    Event ID:19031

    Date:1/7/2009

    Time:2:20:06 PM

    User:

    Computer:MAW-2K-SRVR

    Description:

    SQL Trace stopped. Trace ID = '7'. Login Name = ' '.

    Event Type:Information

    Event Source:MSSQLSERVER

    Event Category:(2)

    Event ID:19030

    Date:1/7/2009

    Time:2:20:06 PM

    User:

    Computer:MAW-2K-SRVR

    Description:

    SQL Trace ID 4 was started by login " ".

    The Redneck DBA

  • The only thing you could do is as you've already found, use the -n startup problem, but as you also state, the trade off is that you don't get any errors logged.

    Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008
    My Blog | Twitter | MVP Profile
    Training | Consulting | Become a SQLskills Insider
    Troubleshooting SQL Server: A Guide for Accidental DBAs[/url]

  • Jason Shadonix (1/7/2009)


    Anyone know if there is a way to stop SQL from writing certain events to the Windows Event log? Perhaps stopping it from just doing a certain event ID or something?

    We are using Idera's SQL Compliance manager to audit our environment. It uses SQL traces to collect it's data, and starts and stops about a dozen traces every 3-5 min. or so. It creates a log entry for each start and stop (about 2 dozen entries every 3-5 min, almost 100 K records a month)

    The logs don't really hurt anything exactly, but it makes it a pain to filter thru everything if you want to troubleshoot anything. And our hardware guys want us to get rid of them because they are working on somehow replicating the logs to a central server to make their work easier.

    Anyone know how to do that? I've googled arround a little bit and looked in BOL and don't see anything obvious. The only thing I see is the -n startup option, but it looks like that totally stops it from writing all event log records.

    (examples of events)

    Event Type:Information

    Event Source:MSSQLSERVER

    Event Category:(2)

    Event ID:19031

    Date:1/7/2009

    Time:2:20:06 PM

    User:

    Computer:MAW-2K-SRVR

    Description:

    SQL Trace stopped. Trace ID = '7'. Login Name = ' '.

    Event Type:Information

    Event Source:MSSQLSERVER

    Event Category:(2)

    Event ID:19030

    Date:1/7/2009

    Time:2:20:06 PM

    User:

    Computer:MAW-2K-SRVR

    Description:

    SQL Trace ID 4 was started by login " ".

    I think Default trace is enable.

    please checK from sp_configure..

    _____________________________________________________________________________________________________________
    Paresh Prajapati
    ➡ +919924626601
    http://paresh-sqldba.blogspot.com/[/url]
    LinkedIn | Tweet Me | FaceBook | Brijj

  • Paresh,

    The default trace won't affect the verbosity of the logging that SQL Server does to the Windows Event Logs.

    Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008
    My Blog | Twitter | MVP Profile
    Training | Consulting | Become a SQLskills Insider
    Troubleshooting SQL Server: A Guide for Accidental DBAs[/url]

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply