中亦科技黄远邦:如何应对7月1日闰秒对Oracle数据库影响

服务器
由于今年7月1日全世界会多出一秒,这可能对时间敏感的IT系统造成较大影响。中亦科技数据库团队对此问题做了深入的研究,并对用户系统提出了相应的解决方法及建议。

由于今年7月1日全世界会多出一秒,这可能对时间敏感的IT系统造成较大影响。中亦科技数据库团队对此问题做了深入的研究,并对用户系统提出了相应的解决方法及建议。

中亦科技数据库产品总监黄远邦认为,闰秒调整会对Oracle数据库有以下影响:

对于单点数据库,这个调整没有任何的影响;

对于RAC系统,NTP闰秒问题可能会导致节点reboot;

对于使用NTP进行时间同步的RAC系统,对高于10.2.0.4版本的系统(包括11G)无影响;对低于10.2.0.0.4以下的版本,如果使用了第三方cluster 软件,如HACMP,Sun Cluster or Veritas SFRAC也是没有影响;

对于Linux及Oracle VM,部分应用程序无法处理该非常规“23:59:60”的时间戳,可能会导致应用挂起或主机重启。

闰秒的背景介绍

2015年1月5日,总部设在法国巴黎的国际地球自转和参考系统服务组织IERS(International Earth Rotation and Reference Systems Service)在其49期C公报发布闰秒公告:国际标准时间UTC(Coordinated Universal Time,协调世界时)将在2015年6月30日(格林尼治时间)实施一个正闰秒,即增加1秒。1月8日国际权度局时间部BIPM(Bureau International des Poids et Mesures)向全球参加国际原子时TAI计算的各守时实验室发布了闰秒调整预报。由于时差的原因,我国将在北京时间2015年7月1日的7时59分59秒和全球同步进行闰秒调整,届时会出现7:59:60的特殊现象。上一次“闰秒”出现在北京时间2012年7月1日。本次闰秒调整步骤及调整前后的时间标记为:

  UTC时间:

  2015年6月30日,23时59分59秒

2015年6月30日,23时59分60秒

  2015年7月1日, 0时0分0秒

  北京时间:

  2015年7月1日,7时59分59秒

  2015年7月1日,7时59分60秒

  2015年7月1日,8时 0分 0秒

触发条件及避免方式

节点reboot的需要同时满足以下触发条件才会重启:

条件1:

xntpd daemon does not have slewing enabled (default) or does not have
PLL mode disabled (default)

条件2:

A. The Oracle Clusterware version does not have a fix for bug 5015469 or bug
6022204 or the Oracle Clusterware version does have a fix for at least one these
defects, but due to Solaris CR#6595936 the alarm signal arrival has been
delayed exceeding the oprocd 0.5 sec default margin (only Solaris)

因为这两个条件需要同时满足才能触发,可以使用以下的方式避免相应条件的失效:

条件1:

使用ntp –x打开 ntpd(xntpd)进程的“slewing”特性,进而避免其快速调整。

每个系统不同,详细可以参考:

NTP leap second event causing Oracle Clusterware node reboot [ID759143.1]

条件2:

Apply Oracle Clusterware patch bundles or MLR (i.e. MLR # 9 or higher) in
order to resolve bugs 5015469 and 6022204,修复相应的bug,使触发条件失效

Bug 5015469:
fix included in Oracle Clusterware 10.2.0.3 and higher, one off fixes
exist for 10.1.0.3, 10.1.0.4, 10.1.0.5, 10.2.0.1, 10.2.0.2 This fix mainly
rearms the oprocd timer after a negative time drift.

Bug 6022204:
fix included in Oracle Clusterware 10.2.0.4 and higher (including
11g), included in Oracle Clusterware 10.2.0.3 MLR 9 and higher
and Oracle Clusterware 10.2.0.3 bundle patches 2 and 3 (patch #
6756433 and 7117233). This fix doesn't exist for Oracle Clusterware
10.2.0.2 or
10.2.0.1. This fix supersedes 5015469 and is needed in conjunction
with increasing the oprocd margin.

 

责任编辑:何巍
相关推荐

2009-06-30 15:02:41

磁盘排序Oracle数据库性能

2017-09-22 11:01:00

Oracle数据库中直方图

2011-06-03 09:22:04

OracleOracle应用服务器

2018-08-09 12:23:31

数据库Oracle静默错误

2023-09-05 08:40:57

删除数据库Oracle

2012-02-08 09:27:18

云计算企业网络

2012-02-08 13:52:35

云计算

2015-07-10 09:42:33

2011-08-10 15:38:12

ConstraintOracle

2016-07-22 10:46:08

数据库

2010-05-05 15:45:52

Oracle数据库

2010-04-13 10:32:40

Oracle数据库编程

2010-04-19 13:59:17

Oracle 数据库

2010-04-19 16:01:54

2010-04-14 15:58:17

Oracle程序开发

2010-05-04 11:02:44

Oracle数据库

2010-04-26 13:23:49

Oracle数据库

2010-04-01 17:06:57

Oracle数据库

2010-04-14 13:14:46

Oracle数据库

2011-11-03 16:57:42

NoSQL
点赞
收藏

51CTO技术栈公众号