1

How do i stop logging unwanted messages in SQL error logs, I enabled DBCC TRACEON (3226,-1) to avoid logging successful backups, likewise is there any other trace flags or any message id's to disable in msdb.dbo.sp_altermessage to stop them Below is the example of unwanted messages i want to stop logging enter image description here Thanks in Advance

2

How do i stop logging unwanted messages in SQL error logs […] likewise is there any other trace flags […]

No, there are no trace flags to turn this logging off.

If you'd like to give some feedback on making a trace flag or have this disabled by default, put in a suggestion on User Voice with this specific example :)

  • Can't we do this updating msdb.dbo.sp_altermessage proc, Ex: I updated EXEC msdb.dbo.sp_altermessage 17550,'WITH_LOG','false'; the is_event_logged column set to 0 which means it shouldn't log, I restarted SQL service, I ran DBCC , still i can see the the message is logging – Sunny Jul 27 '18 at 17:02
  • @Sunny 1) You answered your own question in the comment. 2) You're assuming that nothing else writes directly to the errorlog, which other items do and you can't use that SP to just add and remove messages you want, which again you've found out through your own testing :) – Sean Gallardy Jul 27 '18 at 18:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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