Sql Job aborts with error message "SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus "

Document ID : KB000105003
Last Modified Date : 05/07/2018
Show Technical Document Details
Issue:

A sql Job can fail with the below error if there if there is a error with the Login value set on the Job.

SP2-0306: Invalid option.
Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM}] [edition=value]]
where <logon> ::= <username>[/<password>][@<connect_identifier>]
<proxy> ::= <proxyuser>[<username>][/<password>][@<connect_identifier>]
SP2-0306: Invalid option.
Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM}] [edition=value]]
where <logon> ::= <username>[/<password>][@<connect_identifier>]
<proxy> ::= <proxyuser>[<username>][/<password>][@<connect_identifier>]
SP2-0306: Invalid option.
Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM}] [edition=value]]
where <logon> ::= <username>[/<password>][@<connect_identifier>]
<proxy> ::= <proxyuser>[<username>][/<password>][@<connect_identifier>]
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
Resolution:
Possible solutions include:

1. Review the Job's Execution Options and check if the login defined for the Job is correct

2. If the login is correct, check if you can manually sqlplus to the database as defined in the login object from the server where the Job runs.