 |
|
Oracle Tips by Burleson |
Chapter 2 -
Configuring Oracle Job Scheduling
Setting up a Test
Environment
The MANAGE SCHEDULER privilege should only be granted when a user
must administer job classes, windows and window groups. These
objects provide a link between the scheduler and the resource
manager, a feature which had traditionally required the DBA role.
The roles and privileges associated with the 10g scheduler will be
presented in the following text.
In the previous script, a system privilege and
an object privilege were granted to job_user to allow the
creation of a task to schedule. The following script creates a
database procedure that will be used throughout this book when
creating jobs. This procedure uses the dbms_system package
to write a user defined string to the alert log at the start and end
of the job. The body of the procedure loops 100 times with a sleep
of one second in each loop. It also uses the
dbms_application_info package to write information to the
v$session and v$session_longops views. The use of the
dbms_system and dbms_application_info packages will be
covered in more detail in Chapter 5 of this text.
my_job_proc.sql
--
*************************************************
-- Copyright © 2005 by Rampant TechPress
-- This script is free for non-commercial
purposes
-- with no warranties. Use at your own risk.
--
-- To license this script for a commercial
purpose,
-- contact info@rampant.cc
--
*************************************************
-- Parameters:
-- 1) Text to identify this test job.
-- *****************************************************************
|
Download your Oracle scripts now:
www.oracle-script.com
The
definitive Oracle Script collection for every Oracle professional DBA
|
|