Groups | Blog | Home
all groups > sql server programming > january 2004 >

sql server programming : DBCC message suppress


Vlad
1/28/2004 10:21:11 PM
Is there a way to suppress the DBCC message?
Some TRACE switch or SET ?

<<DBCC execution completed. If DBCC printed error messages, contact your
system administrator.>>

Thanks
Vlad

Ray D
1/29/2004 1:36:09 AM
Execute dbcc with 'with no_infomsgs'
Vlad
1/29/2004 6:43:08 AM
That was it Ray.
Thanks a lot!
DBCC INPUTBUFFER (@@spid) with no_infomsgs

And just for the record, here is the reason I want to do it.
I use the above statement in SP to generate deadlock recordset.
The SP is used from xp_sendmail (via job).
Without the "with no_infomsgs", every email contained the (multiple) message
<<DBCC execution completed. If DBCC printed error messages, contact your
system administrator.>>

[quoted text, click to view]

Jacco Schalkwijk
1/29/2004 9:32:35 AM
Hi Vlad,

You can't suppress the message. Why would you want to do that?

--
Jacco Schalkwijk
SQL Server MVP


[quoted text, click to view]

Tibor Karaszi
1/29/2004 12:00:44 PM
Note that the NO_INFMSGS only suppresses that particular message (below) on SQL2K. In earlier
releases that message did not get suppressed by NO_INFOMSGS. At least that is how I remember it, I
don't have a down-level server to test on right now. :-)

DBCC execution completed. If DBCC printed error messages, contact your system administrator.

--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver


[quoted text, click to view]

AddThis Social Bookmark Button