You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
EDIT: I believe if you add vs.stats_sample_rate to the SELECT in the vStats view it corrects the error. In MaintenanceSolution.sql I inserted this on line 162:
, vs.stats_sample_rate
I'm getting the same error when trying to execute. Here is the output from when I ran it with @execute = 'N', but I've also tried it with @execute = NULL and get the same result.
Date and time: 2021-11-30 15:41:17
Server: removed
Version: 10.0.13665.0
Edition: SQL Azure
Parameters: @tables= 'ALL', @OnlyModifiedStatistics = 'Y', @StatisticsModificationLevel = NULL, @StatisticsSample = NULL, @DeleteOverlappingStats = N, @Timelimit = NULL, @execute = N
Version: Microsoft Azure SQL Data Warehouse - 10.0.13665.0 Nov 8 2021 19:18:05 Copyright (c) Microsoft Corporation
Source: https://github.com/ProdataSQL/SynapseTools/tree/main/SqlPools/Maintenance
Msg 207, Level 16, State 1, Line 1
Invalid column name 'stats_sample_rate'.
Invalid column name 'stats_sample_rate'.
Invalid column name 'stats_sample_rate'.
Invalid column name 'stats_sample_rate'.
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.
The text was updated successfully, but these errors were encountered: