Thursday, October 27, 2011

Script to turn on Auto Create Statistics

sp_helpdb TWO
GO
ALTER DATABASE TWO SET AUTO_CREATE_STATISTICS ON
GO
ALTER DATABASE TWO SET AUTO_UPDATE_STATISTICS ON
GO
ALTER DATABASE TWO SET AUTO_UPDATE_STATISTICS_ASYNC ON
GO

Did this help you?  If so, please leave a comment!

No comments:

Post a Comment

SQL 2022 TSQL snapshot backups!

  SQL 2022 now actually supports snapshot backups!  More specifically, T-SQL snapshot backups. Of course this is hardware-dependent. Here ...