I am running olahallengren IndexOptimize - USER_DATABASES
Description of the issue
Running job "IndexOptimize - USER_DATABASES" and failing with the following error
UPDATE STATISTICS [DatabaseName].[dbo].[tableName] [indexName] RESAMPLE [SQLSTATE 01000]
Msg 50000, Sev 16, State 1, Line 152 : Msg 102, Incorrect syntax near 'RESAMPLE'. [SQLSTATE 42000]
SQL Server version and edition
Microsoft SQL Server 2019 (RTM-CU6) (KB4563110) - 15.0.4053.23 (X64) Jul 25 2020 11:26:55 Copyright (C) 2019 Microsoft Corporation Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2019 Datacenter 10.0 (Build 17763: ) (Hypervisor)
Version of the script
Check the header of the stored procedure
cannot determine.
What command are you executing?
EXECUTE dbo.IndexOptimize
@databases = 'DatabaseName',
@FragmentationLow = NULL,
@FragmentationMedium = 'INDEX_REORGANIZE,INDEX_REBUILD_ONLINE,INDEX_REBUILD_OFFLINE',
@FragmentationHigh = 'INDEX_REBUILD_ONLINE,INDEX_REBUILD_OFFLINE',
@FragmentationLevel1 = 5,
@FragmentationLevel2 = 15,
@UpdateStatistics = 'ALL',
@OnlyModifiedStatistics = 'Y',
@indexes = 'ALL_INDEXES, -db.Staging.KO_%'
What output are you getting?
Incorrect syntax near 'RESAMPLE'