NikoNeugebauer / CISL

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

On Azure & SQL Server 2019, cstore_doMaintenance fails when reading database scoped configs #35

Open BrentOzar opened 4 years ago

BrentOzar commented 4 years ago

Do you want to request a feature or report a bug? Bug

What is the current behavior? When running cstore_doMaintenance on a system that needs to do an index rebuild, I get an error:

Msg 245, Level 16, State 1, Procedure cstore_doMaintenance, Line 142 [Batch Start Line 209]
Conversion failed when converting the nvarchar value 'OFF' to data type int.

It's related to this pull request, which fixed Azure SQL DB: https://github.com/NikoNeugebauer/CISL/pull/31

What is the expected behavior? Run without erroring.

Which versions of SQL Server and which OS are affected by this issue? Did this work in previous versions of our procedures? It doesn't work for versions that return "OFF" for the database scoped config values like ELEVATE_ONLINE and ELEVATE_RESUMABLE.