Open bsbabu2008 opened 5 years ago
Columnstore indexes need different defrag criteria: https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-dm-db-column-store-row-group-physical-stats-transact-sql?view=sql-server-ver15
Description of the issue Ola Maintenance jobs are failing for index rebuild / reorganize , update statics on column store indexes
SQL Server version and edition Execute
SELECT @@VERSION
Microsoft SQL Server 2016 (SP2-GDR) (KB4293802) - 13.0.5081.1 (X64)Version of the script Check the header of the stored procedure Can't find the version
What command are you executing? sqlcmd -E -S $(ESCAPE_SQUOTE(SRVR)) -d CoreDBA -Q "EXECUTE [dbo].[IndexOptimize] @Databases = 'USER_DATABASES', @FragmentationLow = NULL, @FragmentationMedium = 'INDEX_REORGANIZE,INDEX_REBUILD_ONLINE', @FragmentationHigh = 'INDEX_REBUILD_ONLINE', @UpdateStatistics = 'ALL', @OnlyModifiedStatistics = 'Y', @LogToTable = 'Y', @LockTimeout=3600" -b
What output are you getting? Updating [dbo].[VolumeUsage_CS_cur] Msg 35337, Level 16, State 1, Line 1 UPDATE STATISTICS failed because statistics cannot be updated on a columnstore index. UPDATE STATISTICS is valid only when used with the STATS_STREAM option.