Created
August 28, 2015 09:59
-
-
Save umair-me/c82c2931d30f1f7053fe to your computer and use it in GitHub Desktop.
Rebuild indexes sql server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Re Index | |
EXEC sp_MSforeachtable "dbcc dbreindex('?', '')" | |
-- Update Stats | |
--EXEC sp_updatestats | |
-- or | |
EXEC sp_MSforeachtable "UPDATE STATISTICS ? WITH FULLSCAN" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment