Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support NonStandardIndexNames in doMaintenance #30

Open
thomasramm opened this issue Jan 28, 2020 · 0 comments
Open

Support NonStandardIndexNames in doMaintenance #30

thomasramm opened this issue Jan 28, 2020 · 0 comments

Comments

@thomasramm
Copy link

There is a bug in doMaintenance

What is the current behavior?
If i start the sript i get some errors like "Incorrect syntax near '-'."
so i changed
Line 364+623: set @sqlcommand = 'alter index ' + @indexName + ' on ' + @currentTableName + ' Reorganize';
To: set @sqlcommand = 'alter index [' + @indexName + '] on ' + @currentTableName + ' Reorganize';

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via http://sqlfiddle.com/
The IndexName is e.g. "ClusteredColumnStoreIndex-20190410-152738"

Which versions of SQL Server and which OS are affected by this issue? Did this work in previous versions of our procedures?
SQL Server 2016 SP2 CU10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant