Hello,
I am having a problem running a Job JOB_TYPE of SQL_SCRIPT. I can create the job, and it runs, and it completes with a STATUS = SUCCEEDED. However, when I look at the OUTPUT I see this:
SQL*Plus: Release 18.0.0.0.0 - Production on Mon Oct 14 09:12:16 2019
Version 18.3.0.0.0
Copyright (c) 1982, 2018, Oracle. All rights reserved.
SQL> SP2-0306: Invalid option.
Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM|SYSBACKUP|SYSDG|SYSKM|SYSRAC}] [edition=value]]
where <logon> ::= <username>[/<password>][@<connect_identifier>]
<proxy> ::= <proxyuser>[<username>][/<password>][@<connect_identifier>]
SQL> 2
from the testing I have done, it seems that the connection from SQLPlus into the database is failing to connect correctly. I have listed the major "Parts" I uses to create my job and any help would be greatly appreciated.
dbms_credential.create_credential(
credential_name => 'TEST_KEY_OS',
username => 'oracle',
password => 'myospassword'
);
dbms_credential.create_credential(
credential_name => 'TEST_KEY_DB',
username => 'mydbuser@myservicename.myservername.com',
password => 'testdbpassword'
);
dbms_scheduler.create_job(
job_name => 'testjob',
job_class => 'testjc',
job_type => 'SQL_SCRIPT',
job_action => l_clob,
credential_name => 'TEST_KEY_OS',
enabled => FALSE
);
dbms_scheduler.set_attribute(
name => 'testjob',
attribute => 'connect_credential_name',
value => 'TEST_KEY_DB'
);
dbms_scheduler.enable('testjob');
I am working from this link: https://oracle-base.com/articles/12c/scheduler-enhancements-12cr1