-> sp_msforeachdb "DBCC updateusage('?')"
-> rebuild all the indexes
-> update stats of all the tables :EXEC sp_MSforeachtable 'UPDATE STATISTICS ? WITH FULLSCAN' <-- you can specify the sampling if you need it
Abhay Chaudhary
Sr.DBA (MCITP/MCTS :SQL Server 2005/2008 ,OCP 9i)