Skip to content

Invalid column name 'stats_sample_rate' #1

@a-bolanos

Description

@a-bolanos

Hi! thanks for this great code! I was testing the stored procedure dbo.[StatsOptimize] and it is failing with this error:

Invalid column name 'stats_sample_rate'

I'm using these parameters:

exec dbo.[StatsOptimize] @Tables=null, @StatisticsModificationLevel=null, @StatisticsSample=null ,@OnlyModifiedStatistics=null,@DeleteOverlappingStats=null, @TimeLimit=null , @Execute='N'

I think the error comes when the code tries to UNION the results from dbo.vStats and dbo.vTableStats because the column stats_sample_rate does not exists in dbo.vStats.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions