sql-server-maintenance-solution icon indicating copy to clipboard operation
sql-server-maintenance-solution copied to clipboard

Exclude Multiple tables

Open d-moloney opened this issue 1 year ago • 0 comments

Description of the issue i am trying to run IndexOptimize and exclude multiple tables. Its only skipping the first one.

SQL Server version and edition Microsoft SQL Server 2019 (RTM-CU21) (KB5025808) - 15.0.4316.3 (X64) Jun 1 2023 16:32:31 Copyright (C) 2019 Microsoft Corporation Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2019 Standard 10.0 <X64> (Build 17763: ) (Hypervisor)

Version of the script Version: 2022-12-03 17:23:44

What command are you executing? I do have a dash in front of each table exec [dbo].[IndexOptimize] @Databases='databasename', @LogToTable='Y', @Indexes = 'ALL_INDEXES, -databasename.dbo.table1,-databasename.dbo.table2' and I tried a dash in front of the first table exec [dbo].[IndexOptimize] @Databases='databasename', @LogToTable='Y', @Indexes = 'ALL_INDEXES, -databasename.dbo.table1,databasename.dbo.table2'

What output are you getting?

its is not skippng the second table.

d-moloney avatar Jan 12 '24 14:01 d-moloney