Disable AUTO_CREATE_STATISTICS and AUTO_CREATE_STATISTICS for all databases

  • How to disable AUTO_CREATE_STATISTICS and AUTO_CREATE_STATISTICS for all databases in single step?

  • select 'ALTER DATABASE ' + Name + ' SET AUTO_UPDATE_STATISTICS OFF ' from sys.databases where database_id > 4

    Copy the result of above query in run window and execute

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • Why do you want to do that? Are you aware of the impact that will have on query performance? Do you have jobs in place to manually create and update the statistics as necessary?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

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

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