How to disable the scheduler using SCHEDULER_DISABLED attribute in 10g (文档 ID 1491941.1)

来源:互联网 发布:352空气净化器 知乎 编辑:程序博客网 时间:2024/05/16 08:10


APPLIES TO:
适用于:

Oracle Server - Enterprise Edition - Version 10.1.0.2 and later
Information in this document applies to any platform.

Oracle Server - 企业版 - 版本10.1.0.2和更高版本
本文档中的信息适用于任何平台。

GOAL

Is it possible to disable the Scheduler, for maintenance work by executing the following statement:

DBMS_SCHEDULER.set_scheduler_attribute('SCHEDULER_DISABLED', 'TRUE');

as after running the above command, the jobs are still running at the planned time.

可以通过执行以下语句来禁用调度程序,以进行维护工作么?:

DBMS_SCHEDULER.set_scheduler_attribute('SCHEDULER_DISABLED','TRUE'); ???

因为在运行上述命令后,所有作业仍在计划时间运行。

FIX

It is not possible to disable the scheduler in version 10.2

在版本10.2中禁用调度程序是不可能的

This has been added as a new feature starting Oracle 11gR2.

这已被添加为启动Oracle 11gR2的一个新功能。


Oracle documentation allows us to use the dbms_scheduler.set_scheduler_attribute procedure only for these following attributes: default_timezone, max_job_slave_processes, and log_history.
Please refer to the Oracle® Database PL/SQL Packages and Types Reference.

Oracle文档规定:dbms_scheduler.set_scheduler_attribute 仅适用于以下参数:default_timezone,max_job_slave_processes和log_history。
请参阅Oracle®数据库PL / SQL包和类型参考。
(在这里我查找了这三个参数的相关文档,原文与翻译在最后(命名为ps:),通过阅读官方文档,证明这个答主所言正确。)

The SCHEDULER_DISABLED is unsupported for this package. This is not guaranteed to work, so we can not predict an expected behavior.

SCHEDULER_DISABLED 并不被PL/SQL Packages 所包括。正因SCHEDULER_DISABLED 不包括在其中,
所以我们无法得到理想效果。



In some cases it might work if you allow the coordinator and slaves to exit after using SCHEDULER_DISABLED.
If dbms_scheduler.run_job is executed the job will still run.

在某些情况下,如果你使协调器( Job Coordinator:它是一个或多个后台进程(cjqNNN),用于控制和启动Job Slave
和slaves在使用SCHEDULER_DISABLED后退出,这样SCHEDULER_DISABLED 可能会生效。
如果执行dbms_scheduler.run_job(一个存储过程如: dbms_scheduler.run_job('JOB_TESTJOB',TRUE) ),job会恢复运行。


From 11gR2 and above:

从11gR2及以上:

Starting from this version, by setting job_queue_processes to 0 all job processes are stopped, which means that DBMS_SCHEDULER jobs, autotask jobs and DBMS_JOB jobs cannot run.
When using previous versions only DBMS_JOB jobs were disabled after changing job_queue_processes to 0.

从此版本开始,通过将job_queue_processes设置为0(具体如何设置,查了下相关例子在最后,命名为:pss),所有jobs进程都将停止,这意味着DBMS_SCHEDULER jobs,自动任务作业(在最后面有解释)和DBMS_JOB作业无法运行。

使用先前版本时,job_queue_processes设置为0 仅仅将 DBMS_JOB jobs禁用(意味着DBMS_SCHEDULER 创建的job还会运行)。

Hence, in order to stop the scheduler jobs in 11gR2 and above, setting the parameter job_queue_processes to 0 is enough.

因此,想停止11gR2及更高版本中的scheduler jobs ,请将参数job_queue_processes设置为0就足够了(语句:ALTER SYSTEM SET job_queue_processes = 0;)。
(查了官方文档,确实是这样。)


---------------------翻译完成,下面是译文中的解释信息-------------------------------------





PS:

10gSCHEDULER支持的参数以及如何使用
原文链接:http://docs.oracle.com/cd/B19306_01/appdev.102/b14258/d_sched.htm#i1009818
翻译:这一步是设定 Scheduler attribute.的值,设定后会立即生效,但是生效后的结果你可能不是立即看到。
这三个属性是:default_timezonemax_job_slave_processes, and log_history.

SET_SCHEDULER_ATTRIBUTE Procedure

This procedure sets the value of a Scheduler attribute. This takes effect immediately but the resulting changes may not be seen immediately. The attributes you can set are default_timezonemax_job_slave_processes, and log_history.

PSS:
11gR2的文档说明:
链接:https://docs.oracle.com/cd/E18283_01/server.112/e17110/initparams108.htm
JOB_QUEUE_PROCESSES specifies the maximum number of job slaves per instance that can be created for the execution of DBMS_JOB jobs and Oracle Scheduler (DBMS_SCHEDULER) jobs. DBMS_JOBand Oracle Scheduler share the same job coordinator and job slaves, and they are both controlled by the JOB_QUEUE_PROCESSES parameter.大意:DBMS_JOB jobs and Oracle Scheduler job 共同被JOB_QUEUE_PROCESSES 所控制。

If the value of JOB_QUEUE_PROCESSES is set to 0, then DBMS_JOB jobs and Oracle Scheduler jobs will not run on the instance.
如果设置为o,DBMS_JOB jobs and Oracle Scheduler job在当前实例上将不会运行。

If JOB_QUEUE_PROCESSES is set to a value in the range of 1 to 1000, then DBMS_JOB jobs and Oracle Scheduler jobs will run. The actual number of job slaves created for Oracle Scheduler jobs is auto-tuned by the Scheduler depending on several factors, including available resources, Resource Manager settings, and currently running jobs. However, the combined total number of job slaves running DBMS_JOB jobs and Oracle Scheduler jobs on an instance can never exceed the value of JOB_QUEUE_PROCESSES for that instance. The number of job slaves running Oracle Scheduler jobs is additionally limited to the value of the MAX_JOB_SLAVE_PROCESSES Scheduler attribute.

Advanced replication uses Oracle Scheduler for data refreshes. Oracle Streams Advanced Queuing uses Oracle Scheduler for message propagation. Materialized views use Oracle Scheduler for automatic refreshes. Setting JOB_QUEUE_PROCESS to 0 will disable these features as well as any other features that use Oracle Scheduler or DBMS_JOB.


PSS:AutoTask(自动任务):

Oracle 数据库预先定义了自动任务的三个功能:

1. Automatic Optimizer Statistics Collection

    对没有统计信息或者过时统计信息的数据库对象进行收集统计信息,用来提高 sql 执行效率

2. Automatic Segment Advisor

    建议回收哪些段空间可以回收

3. Automatic SQL Tuning Advisor

    检测高负载的 sql 语句性能,并建议如何进行调优
APPLIES TO:
适用于:

Oracle Server - Enterprise Edition - Version 10.1.0.2 and later
Information in this document applies to any platform.

Oracle Server - 企业版 - 版本10.1.0.2和更高版本
本文档中的信息适用于任何平台。

GOAL

Is it possible to disable the Scheduler, for maintenance work by executing the following statement:

DBMS_SCHEDULER.set_scheduler_attribute('SCHEDULER_DISABLED', 'TRUE');

as after running the above command, the jobs are still running at the planned time.

可以通过执行以下语句来禁用调度程序,以进行维护工作么?:

DBMS_SCHEDULER.set_scheduler_attribute('SCHEDULER_DISABLED','TRUE'); ???

因为在运行上述命令后,所有作业仍在计划时间运行。

FIX

It is not possible to disable the scheduler in version 10.2

在版本10.2中禁用调度程序是不可能的

This has been added as a new feature starting Oracle 11gR2.

这已被添加为启动Oracle 11gR2的一个新功能。


Oracle documentation allows us to use the dbms_scheduler.set_scheduler_attribute procedure only for these following attributes: default_timezone, max_job_slave_processes, and log_history.
Please refer to the Oracle® Database PL/SQL Packages and Types Reference.

Oracle文档规定:dbms_scheduler.set_scheduler_attribute 仅适用于以下参数:default_timezone,max_job_slave_processes和log_history。
请参阅Oracle®数据库PL / SQL包和类型参考。
(在这里我查找了这三个参数的相关文档,原文与翻译在最后(命名为ps:),通过阅读官方文档,证明这个答主所言正确。)

The SCHEDULER_DISABLED is unsupported for this package. This is not guaranteed to work, so we can not predict an expected behavior.

SCHEDULER_DISABLED 并不被PL/SQL Packages 所包括。正因SCHEDULER_DISABLED 不包括在其中,
所以我们无法得到理想效果。



In some cases it might work if you allow the coordinator and slaves to exit after using SCHEDULER_DISABLED.
If dbms_scheduler.run_job is executed the job will still run.

在某些情况下,如果你使协调器( Job Coordinator:它是一个或多个后台进程(cjqNNN),用于控制和启动Job Slave
和slaves在使用SCHEDULER_DISABLED后退出,这样SCHEDULER_DISABLED 可能会生效。
如果执行dbms_scheduler.run_job(一个存储过程如: dbms_scheduler.run_job('JOB_TESTJOB',TRUE) ),job会恢复运行。


From 11gR2 and above:

从11gR2及以上:

Starting from this version, by setting job_queue_processes to 0 all job processes are stopped, which means that DBMS_SCHEDULER jobs, autotask jobs and DBMS_JOB jobs cannot run.
When using previous versions only DBMS_JOB jobs were disabled after changing job_queue_processes to 0.

从此版本开始,通过将job_queue_processes设置为0(具体如何设置,查了下相关例子在最后,命名为:pss),所有jobs进程都将停止,这意味着DBMS_SCHEDULER jobs,自动任务作业(在最后面有解释)和DBMS_JOB作业无法运行。

使用先前版本时,job_queue_processes设置为0 仅仅将 DBMS_JOB jobs禁用(意味着DBMS_SCHEDULER 创建的job还会运行)。

Hence, in order to stop the scheduler jobs in 11gR2 and above, setting the parameter job_queue_processes to 0 is enough.

因此,想停止11gR2及更高版本中的scheduler jobs ,请将参数job_queue_processes设置为0就足够了(语句:ALTER SYSTEM SET job_queue_processes = 0;)。
(查了官方文档,确实是这样。)


---------------------翻译完成,下面是译文中的解释信息-------------------------------------





PS:

10gSCHEDULER支持的参数以及如何使用
原文链接:http://docs.oracle.com/cd/B19306_01/appdev.102/b14258/d_sched.htm#i1009818
翻译:这一步是设定 Scheduler attribute.的值,设定后会立即生效,但是生效后的结果你可能不是立即看到。
这三个属性是:default_timezonemax_job_slave_processes, and log_history.

SET_SCHEDULER_ATTRIBUTE Procedure

This procedure sets the value of a Scheduler attribute. This takes effect immediately but the resulting changes may not be seen immediately. The attributes you can set are default_timezonemax_job_slave_processes, and log_history.

PSS:
11gR2的文档说明:
链接:https://docs.oracle.com/cd/E18283_01/server.112/e17110/initparams108.htm
JOB_QUEUE_PROCESSES specifies the maximum number of job slaves per instance that can be created for the execution of DBMS_JOB jobs and Oracle Scheduler (DBMS_SCHEDULER) jobs. DBMS_JOBand Oracle Scheduler share the same job coordinator and job slaves, and they are both controlled by the JOB_QUEUE_PROCESSES parameter.大意:DBMS_JOB jobs and Oracle Scheduler job 共同被JOB_QUEUE_PROCESSES 所控制。

If the value of JOB_QUEUE_PROCESSES is set to 0, then DBMS_JOB jobs and Oracle Scheduler jobs will not run on the instance.
如果设置为o,DBMS_JOB jobs and Oracle Scheduler job在当前实例上将不会运行。

If JOB_QUEUE_PROCESSES is set to a value in the range of 1 to 1000, then DBMS_JOB jobs and Oracle Scheduler jobs will run. The actual number of job slaves created for Oracle Scheduler jobs is auto-tuned by the Scheduler depending on several factors, including available resources, Resource Manager settings, and currently running jobs. However, the combined total number of job slaves running DBMS_JOB jobs and Oracle Scheduler jobs on an instance can never exceed the value of JOB_QUEUE_PROCESSES for that instance. The number of job slaves running Oracle Scheduler jobs is additionally limited to the value of the MAX_JOB_SLAVE_PROCESSES Scheduler attribute.

Advanced replication uses Oracle Scheduler for data refreshes. Oracle Streams Advanced Queuing uses Oracle Scheduler for message propagation. Materialized views use Oracle Scheduler for automatic refreshes. Setting JOB_QUEUE_PROCESS to 0 will disable these features as well as any other features that use Oracle Scheduler or DBMS_JOB.


PSS:AutoTask(自动任务):

Oracle 数据库预先定义了自动任务的三个功能:

1. Automatic Optimizer Statistics Collection

    对没有统计信息或者过时统计信息的数据库对象进行收集统计信息,用来提高 sql 执行效率

2. Automatic Segment Advisor

    建议回收哪些段空间可以回收

3. Automatic SQL Tuning Advisor

    检测高负载的 sql 语句性能,并建议如何进行调优
0 0