Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
SQL Execute Permissions Missing for LogMessages_PurgeOldMessages
-
Hello,
I've noticed the following error message after upgrading to Otter 2024.2 (Build 1).
Unhandled exception: The EXECUTE permission was denied on the object 'LogMessages_PurgeOldMessages', database 'Otter', schema 'dbo'.
[...]
LogRetentionTaskRunnerI fixed it by granting the EXEC permission on that stored procedure to the database role OtterUser_Role, similar to the other stored procedures.
If I recall correctly, I had to apply the same fix after the previous upgrade as well.
-
Hi @MY_9476 ,
Thanks for the heads up! We will fix this via OT-514 in the next maintenance release.
As an FYI, this is the code that should have been run at the end of the database upgrade, to ensure that all procs and table-value params have appropriate permission:
DECLARE @SQL NVARCHAR(MAX) SET @SQL = '' SELECT @SQL = @SQL + 'GRANT EXECUTE ON TYPE::' + QUOTENAME(name) + ' TO [OtterUser_Role] ' FROM sys.table_types SELECT @SQL = @SQL + 'GRANT EXECUTE ON ' + QUOTENAME(name) + ' TO [OtterUser_Role] ' FROM sys.procedures EXEC sp_executesql @SQL
The script you ran works too :)