SQL Service Broker activated proc writes all print messages into SQL Error Log...
-
2012년 7월 24일 화요일 오전 3:04
If any print message exists in a Service Broker activated proc, it generates a message (9724) : like
The activated proc '[dbo].[reply_proc]' running on queue 'test.dbo.InitiatorQueue1DB' output the following: '789'
the message itself has the severity level of 10 and flag not write to log... This gets me to a serious implications like overpouring ErrorLog with insufficient disk space problem, when running a proc like sp_updatestats on a large database... such a proc generates thousands of singe rows and if it runs on a quite regular basis (several times in hour) that problem becomes an a headache... I can wrap it up to CLR proc and suppress those info messages... but , I'm just wondering if it could be done in a simplier way like change a setting in somewhere I'm not aware of place...Thanks to everybody's attention...
Denis.
모든 응답
-
2012년 7월 24일 화요일 오후 11:49
This is a copy of my post on Service Broker Branch:
If any print message exists in a Service Broker activated proc, it generates a message (9724) : like the message itself has the severity level of 10 and flag not write to log... This gets me to a serious implications like overpouring ErrorLog with insufficient disk space problem, when running a proc like sp_updatestats on a large database... such a proc generates thousands of singe rows and if it runs on a quite regular basis (several times in hour) that problem becomes an a headache... I can wrap it up to CLR proc and suppress those info messages... but , I'm just wondering if it could be done in a simplier way like change a setting in somewhere I'm not aware of place...
Thanks to everybody's attention...
Denis.
The activated proc '[dbo].[reply_proc]' running on queue 'test.dbo.InitiatorQueue1DB' output the following: '789'
Denis
- 병합됨 amber zhang 2012년 7월 26일 목요일 오전 1:55
-
2012년 7월 26일 목요일 오전 1:55중재자
Hi Denis
Thank you for your question.
I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated.
Thank you for your understanding and support.
Best Regards,
Iric
Please remember to mark the replies as answers if they help and unmark them if they provide no help. -
2012년 7월 30일 월요일 오후 3:29
Hi Denis,
Activation stored procedures where designed to write print statements to the SQL Server errorlogs. Normally the print statements are returned to the client but there is no user interactivitity with activation procedures so it was decided to print to the errorlog. Unfortunately to my knowledge there is not a way to override this behavior or disable it.
There are a few techniques that you can consider:
- Like you indicate wrap a CLR proc or xp_cmdshell for these statements.
- Look for an alternative command that does not use print statements. For example, sp_updatestats will use print statements but Update Statistics does not.
Hope it helps some,
Bill -- Microsoft CTS
- 답변으로 제안됨 Chintak Chhapia 2012년 8월 1일 수요일 오전 7:24
- 답변으로 표시됨 Iric WenModerator 2012년 8월 3일 금요일 오전 5:48
-
2012년 8월 1일 수요일 오전 7:24
-
2012년 8월 1일 수요일 오후 2:33
Hi,
I searched through the code and didnt see any traceflags. They did add a trace flag to reduce QN error messages but I dont see any to specifically disable print statements in activation stored procedures to be written to the SQL error logs.
Bill -- Microsoft CTS.
-
2012년 8월 1일 수요일 오후 2:38
Hi,
I have gone ahead and filed a design change request for the developement team to review and see if it meets the bar for a future enhancement.
Bill -- Microsoft CTS
-
2012년 8월 6일 월요일 오후 1:58Thanks Bill.
- Chintak (My Blog)

