Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    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

    Scheduled Pinned Locked Moved Support
    2 Posts 2 Posters 11 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      MY_9476
      last edited by

      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'.

      LogRetentionTaskRunner

      I 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.

      atrippA 1 Reply Last reply Reply Quote 1
      • atrippA Offline
        atripp inedo-engineer @MY_9476
        last edited by

        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 :)

        1 Reply Last reply Reply Quote 1

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • 1 / 1
        • First post
          Last post
        Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation