NikoNeugebauer / CISL

Columnstore Indexes Scripts Library
Apache License 2.0
179 stars 54 forks source link

Support NonStandardIndexNames in doMaintenance #30

Open thomasramm opened 4 years ago

thomasramm commented 4 years ago

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