Using dbms_scheduler to run a lunix script
Hi,
I've got an issue trying to use dbms_scheduler to run liunx shell scripts on the OS
Here's some setup for a script in the DB:
CREATE table bob (a varchar2(100));
Here's a script test_script.sh
#!/bin/bash
echo "TEST"
sqlplus -s <user>/<pass> <<EOF
begin
insert into bob (a) values ('TESTED');
COMMIT;
end;
/
exit;
EOF
echo "************************************"
replace <user> and <pass> as appropriate
I created a directory called training_scripts in the oracle user home directory and stuck file in there.
I then tried running the following to run it:
begin
dbms_scheduler.create_job(
job_name => 'my_external_job',