A job step on an Azure Managed Instance that calls msdb.dbo.sp_send_dbmail (or possibly calling a linked server) can fail with error -2147467259.
The fix is to put "EXECUTE AS LOGIN = 'SQLAGENTUSER' " at the front of the script. What's happening is that the Login that's used by the agent (ContainerAdministrator) is lacking perms somehow.
No comments:
Post a Comment