Oracle Scheduler中日期表达式和PLSQL表达式的区别

这篇具有很好参考价值的文章主要介绍了Oracle Scheduler中日期表达式和PLSQL表达式的区别。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

参考文档:

Database Administrator’s Guide

29.4.5.4 Differences Between PL/SQL Expression and Calendaring Syntax Behavior

There are important differences in behavior between a calendaring expression and PL/SQL repeat interval.

These differences include the following:

  • Start date

    • Using the calendaring syntax, the start date is a reference date only. Therefore, the schedule is valid as of this date. It does not mean that the job will start on the start date.

    • Using a PL/SQL expression, the start date represents the actual time that the job will start executing for the first time.

  • Next run time

    • Using the calendaring syntax, the next time the job runs is fixed.

    • Using the PL/SQL expression, the next time the job runs depends on the actual start time of the current job run.

    As an example of the difference, for a job that is scheduled to start at 2:00 PM and repeat every 2 hours, but actually starts at 2:10:

    • If calendaring syntax specified the repeat interval, then it would repeat at 4, 6 and so on.

    • If a PL/SQL expression is used, then the job would repeat at 4:10, and if the next job actually started at 4:11, then the subsequent run would be at 6:11.

To illustrate these two points, consider a situation where you have a start date of 15-July-2003 1:45:00 and you want it to repeat every two hours. A calendar expression of "FREQ=HOURLY; INTERVAL=2; BYMINUTE=0;" will generate the following schedule:

TUE 15-JUL-2003  03:00:00
TUE 15-JUL-2003  05:00:00
TUE 15-JUL-2003  07:00:00
TUE 15-JUL-2003  09:00:00
TUE 15-JUL-2003  11:00:00
...

Note that the calendar expression repeats every two hours on the hour.

A PL/SQL expression of "SYSTIMESTAMP + interval '2' hour", however, might have a run time of the following:

TUE 15-JUL-2003  01:45:00
TUE 15-JUL-2003  03:45:05
TUE 15-JUL-2003  05:45:09
TUE 15-JUL-2003  07:45:14
TUE 15-JUL-2003  09:45:20
...

Parent topic: Setting the Repeat Interval

29.4.5.5 Repeat Intervals and Daylight Savings

For repeating jobs, the next time a job is scheduled to run is stored in a timestamp with time zone column.

  • Using the calendaring syntax, the time zone is retrieved from start_date. For more information on what happens when start_date is not specified, see Oracle Database PL/SQL Packages and Types Reference.

  • Using PL/SQL repeat intervals, the time zone is part of the timestamp that the PL/SQL expression returns.

In both cases, it is important to use region names. For example, use "Europe/Istanbul", instead of absolute time zone offsets such as "+2:00". The Scheduler follows daylight savings adjustments that apply to that region only when a time zone is specified as a region name.文章来源地址https://www.toymoban.com/news/detail-698887.html

到了这里,关于Oracle Scheduler中日期表达式和PLSQL表达式的区别的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包赞助服务器费用

相关文章

  • oracle的正则表达式(regular expression)

    当前,正则表达式已经在很多软件中得到广泛的应用,包括Linux, Unix,HP等操作系统,PHP,C#,Java等开发环境,ORACLE则在10G中推出了自己的正则表达式。 Oracle 10g正则表达式提高了SQL灵活性,有效的解决了数据有效性, 重复词的辨认, 无关的空白检测,或者分解多个正则组成的

    2024年02月07日
    浏览(9)
  • 使用python 解析Linux cron表达式,输出执行日期

    该方法通过输入linux 的cron 表达式,可以按要求输出调度的时间,方便与实际调度进行校对。

    2024年02月11日
    浏览(16)
  • 使用正则表达式判断日期字符串格式是否合法遇到的问题(解决)

    使用正则表达式判断日期字符串格式是否合法遇到的问题(解决)

    我们在使用SpringMVC从前端接受传递过来的日期数据时,默认传递过来的数据是String类型,如果我们从前端传递过来的数据格式是yyyy/MM/dd,SpringMVC有内置类型转化器会将String类型自动转化成Date类型。但如果我们从前端传递过来的数据格式是yyyy-MM-dd,SpringMVC的内置转化器就不能

    2024年02月08日
    浏览(12)
  • js 正则表达式 校验 input输入框 输入格式必须为日期yyyyMM

    要使用正则表达式校验 input 输入框的输入格式是否为日期格式 “yyyyMM”,你可以使用以下 JavaScript 正则表达式: 这个正则表达式匹配的是四位数年份和两位数月份,确保输入的格式为 “yyyyMM”。 以下是一个使用这个正则表达式的例子: 在这个例子中,当用户在 input 输入框

    2024年01月19日
    浏览(13)
  • StringBuilder类- StringBuffer类- 正则表达式- Date类 (日期)- SimpleDateFormat类(日期格式化的类)- Calendar类 (日历类)

    目录 stringbuilder类 StringBuffer类 正则表达式 日期 日期格式化的类 Calendar类:(日历类) 是一个抽象类 stringbuilder类 概念:可以改变的字符串 (这里跟string可以区分开,string创建的是不可改变的字符串) 底层:使用的是一个byte类型的数组,默认长度16 (string的底层使用final修

    2024年01月17日
    浏览(13)
  • Oracle使用regexp_like报错ORA-12733 正则表达式太长

    注:此篇内容并没有解决正则表达式太长的问题。 在命令行窗口连接数据库: 其中: username  是你的数据库用户名。 password  是你的数据库密码。 hostname  是数据库服务器的主机名或IP地址。 port  是监听端口,默认是1521。 SID  是系统标识符,是数据库实例的唯一名称。

    2024年04月15日
    浏览(12)
  • java 正则表达式操作 --各种方法的区别

    结论:Pattern与Matcher一起合作.Matcher类提供了对正则表达式的分组支持,以及对正则表达式的多次匹配支持. 单独用Pattern只能使用Pattern.matches(String regex,CharSequence input)一种最基础最简单的匹配。 java正则表达式通过java.util.regex包下的Pattern类与Matcher类实现(建议在阅读本文时,打开

    2024年01月19日
    浏览(12)
  • Lambda表达式和匿名内部类的区别

    匿名内部类:可以是接口,也可以是抽象类,还可以是具体类 Lambda表达式:只能是接口 如果接口中有且仅有一个抽象方法,可以使用Lambda表达式,也可以使用匿名内部类 如果接口中多于一个抽象方法,只能使用匿名内部类,而不能使用Lambda表达式 匿名内部类:编译之后,产

    2024年02月10日
    浏览(7)
  • java与hadoop中正则表达式有什么区别

    Java和Hadoop中的正则表达式有一些区别,主要体现在以下几个方面: 语法差异:Java中的正则表达式遵循Java的正则表达式语法,而Hadoop中的正则表达式基于Google的RE2库实现,语法稍有不同。例如,在Java中使用 d 表示一个数字字符,而在Hadoop中则需要使用 [0-9] 来匹配数字。 功

    2024年02月10日
    浏览(9)
  • Oracle 正则表达式详解(regexp_substr、regexp_instr、regexp_replace、regexp_like)

    文章目录 1 概述 2 匹配规则 3 正则函数 3.1 regexp_substr() 3.2 regexp_instr() 3.3 regexp_replace() 3.4 regexp_like() 1 概述 1. 作用:处理字符时,很强大 1 2. 分类:与下列相似,但功能更加强大(‘支持正则表达式’) (1) regexp_like : 同 like 功能相似(模糊 ‘匹配’) (2) regexp_instr : 同 instr 功

    2024年02月09日
    浏览(13)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包