April 12, 2010 at 7:43 pm
Comments posted to this topic are about the item Update statistics in all databases
April 16, 2010 at 8:50 am
Why not use sp_updatestats?
April 16, 2010 at 10:14 am
Because sp_updatestats just update statistics in all tables in the current database.
April 16, 2010 at 2:14 pm
Ha! I must not have had my first cup of coffee before making that post. Good call.
April 17, 2010 at 6:01 am
No problem. Thanks for your message.
April 18, 2010 at 6:52 pm
Hi,
I have some databases with spaces in the names and so I added some square brackets;
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';
Thanks for the useful snippet!
April 18, 2010 at 7:33 pm
Very good. In fact, this is necessary. Thanks.
May 19, 2016 at 7:11 am
Thanks for the script.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply