I'm struggling with a SQL Server Agent Job run time error:
SQL Server Agent Job - Runtime error The server principal "ABC" is not able to access the database "XYZ" under the current security context. [SQLSTATE 08004] (Error 916). The step failed.
I know there are similar questions here but not necessarily related to SQL Server Agent Jobs ..
I have reviewed various web articles but not yet succeeded in resolving ..
The server principal is not able to access the database under the current security context https://www.sqlservercentral.com/forums/topic/the-server-principal-is-not-able-to-access-the-database-under-the-current-security-context-urgent
https://learn.microsoft.com/en-us/dotnet/framework/data/adonet/sql/overview-of-sql-server-security
Am running job as a specified user IAM-Replication.