I have an oracle database:
Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
"CORE 11.2.0.1.0 Production"
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
and I would like to run my script stored on db server.
path: /d01/oracle/scripts/super_skripta.sh
The content of my script (test script):
IME=$(date +"%s")
touch /d01/oracle/scripts/$IME
Can someone explain me (step by step) how can I run this script from a oracle database?
I tried to create an executable program like this:
begin
dbms_scheduler.create_program
(
program_name => 'SUPER_SKRIPTA',
program_type => 'EXECUTABLE',
program_action => '/d01/oracle/scripts/super_skripta.sh',
enabled => TRUE,
comments => 'super skripta'
);
end;
/
and then create a job:
BEGIN
DBMS_SCHEDULER.CREATE_JOB (
job_name => '"WOLFY"."JOB_SS"',
program_name => '"WOLFY"."SUPER_SKRIPTA"',
start_date => NULL,
repeat_interval => NULL,
end_date => NULL,
enabled => FALSE,
auto_drop => FALSE,
comments => '',
job_style => 'REGULAR');
DBMS_SCHEDULER.SET_ATTRIBUTE(
name => '"WOLFY"."JOB_SS"',
attribute => 'logging_level', value => DBMS_SCHEDULER.LOGGING_OFF);
DBMS_SCHEDULER.enable(
name => '"WOLFY"."JOB_SS"');
END;
but it does not work...