Alejandro Mesa
3/20/2007 5:41:00 PM
CLM,
You can create a cursor to traverse all databases and check those properties
using function "databaseproperty". The properties are
"IsAutoCreateStatistics" and "IsAutoUpdateStatistics".
You can try using the undocumented sp sp_MSForEachDB (not recommended in
production code).
exec master.dbo.sp_msforeachdb '
select
''?'',
databaseproperty(''?'' ,''IsAutoCreateStatistics'') as
[IsAutoCreateStatistics],
databaseproperty(''?'' ,''IsAutoUpdateStatistics'') as
[IsAutoUpdateStatistics]
'
AMB
"CLM" wrote:
> I am wondering if there are stats on stats? (SS 2000 SP4) I've got a server
> that has a lot of databases - about 250 - and I want to make sure that stats
> is getting run on all of the databases. (Yes, I've got Auto Update Stats and
> Auto Create stats turned on.) Is there any way to get this from the system
> tables or by some other method?