Created
November 10, 2014 09:19
-
-
Save shaxxx/88cd9008fce27e645c8b to your computer and use it in GitHub Desktop.
ReIndex all tables in MSSQL database
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
EXEC sp_MSforeachtable @command1="print '?' DBCC DBREINDEX ('?', ' ', 80)" | |
GO | |
EXEC sp_updatestats | |
GO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment