During my presentation about the Oracle Scheduler I demonstrated a little script that generated a lot of jobs, first a series of jobs tied to a window and later the same series of jobs not tied to a schedule. This demonstrated that when the jobs were tied to a window, the order of the executions was mostly in the alphabetical order of the job class that were defined for the jobs. Not really what I expected, can be a bug, it is not documented how the order should be but I expected more random choices of jobs over the job classes.
You can find the code here. Download the zipfile, unzip it, run install.sql as a dba and check the job counts and resource usage for the defined resource consumer groups. Run the remove.sql to get rid of the installed items. For the remove you also need to be connected as a dba.
For monitoring the job counts you can use the following sql:
select sysdate
,(select count(*) from all_scheduler_jobs where owner = 'PLANBOARD' and job_name like 'STATS_PRIO1%') p1
,(select count(*) from all_scheduler_jobs where owner = 'PLANBOARD' and job_name like 'STATS_PRIO2%') p2
,(select count(*) from all_scheduler_jobs where owner = 'PLANBOARD' and job_name like 'STATS_PRIO3%') p3
from dual;
The cpu consumption can be monitored using:
select sysdate
,(select CONSUMED_CPU_TIME from V$RSRC_CONSUMER_GROUP where name = 'PRIO1')PRIO1CONSUMED_CPU_TIME
,(select CONSUMED_CPU_TIME from V$RSRC_CONSUMER_GROUP where name = 'PRIO2')PRIO2CONSUMED_CPU_TIME
,(select CONSUMED_CPU_TIME from V$RSRC_CONSUMER_GROUP where name = 'PRIO3')PRIO3CONSUMED_CPU_TIME
from dual;
In the presentation I had these two queries running as a monitor in DbVisualizer.
To make DbVisualizer more useful in combination with Oracle Scheduler and Oracle Resource Manager you might find it helpful to download and use this oracle.xml file that I made with many contributions of Nathan Aaron in it. I am sure that this will somehow find its way in the production release of DbVisualizer in the near future. For now, download and unpack the file. Place it in the profiles folder in the DbVisualizer package. It is fully up to date until DbVisualizer version 6.5.6