DBMS_JOB 与 DBMS_SCHEDULER
DBMS_JOB 和 DBMS_SCHEDULER 之间有什么区别?
What is the difference between DBMS_JOB and DBMS_SCHEDULER ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
DBMS_JOB 和 DBMS_SCHEDULER 之间有什么区别?
What is the difference between DBMS_JOB and DBMS_SCHEDULER ?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(4)
来自其他论坛:
虽然 dbms_job 仍然存在于 10g 和 11g 中,但 Oracle 建议在 10g 及更高版本中使用 dbms_scheduler。 dbms_job 中没有添加任何新功能,您可能很快就会遇到它的限制。
dbms_scheduler 比 dbms_job 更健壮、功能更齐全,并且包含 dbms_job 没有的以下功能:
10g 第 1 版之后的版本中的功能包括:
From other forums:
Although dbms_job still exists in 10g and 11g, Oracle recommends the use of dbms_scheduler in releases 10g and up. No new features are being added to dbms_job and you will likely quickly run into its limitations.
dbms_scheduler is more robust and fully-featured than dbms_job and includes the following features that dbms_job does not have :
Features in releases after 10g Release 1 include :
需要注意的一个区别是,与 DBMS_JOB 不同,DBMS_SCHEDULER 执行提交,这使得它不适合某些用途。对于比较简单的需求来说也比较麻烦。虽然 DBMS_JOB 将不再得到增强,但它不太可能被取消支持,因为肯定有数千个系统正在使用它并依赖于它的工作方式,包括不执行调用它的事务的隐式提交。
请参阅此“询问 Tom”主题 了解更多。
One difference to be aware of is that unlike DBMS_JOB, DBMS_SCHEDULER performs a commit, which makes it unsuitable for some uses. It is also rather cumbersome for simpler requirements. While DBMS_JOB will no longer be enhanced, it is unlikely to ever be desupported, as there must be thousands of systems that are using it and rely on the way it works, including not performing an implicit commit of the transaction from which it was called.
See this Ask Tom thread for more.
接下来列出的是 DBMS_SCHEDULER 相对于 cron 的一些优点:
• 可以使一个作业的执行依赖于另一个作业的完成
• 强大的资源平衡和灵活的调度功能
• 可以基于数据库事件
• 无论操作系统如何,DBMS_SCHEDULER 语法的工作方式都是相同的
• 可以使用数据字典运行状态报告
• 如果在集群环境中工作,无需担心为集群中的每个节点同步多个 cron 表
接下来列出的是使用 cron 的一些优点:
• 易于使用、简单、经过验证且真实。
• 几乎在所有 Linux/Unix 机器上都可用。在大多数情况下,无论 Linux/Unix 平台如何,运行几乎相同(是的,存在细微差别)
。独立于数据库运行,无论数据库供应商或数据库版本如何,其工作方式都是相同的
• 无论数据库是否可用,都可以工作
Listed next are some of the benefits that DBMS_SCHEDULER has over cron:
• Can make the execution of a job dependent on the completion of another job
• Robust resource balancing and flexible scheduling features
• Can run jobs based on a database event
• DBMS_SCHEDULER syntax works the same regardless of the operating system
• Can run status reports using the data dictionary
• If working in clustered environment, no need to worry about synchronizing multiple cron tables for each node in the cluster
Listed next are some of the advantages of using cron:
• Easy to use, simple, tried and true
• Almost universally available on all Linux/Unix boxes; for the most part, runs nearly identically regardless of the Linux/Unix platform (yes, there are minor differences)
• Database agnostic; operates independently of the database and works the same regardless of the database vendor or database version
• Works whether the database is available or not
我知道这是一个旧线程,但这似乎相关。
升级到 Oracle Database 19c 后,旧 DBMS_JOB 接口下的作业将会发生转换。不用担心——放松!
会发生什么?这对您在 DBA_JOBS 中的工作意味着什么?
首先,您无法在调度程序的控制下阻止或跳过迁移。但也没有理由这样做。
这意味着:您仍然可以使用 DBMS_JOB,但实际上我们正在使用 DBMS_SCHEDULER。内部程序已更改。您的调用将以相同的方式工作,但 DBMS_JOB 现在是 DBMS_SCHEDULER 的旧接口。
请参阅:DBMS_JOB – 行为更改升级期间的 Oracle 19c
I know this is an old thread, but this seems relevant.
With the upgrade to Oracle Database 19c there will be a conversion of jobs under the hood of the old DBMS_JOB interface. No worries – relax!
What happens? And what does that mean for your jobs in DBA_JOBS?
First of all, you can’t prevent or skip the migration under the scheduler’s control. But there is also no reason to do so.
What this means is: You can still use DBMS_JOB but under the cover we are using DBMS_SCHEDULER. The internal procedures have been changed. Your calls will work the same way, but DBMS_JOB is now a legacy interface to the DBMS_SCHEDULER.
See: DBMS_JOB – Behavior Change in Oracle 19c during upgrade