search cancel

SQL job fails | Cannot open database... The login failed.


Article ID: 207555


Updated On:


CA Automic Workload Automation - Automation Engine


SQL agent log returns code 102 on all job run attempts

When running a SQL job, the following error is shown in the Job report:

U02000005 Job '<jobname>' with RunID '<runid>' started.
U02012031 The database driver returned the following error message:
Cannot open database "<databasename>" requested by the login. The login failed. ClientConnectionId:<connectioninfo>
U02004025 Job-script execution was aborted.

The agent log shows:

U02000005 Job '<jobname>' with RunID '<runid>' started.
U02000003 Job '<jobname>' started with RunID '<runid>'.
U02000009 Job '<jobname>' with RunID '<runid>' ended with return code '102'.
U02001026 Job '<jobname>' with RunID '<runid>' has been removed from the job table.


The issue is with the login object.  The correct credentials should resolve this issue.