EXEC sp_MSforeachtable @command1 = "print '?' DBCC DBREINDEX ('?', ' ', 50)" GO EXEC sp_updatestats GO