2 Replies Latest reply on May 23, 2018 11:19 AM by 300

    For SQL server, is there any way to monitor auto create statistics option other than custom SQL?

    300

      Hi,

       

      I am trying to create a monitor for all the SQL server DBs we have to alert if different SQL DB options are ON/OFF.

      Like if the auto create statistics option is OFF, it should raise an alert.

       

      I can easily setup a monitor using simple SQL as: SELECT COUNT(*) FROM sys.databases WHERE is_auto_create_stats_on = 0;

      Then alert if result is greater than 0.

       

      But this way I won't be able to inform which database has auto create statistics option OFF. And this makes it almost useless from DBA's point of view.

      So I am trying to find if there is a way to inform (in message) which database or databases are having auto create statistics option OFF.

      I tried to modify the above SQL to add second column with names of databases in concatenated string form but looks like it is not an easy task (or I don't know SQL enough)

       

      So, I wanted to check if there is any provision in SolarWinds to monitor on this property. May be using App Insights for SQL?