Sunday, 23 February 2014

What sp_MSforeachtable does ?

You can use sp_MSforeachtable undocumented stored procedure to rebuild all indexes in your database. Try to schedule it to execute during CPU idle time and slow production periods.

sp_MSforeachtable @command1=”print ‘?’ DBCC DBREINDEX (‘?’)”

No comments:

Post a Comment

Note: only a member of this blog may post a comment.