关于过程CREATE_JOB_CLASS Procedure

2024-06-04 17:18

本文主要是介绍关于过程CREATE_JOB_CLASS Procedure,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

文档地址:http://docs.oracle.com/cd/B19306_01/appdev.102/b14258/d_sched.htm#i1011092

 

CREATE_JOB_CLASS Procedure

 

This procedure creates a job class. Job classes are created inthe SYS schema.

Syntax

DBMS_SCHEDULER.CREATE_JOB_CLASS (job_class_name            IN VARCHAR2,resource_consumer_group   IN VARCHAR2 DEFAULT NULL,service                   IN VARCHAR2 DEFAULT NULL,logging_level             IN PLS_INTEGERDEFAULT DBMS_SCHEDULER.LOGGING_RUNS,log_history               IN PLS_INTEGER DEFAULT NULL,comments                  IN VARCHAR2 DEFAULT NULL);

Parameters

Table 93-12 CREATE_JOB_CLASS ProcedureParameters

ParameterDescription

job_class_name

The name of the class being created. A schema other thanSYS cannot be specified.

This attribute specifies the name of the job class and uniquelyidentifies the job class. The name has to be unique in the SQLnamespace. For example, a job class cannot have the same name as atable in a schema.

resource_consumer_group

This attribute specifies the resource consumer group this classis associated with. A resource consumer group is a set ofsynchronous or asynchronous sessions that are grouped togetherbased on their processing needs. A job class has a many-to-onerelationship with a resource consumer group. The resource consumergroup that the job class associates with will determine theresources that will be allocated to the job class.

If the resource consumer group that a job class is associatedwith is dropped, the job class will then be associated with thedefault resource consumer group.

If no resource consumer group is specified, the job class isassociated with the default resource consumer group.

If the specified resource consumer group does not exist whencreating the job class, an error occurs.

If resource_consumer_group is specified, you cannotspecify a service (it must be NULL). Also, if aservice is specified, resource_consumer_group must beNULL.

service

This attribute specifies the database service that the jobs inthis class will have affinity to. In a RAC environment, this meansthat the jobs in this class will only run on those databaseinstances that are assigned to the specific service.

If a service is specified, resource_consumer_groupmust be NULL. Note that a service can be mapped to aresource consumer group, so you can also control resourcesallocated to jobs by specifying a service. SeeDBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPINGfor details.

If no service is specified, the job class will belong to thedefault service, which means it will have no service affinity andany one of the database instances within the cluster might run thejob. If the service that a job class belongs to is dropped, the jobclass will then belong to the default service.

If the specified service does not exist when creating the jobclass, then an error occurs.

logging_level

This attribute specifies how much information is logged. Thethree possible options are:

  • DBMS_SCHEDULER.LOGGING_OFF

    No logging will be performed for any jobs in this class.

  • DBMS_SCHEDULER.LOGGING_RUNS

    The Scheduler will write detailed information to the joblog for all runs of each job in this class. This is thedefault.

  • DBMS_SCHEDULER.LOGGING_FULL

    In addition to recording every run of a job, the Scheduler willrecord all operations performed on all jobs in this class. In otherwords, every time a job is created, enabled, disabled, altered, andso on will be recorded in the log.

log_history

This enables you to control the amount of logging the Schedulerperforms. To prevent the job log and the window log from growingindiscriminately, the Scheduler has an attribute that specifies howmuch history (in days) to keep. Once a day, the Scheduler willautomatically purge all log entries from both the job log as wellas the window log that are older than the specified history. Thedefault is 30 days.

You can change the default by using theSET_SCHEDULER_ATTRIBUTE procedure. For example, tochange it to 90 days, issue the following statement:

DBMS_SCHEDULER.SET_SCHEDULER_ATTRIBUTE('log_history','90');

The range of valid values is 1 through 999.

comments

This attribute is for an optional comment about the job class.By default, this attribute is NULL.


Usage Notes

For users to create jobs that belong to a job class, the jobowner must have EXECUTE privileges on the job class.Therefore, after the job class has been created,EXECUTE privileges must be granted on the job class sothat users create jobs belonging to that class. You can also grantthe EXECUTE privilege to a role.

Creating a job class requires the MANAGESCHEDULER system privilege.

这篇关于关于过程CREATE_JOB_CLASS Procedure的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1030627

相关文章

JavaScript中的reduce方法执行过程、使用场景及进阶用法

《JavaScript中的reduce方法执行过程、使用场景及进阶用法》:本文主要介绍JavaScript中的reduce方法执行过程、使用场景及进阶用法的相关资料,reduce是JavaScri... 目录1. 什么是reduce2. reduce语法2.1 语法2.2 参数说明3. reduce执行过程

redis群集简单部署过程

《redis群集简单部署过程》文章介绍了Redis,一个高性能的键值存储系统,其支持多种数据结构和命令,它还讨论了Redis的服务器端架构、数据存储和获取、协议和命令、高可用性方案、缓存机制以及监控和... 目录Redis介绍1. 基本概念2. 服务器端3. 存储和获取数据4. 协议和命令5. 高可用性6.

PLsql Oracle 下载安装图文过程详解

《PLsqlOracle下载安装图文过程详解》PL/SQLDeveloper是一款用于开发Oracle数据库的集成开发环境,可以通过官网下载安装配置,并通过配置tnsnames.ora文件及环境变... 目录一、PL/SQL Developer 简介二、PL/SQL Developer 安装及配置详解1.下

在Java中使用ModelMapper简化Shapefile属性转JavaBean实战过程

《在Java中使用ModelMapper简化Shapefile属性转JavaBean实战过程》本文介绍了在Java中使用ModelMapper库简化Shapefile属性转JavaBean的过程,对比... 目录前言一、原始的处理办法1、使用Set方法来转换2、使用构造方法转换二、基于ModelMapper

springboot启动流程过程

《springboot启动流程过程》SpringBoot简化了Spring框架的使用,通过创建`SpringApplication`对象,判断应用类型并设置初始化器和监听器,在`run`方法中,读取配... 目录springboot启动流程springboot程序启动入口1.创建SpringApplicat

本地搭建DeepSeek-R1、WebUI的完整过程及访问

《本地搭建DeepSeek-R1、WebUI的完整过程及访问》:本文主要介绍本地搭建DeepSeek-R1、WebUI的完整过程及访问的相关资料,DeepSeek-R1是一个开源的人工智能平台,主... 目录背景       搭建准备基础概念搭建过程访问对话测试总结背景       最近几年,人工智能技术

Linux部署jar包过程

《Linux部署jar包过程》文章介绍了在Linux系统上部署Java(jar)包时需要注意的几个关键点,包括统一JDK版本、添加打包插件、修改数据库密码以及正确执行jar包的方法... 目录linux部署jar包1.统一jdk版本2.打包插件依赖3.修改密码4.执行jar包总结Linux部署jar包部署

解决systemctl reload nginx重启Nginx服务报错:Job for nginx.service invalid问题

《解决systemctlreloadnginx重启Nginx服务报错:Jobfornginx.serviceinvalid问题》文章描述了通过`systemctlstatusnginx.se... 目录systemctl reload nginx重启Nginx服务报错:Job for nginx.javas

SpringBoot 整合 Grizzly的过程

《SpringBoot整合Grizzly的过程》Grizzly是一个高性能的、异步的、非阻塞的HTTP服务器框架,它可以与SpringBoot一起提供比传统的Tomcat或Jet... 目录为什么选择 Grizzly?Spring Boot + Grizzly 整合的优势添加依赖自定义 Grizzly 作为

mysql-8.0.30压缩包版安装和配置MySQL环境过程

《mysql-8.0.30压缩包版安装和配置MySQL环境过程》该文章介绍了如何在Windows系统中下载、安装和配置MySQL数据库,包括下载地址、解压文件、创建和配置my.ini文件、设置环境变量... 目录压缩包安装配置下载配置环境变量下载和初始化总结压缩包安装配置下载下载地址:https://d