关于过程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

相关文章

java中使用POI生成Excel并导出过程

《java中使用POI生成Excel并导出过程》:本文主要介绍java中使用POI生成Excel并导出过程,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录需求说明及实现方式需求完成通用代码版本1版本2结果展示type参数为atype参数为b总结注:本文章中代码均为

SpringCloud之LoadBalancer负载均衡服务调用过程

《SpringCloud之LoadBalancer负载均衡服务调用过程》:本文主要介绍SpringCloud之LoadBalancer负载均衡服务调用过程,具有很好的参考价值,希望对大家有所帮助,... 目录前言一、LoadBalancer是什么?二、使用步骤1、启动consul2、客户端加入依赖3、以服务

Oracle存储过程里操作BLOB的字节数据的办法

《Oracle存储过程里操作BLOB的字节数据的办法》该篇文章介绍了如何在Oracle存储过程中操作BLOB的字节数据,作者研究了如何获取BLOB的字节长度、如何使用DBMS_LOB包进行BLOB操作... 目录一、缘由二、办法2.1 基本操作2.2 DBMS_LOB包2.3 字节级操作与RAW数据类型2.

C#原型模式之如何通过克隆对象来优化创建过程

《C#原型模式之如何通过克隆对象来优化创建过程》原型模式是一种创建型设计模式,通过克隆现有对象来创建新对象,避免重复的创建成本和复杂的初始化过程,它适用于对象创建过程复杂、需要大量相似对象或避免重复初... 目录什么是原型模式?原型模式的工作原理C#中如何实现原型模式?1. 定义原型接口2. 实现原型接口3

Spring Security注解方式权限控制过程

《SpringSecurity注解方式权限控制过程》:本文主要介绍SpringSecurity注解方式权限控制过程,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录一、摘要二、实现步骤2.1 在配置类中添加权限注解的支持2.2 创建Controller类2.3 Us

Spring AI集成DeepSeek三步搞定Java智能应用的详细过程

《SpringAI集成DeepSeek三步搞定Java智能应用的详细过程》本文介绍了如何使用SpringAI集成DeepSeek,一个国内顶尖的多模态大模型,SpringAI提供了一套统一的接口,简... 目录DeepSeek 介绍Spring AI 是什么?Spring AI 的主要功能包括1、环境准备2

SpringBoot集成图片验证码框架easy-captcha的详细过程

《SpringBoot集成图片验证码框架easy-captcha的详细过程》本文介绍了如何将Easy-Captcha框架集成到SpringBoot项目中,实现图片验证码功能,Easy-Captcha是... 目录SpringBoot集成图片验证码框架easy-captcha一、引言二、依赖三、代码1. Ea

pycharm远程连接服务器运行pytorch的过程详解

《pycharm远程连接服务器运行pytorch的过程详解》:本文主要介绍在Linux环境下使用Anaconda管理不同版本的Python环境,并通过PyCharm远程连接服务器来运行PyTorc... 目录linux部署pytorch背景介绍Anaconda安装Linux安装pytorch虚拟环境安装cu

SpringBoot项目注入 traceId 追踪整个请求的日志链路(过程详解)

《SpringBoot项目注入traceId追踪整个请求的日志链路(过程详解)》本文介绍了如何在单体SpringBoot项目中通过手动实现过滤器或拦截器来注入traceId,以追踪整个请求的日志链... SpringBoot项目注入 traceId 来追踪整个请求的日志链路,有了 traceId, 我们在排

Spring Boot 3 整合 Spring Cloud Gateway实践过程

《SpringBoot3整合SpringCloudGateway实践过程》本文介绍了如何使用SpringCloudAlibaba2023.0.0.0版本构建一个微服务网关,包括统一路由、限... 目录引子为什么需要微服务网关实践1.统一路由2.限流防刷3.登录鉴权小结引子当前微服务架构已成为中大型系统的标