snippetsqlMinor
How to reduce the number of things SQL Server puts in the windows event viewer?
Viewed 0 times
numberthethingssqlviewerreduceputswindowshowserver
Problem
As part of our automated unit tests, a lot of databases get created, set up, then dropped. The problem is that every time this happens, we get a bunch of records from SQL Server in the Windows Event Viewer. The messages are mostly things like: "Starting Up", "Setting database option", and "index restored".
Is there any way to modify the SQL Server config so that it doesn't log these trivial "Information"-level events to the event log. They are filling up the log so that it becomes very difficult to find useful information.
Is there any way to modify the SQL Server config so that it doesn't log these trivial "Information"-level events to the event log. They are filling up the log so that it becomes very difficult to find useful information.
Solution
Note: This will not limit what gets logged. It justs stops logging in Windows Event log.
There are some stuff that you can prevent like - successful completion of log backups using Trace Flag 3226
Have a look at -n startup parameter.
From Database Engine Service Startup Options :
Does not use the Windows application log to record SQL Server events. If you start an instance of SQL Server with -n, we recommend that you also use the -e startup option. Otherwise, SQL Server events are not logged.
There are some stuff that you can prevent like - successful completion of log backups using Trace Flag 3226
Have a look at -n startup parameter.
From Database Engine Service Startup Options :
Does not use the Windows application log to record SQL Server events. If you start an instance of SQL Server with -n, we recommend that you also use the -e startup option. Otherwise, SQL Server events are not logged.
Context
StackExchange Database Administrators Q#46785, answer score: 9
Revisions (0)
No revisions yet.