EXEC [sp_MSforeachtable] @command1="DBCC DBREINDEX('?')"
If you want to receive progress messages while it is running, try this version
EXEC [sp_MSforeachtable] @command1="RAISERROR('DBCC DBREINDEX(''?'') ...',10,1)
WITH NOWAIT DBCC DBREINDEX('?')"
Click here for reference.
No comments:
Post a Comment