You manage an Azure SQL Database that uses elastic jobs to automate index maintenance. The job fails intermittently with the error 'Cannot open server 'myserver' requested by the login.' The job agent uses a database-scoped credential. What is the most likely cause?
The credential must be mapped to a server login that can access the target server.
Why this answer
The error 'Cannot open server...' indicates that the login used by the credential is not recognized at the server level. For elastic jobs with database-scoped credentials, the credential must be associated with a login in the master database of the target server. If the credential is not mapped to a server login, the login cannot access the server, causing this error.
Option D correctly identifies this. Option A is incorrect because ALTER ANY DATABASE permission is not required for server access. Option B is incorrect because firewall blocks cause a different error (e.g., connection timeout).
Option C is incorrect because the job agent itself does not require a server-level login; it uses the credential.