0

I am using Ola Hallengren's IndexOptimize for Updating Statistics only. Can I exclude a schema from the UpdateStatistics?

1 Answer 1

2

Ola covers this scenario in the documentation.

For the @Indexes parameter:

The ALL_INDEXES keyword is supported. The hyphen character (-) is used to exclude indexes, and the percent character (%) is used for wildcard selection. All these operations can be combined by using the comma (,).

If you want to do "everything on the server, except one schema in one database" you'd supply parameters like @Databases='ALL_DATABASES', @Indexes= 'ALL_INDEXES, -Db1.Schema1.%'.

If you want to do "everything on the server, except never the staging schema in any database" you'd supply parameters like @Databases='ALL_DATABASES', @Indexes= 'ALL_INDEXES, -%.staging.%'.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.