sp_updatestats Failed Folgen

Larry Clark

After upgrading from 2016 BarTender Enterprise Automation Edition version R3 to R6, my purging is failing with, 

"Error = Stored Procedure: sp_updatestats Failed; Inner Message: User does not have permission to perform this action."

This has occurred on 2 of my 3 instances.  All my SQL accounts have dbo privileges.  My SQL version is 12.0.5214.6 on all 3 SQL databases.

Has anyone experienced this error?

1 Kommentare

Larry Clark
Aktionen für Kommentare Permalink

Root cause/Solution

Between R3 and R6, the SpDeleteRecords procedure was changed and Seagull developers left a helpful comment.

I am running SQL Server versions 13.0.4210 and 12.0.5214.  When I "undid" the change, both my instances started executing without error.  I'm not sure what permission issues they experienced to make the change, but I have not seen any issues.


/* NOTE:        WITH EXECUTE AS 'dbo' was removed in 2017, because it was    */
/*              previously added to correct a SQL Server 2005 bug.  But it   */
/*              now causes permission issues in SQL Server 2014+.            */

ALTER PROC [dbo].[SpDeleteRecords](@pastUtcTicks bigint, @categories nvarchar(1024))
with execute as 'dbo' AS
--Lawrence W Clark, 5/17/2018, Added "with execute as 'dbo'" back to procedure.

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.