June 29, 2010 at 9:17 pm
hi guys , is there a way to set Auto Update Statistics ON for all my DBs in an instance by script instead of by the GUI?
June 29, 2010 at 11:29 pm
This is an undocumented script like SP_MSForEachTable...
Try:
exec sp_msforeachdb @command1='ALTER DATABASE ? SET AUTO_UPDATE_STATISTICS ON'
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle
June 30, 2010 at 4:05 am
search with AUTO_UPDATE_STATISTICS which is database property and can set by executing T-sql ALTER DATABASE command.
Also you can write a cursor for the same but sp_msforeachdb is good one.
HTH
---------------------------------------------------
"Thare are only 10 types of people in the world:
Those who understand binary, and those who don't."
June 30, 2010 at 4:32 pm
thank you guys!!
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply