Database Reference
In-Depth Information
The preceding definition will create a job class called
SSKY
. The parameters for the
CREATE_JOB_CLASS
procedure
include the name identified by
JOB_CLASS_NAME
, the consumer group that the job class belongs to, and the service
name (
SERVICE
) that is being mapped to the job class. The definition also contains a logging level (
LOGGING_LEVEL
)
and a log history period (
LOG_HISTORY
).
The
RESOURCE_CONSUMER_GROUP
is
NULL
because the service was mapped to a resource consumer group in the
previous step. Oracle supports three different levels of logging:
1.
No logging using
DBMS_SCHEDULER.LOGGING_OFF
2.
Detailed logging using
DBMS_SCHEDULER.LOGGING_RUNS
3.
Complete logging that records all operations performed by all jobs in the job class using
DBMS_SCHEDULER.LOGGING_FULL
The job definitions could be verified using the following query
DBA_SCHEDULER_JOB_CLASSES
view:
SELECT JOB_CLASS_NAME,
SERVICE
FROM DBA_SCHEDULER_JOB_CLASSES
WHERE SERVICE LIKE '%SSK%';
JOB_CLASS_NAME SERVICE
------------------ ----------
SSKY SSKY
Step 7.8 Job Definition
Once the job class has been defined, the next step is to add the batch job to the scheduler from where the job could be
executed by the application by submitting it in the background. The Job is scheduled using the following command:
EXEC DBMS_SCHEDULER.CREATE_JOB-
(JOB_NAME=>'SSKY_REPORTING_JOB', -
JOB_TYPE=>'EXECUTABLE', -
JOB_ACTION=>'/usr/apps/batch/SSKYnightlybatch;', -
JOB_CLASS=>'SSKY',-
ENABLED=>TRUE, -
AUTO_DROP=>FALSE, -
COMMENTS=>'Batch Reporting');
Step 7.9 Performance Thresholds Definition
Performance thresholds may be defined for each instance participating in this cluster using the following
PL/SQL package:
EXECUTE DBMS_SERVER_ALERT.SET_THRESHOLD -
(METRICS_ID => DBMS_SERVER_ALERT.ELAPSED_TIME_PER_CALL, -
WARNING_OPERATOR => DBMS_SERVER_ALERT.OPERATOR_GE, -
WARNING_VALUE => '500',-
CRITICAL_OPERATOR => DBMS_SERVER_ALERT.OPERATOR_GE,-
CRITICAL_VALUE => '7500', -
OBSERVATION_PERIOD => 1,-
Search WWH ::
Custom Search