文档地址:http://docs.oracle.com/cd/B19306_01/server.102/b14231/schedover.htm#sthref3483
Job Classes
Job classes provide a way to:
-
Assign the same set of attributevalues to memberjobs--可以设置个属性级应用到作业类上,在作业类中的作业均继承作业类的属性,进而所有作业都有相同的属性集。
Each job class specifies a set ofattributes, such as logging level. When you assign a job to a jobclass, the job inherits those attributes. For example, you canspecify the same policy for purging log entries for all payrolljobs.
-
Set service affinity for member jobs
You can set the
service
attribute of a job class toa desired database service name. This determines the instances in aReal Application Clusters environment that run the member jobs, andoptionally the system resources that are assigned to member jobs.See "Service Affinity when Using the Scheduler" for moreinformation. -
Set resource allocation for member jobs
Job classes provide the link between the Database ResourceManager and the Scheduler, because each job class can specify aresource consumer group as an attribute. Member jobs then belong tothe specified consumer group, and are assigned resources accordingto settings in the current resource plan.
Alternatively, you can leave the
resource_consumer_group
attributeNULL
and set theservice
attribute of a job class to adesired database service name. That service can in turn be mappedto a resource consumer group.See Chapter 24, "Using the Database Resource Manager" for moreinformation on mapping services to consumer groups.
-
Group jobs forprioritization
Within the same job class, you can assign priorityvalues of 1-5 to individual jobs so that if two jobs in the classare scheduled to start at the same time, the one with the higherpriority takes precedence. This ensures that you do not have a lessimportant job preventing the timely completion of a more importantone.---在作业类中的作业的优先权。你可以分配优先权1到5分配给个人作业,这个值决定作业是否有优先权先被启动或者调用。Iftwo jobs have the same assigned priority value, the job with theearlier start date takes precedence. If no priority is assigned toa job, its priority defaults to 3.
-
Note:
1、Job priorities are used only to prioritize among jobs in the sameclass.2、There is no guarantee that a highpriority job in class A will be started before a low priority jobin class B, even if they share the sameschedule.--这是两个不同的作业类,所以没办法来比较。Prioritizing among jobs ofdifferent classes depends on the current resource plan and on thedesignated resource consumer group or service name of each jobclass.
When defining job classes, you should try to classify jobs byfunctionality. Consider dividing jobs into groups that accesssimilar data, such as marketing, production, sales, finance, andhuman resources.
Some of the restrictions to keepin mind are:--一些需要记住的细节
-
A job must be part of exactly one class. When you create a job,you can specify which class the job is part of. If you do notspecify a class, the job automatically becomes part of the class
DEFAULT_JOB_CLASS
. -
Dropping a class while there are stilljobs in that class results in an error. You can force a class to bedropped even if there are still jobs that are members of thatclass, but all jobs referring to that class are then automaticallydisabled and assigned to the class
DEFAULT_JOB_CLASS
. Jobsbelonging to the dropped class that are already running continue torun under class settings determined at the start of thejob.