Turn off entries in Application Log

GaryHampsonGaryHampson Posts: 19
edited September 17, 2007 5:07AM in SQL Backup Previous Versions
Is there a way to turn off writing to the Application Event Log upon RESTORE or BACKUP?

Comments

  • peteypetey Posts: 2,358 New member
    If you are referring to message such as these :
    18264 : Database backed up: Database: pubs, creation date(time): 2006/11/15(06:27:44), pages dumped: 2715, first LSN: 137:326:1, last LSN: 137:328:....
    
    these messages are generated by SQL Server, and are generated for both native and third-party backups. I don't know of any option to turn this off.
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    It's not terribly intuitive, but it is possible by setting a SQL Server trace flag:

    DBCC TRACEON (3226, -1)

    To persist the setting between reboots, go into the server properties and then the startup parameters, and add -T3226. Otherwise you will get event logging again if you restart SQL Server.

    This should stop SQL Server from writing backup events to the event log. If you have enabled event logging for the job in the SQL Agent's job properties, that would probably override the trace flag, so you would want to check the notifications tab of your job properties to make sure it's not going to get logged that way.

    I hope this helps!
Sign In or Register to comment.