SQL MI - SQL Jobs failing with User Manager\ContainerAdministrator.

  • This is strange, any SQL job that sends out Emails via 'msdb.dbo.sp_send_dbmail ' are failing with this weird execution user.  Executed as user: User Manager\ContainerAdministrator. Failed to initialize sqlcmd library with error number -2147467259. [SQLSTATE 42000] (Error 22050). The step failed.

    It doesn't matter if I change the SQL Owner to 'SA', to a AAD Account.  This randomly started happening.  If a SQL Mail is sent via a stored proc method, no issues.

    What could have changed in my SQL MI environment to trigger this?

     

    Thanks,

     

    Daniel

  • A 'workaround' was to add: execute as login = 'SQLLoginAccount ' in all the SQL Jobs that calls EXEC msdb.dbo.sp_send_dbmail  in it.  That did the trick but not sure what triggered the change in SQL MI (2  enviornments) but not the 3 one.  To start executing the SQL Jobs as 'Executed as user: User Manager\ContainerAdministrator'.  We don't use any type of Containers.

  • A 'workaround' was to add: execute as login = 'SQLLoginAccount ' in all the SQL Jobs that calls EXEC msdb.dbo.sp_send_dbmail  in it.  That did the trick but not sure what triggered the change in SQL MI (2  enviornments) but not the 3rd one.  To start executing the SQL Jobs as 'Executed as user: User Manager\ContainerAdministrator'.  We don't use any type of Containers.

  • This just started to happen to us, exact same user failing when trying to send directly calling sp_send_dbmail, not via a sproc.

    1. Did you ever work out what caused it?
    2. Have you left the workaround in or did you move it into a procedure?
  • Yeah, got it working by creating a SQL Login and then adding:  execute as login = 'NewLogin' before the step runs.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply