Tuesday, April 13, 2010

Update statistics in all databases

Update statistics in all databases:
USE master
go
exec sp_MSforeachdb ' IF (''?'' NOT IN (''master'',''tempdb'',''model'',''msdb'',''ReportServerTempDB''))BEGIN PRINT ''Atualizando estatísticas de '' + ''?''use ? exec sp_updatestats END';

No comments:

Post a Comment