March 8, 2014 at 7:39 am
Hi All,
Has anyone of you written or encountered a version of sp_updatestats that does NOT display the informational messages that show whether a particular index or statistic needed to be updated? I would love to have one of those since I have quite a few batch scripts that output info that is relevant to what their real job is, but that also update statistics as part of the process. That additional output just clutters the output.
I have done some google searches, but came up with nothing.
Thanks in advance,
Jan
March 8, 2014 at 8:37 am
Tried this:
DECLARE @KeepItQuiet TABLE ( ForgetMessage varchar ( 1024 ) );
INSERT INTO @KeepItQuiet
(
ForgetMessage
)
EXEC sp_updatestats;
Problem is, sp_updatestats does not return a result set, it prints its output, and therefore @KeepItQuiet is empty. So this does not work...
March 8, 2014 at 2:09 pm
I am pretty sure the maintenance solution at ola.hallengren.com has the ability to turn off all messaging. Even if it doesn't you should still use it (for everything, not just stats updates)!!
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
March 8, 2014 at 3:32 pm
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply