SQL Server: Suppress Activation Procedure Output from Error Log

error logservice-brokersql serverstored-procedures

I found so many below informational messages (bulk messages with no any error) are logged in the SQL Server error log.

The activated proc 'x' running on queue 'y' output the following: 'z'

I want to stop this logging. Is there any trace flag that can help?

Best Answer

Seems like you have an activation procedure that explicitly outputs the string y (probably using print but possibly raiserror, select, or output).

Why don't you change the procedure so that it doesn't have any output? Output shouldn't be needed when run through service broker. Or if the procedure is also sometimes run interactively, and output is required in that case, you could require a param for output (or create a wrapper procedure and call that instead).

There is no trace flag to suppress activation procedure output from the error log. This was a design decision to assist in troubleshooting activation procedures (since they are not typically run interactively).