Created
December 21, 2015 14:51
-
-
Save ghotz/123b52cdfd15f4b867ce to your computer and use it in GitHub Desktop.
Generate various maintenance commands
This file contains hidden or 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
SELECT 'ALTER INDEX [' + I1.name + '] ON [' + SCHEMA_NAME(O1.[schema_id]) + '].[' + O1.name + '] REBUILD;' | |
FROM sys.indexes AS I1 | |
JOIN sys.objects AS O1 | |
ON I1.[object_id] = O1.[object_id] | |
WHERE I1.type_desc = 'NONCLUSTERED COLUMNSTORE' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment