Databases Reference
In-Depth Information
This script is saved to
/home/oracle/bin/record_os_log_entry.sh
. Once the
shell script is ready the next step is to create a
dbms_scheduler
program named
OSCHEDULER.OS_LOG_RECORD_PROG
:
BEGIN
DBMS_SCHEDULER.CREATE_PROGRAM(
program_name =>'OSCHEDULER.OS_LOG_RECORD_PROG',
program_action =>'/home/oracle/bin/record_os_log_entry.sh',
program_type =>'EXECUTABLE',
number_of_arguments=>1,
comments =>'OS level log entry record',
enabled =>FALSE);
END;
BEGIN
DBMS_SCHEDULER.DEFINE_PROGRAM_ARGUMENT(
program_name =>'OSCHEDULER.OS_LOG_RECORD_PROG',
argument_name =>'LogEntryText',
argument_position =>1,
argument_type =>'CHAR',
default_value =>'Default log entry',
out_argument =>FALSE);
END;
BEGIN
DBMS_SCHEDULER.ENABLE(
name =>'OSCHEDULER.OS_LOG_RECORD_PROG');
END;
Defining a program using Enterprise Manager
Using
Enterprise
Manager
to define a program is a convenient and pretty
straightforward way to perform this task, it allows the user to view a list of all
existing Scheduler programs, create new programs or clone a program from an
existing template, edit a program and provide different maintenance levels to
existing programs.
This screenshot shows how a program is defined using Enterprise Manager:
Search WWH ::
Custom Search