0

When using EXECUTES to rebuild and exclude indexes from the defrag SP, I receive the following errors:

Msg 50000, Level 16, State 1, Procedure IndexOptimize, Line 918 The value for the parameter @Indexes is not supported.

Msg 50000, Level 16, State 1, Procedure IndexOptimize, Line 1009 The documentation is available at https://ola.hallengren.com/sql-server-index-and-statistics-maintenance.html.

As far as I know, my syntax is correct, and follows Ola's documentation to the T. Any thoughts?

Sample Code:

EXECUTE dbo.IndexOptimize
@Databases = 'SqlWorkflowInstanceStore_RBC_ITS-QA-Canada.27',
@FragmentationLow = NULL,
@FragmentationMedium = 'INDEX_REBUILD_ONLINE,INDEX_REBUILD_OFFLINE',
@FragmentationHigh = 'INDEX_REBUILD_ONLINE,INDEX_REBUILD_OFFLINE',
@FragmentationLevel1 = 5,
@FragmentationLevel2 = 30,
@Indexes = 'ALL_INDEXES, -SqlWorkflowInstanceStore_RBC_ITS-QA-Canada.27.System.Activities.DurableInstancing.InstancesTable,
-SqlWorkflowInstanceStore_RBC_ITS-QA-Canada.27.System.Activities.DurableInstancing.RunnableInstancesTable,
-SqlWorkflowInstanceStore_RBC_ITS-QA-Canada.27.System.Activities.DurableInstancing.LockOwnersTable,
-SqlWorkflowInstanceStore_RBC_ITS-QA-Canada.27.System.Activities.DurableInstancing.ServiceDeploymentsTable,
-SqlWorkflowInstanceStore_RBC_ITS-QA-Canada.27.System.Activities.DurableInstancing.InstancePromotedPropertiesTable,
-SqlWorkflowInstanceStore_RBC_ITS-QA-Canada.27.System.Activities.DurableInstancing.DefinitionIdentityTable,
-SqlWorkflowInstanceStore_RBC_ITS-QA-Canada.27.System.Activities.DurableInstancing.KeysTable,
-SqlWorkflowInstanceStore_RBC_ITS-QA-Canada.27.System.Activities.DurableInstancing.IdentityOwnerTable'
D. Spigle
  • 541
  • 2
  • 5
  • 15
  • 1
    How does that 6 part identifier even work? Is it Azure? Do you have full stops in your database name? Surely that is the problem. Try with brackets. – Jacob H Sep 05 '18 at 16:37
  • 6 part IDs are defined by Ola's script, and documented as such in the link provided. – D. Spigle Sep 05 '18 at 16:39
  • Yeah I'm not seeing it in the documentation. I can't even think how you'd get down to the table level with 6 identifiers unless you had a period in your object names. Good luck though! – Jacob H Sep 05 '18 at 16:40
  • Found the issue. Was indeed a problem with stops. Thanks! – D. Spigle Sep 05 '18 at 16:49

0 Answers0