Has anyone written a "quiet" version of sp_updatestats around

  • 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

    --------------------------------------------------------------------------
    A little knowledge is a dangerous thing (Alexander Pope)
    In order for us to help you as efficiently as possible, please read this before posting (courtesy of Jeff Moden)[/url]

  • 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...

    --------------------------------------------------------------------------
    A little knowledge is a dangerous thing (Alexander Pope)
    In order for us to help you as efficiently as possible, please read this before posting (courtesy of Jeff Moden)[/url]

  • 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

  • Thanks, Kevin, I will have a look and come back.

    --------------------------------------------------------------------------
    A little knowledge is a dangerous thing (Alexander Pope)
    In order for us to help you as efficiently as possible, please read this before posting (courtesy of Jeff Moden)[/url]

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply