Can't enable change feed.

Vignesh K 20 Reputation points
2025-03-06T06:46:04.3666667+00:00

Hi All,
My SQL SERVER is 2022 CU 16 and while try to enable change feed, Im getting this error

I have run the query using sa
EXECUTE sys.sp_change_feed_enable_db;

error:

Msg 22710, Level 16, State 1, Procedure sys.sp_synapse_link_enable_db_internal, Line 214 [Batch Start Line 6]

Could not update the metadata. The failure occurred when executing the command 'create user changefeed'. The error/state returned was 229/5: 'The EXECUTE permission was denied on the object 'sp_send_dbmail', database 'msdb', schema 'dbo'.'. Use the action and error to determine the cause of the failure and resubmit the request.

I can't enable change feed all the db in my instance

SQL Server Database Engine
{count} votes

1 answer

Sort by: Most helpful
  1. LiHongMSFT-4306 31,001 Reputation points
    2025-03-07T02:03:31.5266667+00:00

    Hi @Vignesh K

    The EXECUTE permission was denied on the object 'sp_send_dbmail', database 'msdb', schema 'dbo'.'

    Try explicitly granting permissions to sp_send_dbmail:

    USE msdb;
    GO
    GRANT EXECUTE ON dbo.sp_send_dbmail TO [sa];
    

    Best regards,

    Cosmog


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.