Skip to content

Conversation

@marshallwp
Copy link
Owner

Copy of olahallengren#645 as that isn't getting merged into Ola Hallengren's version.

Per Microsoft, statistics for external tables cannot be ALTERED. If a rebuild is required, they must be dropped and re-created. As such, I've updated the code to correctly identify external tables and drop/add stats on them by default. A parameter was added that if change to anything other than REBUILD, will ignore stats maintenance work on external tables.

Added functionality to correctly update statistics on external table.  Per MS, they cannot be ALTERED.  They must be dropped and recreated.    Added variable @ExternalTables.  Default is to REBUILD external table stats.  Any additional values will be ignored.
fixes to original code to only use the current definition, rather than all columns.
@marshallwp marshallwp merged commit 11309e4 into marshallwp:master Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants