--- 环境描述 --- 1.主库 IP 10.113.128.66 主机名 dbtest5 DB版本 11.2.0.4.0 db_name dbpod db_unique_name dbpod instance_name dbpod service_names dbpod --- 2.主库 IP 10.113.128.67 主机名 dbtest6 DB版本 11.2.0.4.0 db_name dbpod db_unique_name dbsdb instance_name dbsdb service_names dbsdb --- 备库创建目录【与主库保持相同的目录结构】 $ mkdir -p /u01/app/oracle/admin/dbsdb/adump $ mkdir -p /u01/app/oracle/admin/dbsdb/dpdump $ mkdir -p /u01/app/oracle/admin/dbsdb/pfile $ mkdir -p /u01/app/oracle/cfgtoollogs/dbca/dbsdb $ mkdir -p /u01/app/oracle/fast_recovery_area $ mkdir -p /u01/app/oracle/fast_recovery_area/dbsdb $ mkdir -p /u01/app/oracle/oradata $ mkdir -p /u01/app/oracle/oradata/dbsdb --- 主库开启force logging SQL> alter database force logging; --- 主备库创建并启动静态监听 $ cat listener.ora # listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora # Generated by Oracle configuration tools. SID_LIST_LISTENER_POD = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = dbpod) (ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1) (SID_NAME = dbpod) ) ) LISTENER_POD = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.113.128.66)(PORT = 1525)) ) ADR_BASE_LISTENER_POD = /u01/app/oracle $ cat listener.ora # listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora # Generated by Oracle configuration tools. SID_LIST_LISTENER_SDB = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = dbsdb) (ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1) (SID_NAME = dbsdb) ) ) LISTENER_SDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.113.128.67)(PORT = 1525)) ) ADR_BASE_LISTENER_SDB = /u01/app/oracle $ lsnrctl start LISTENER_POD $ lsnrctl start LISTENER_SDB $ lsnrctl status LISTENER_POD $ lsnrctl status LISTENER_SDB --- 主备库创建TNS【主备库相同】 $ cat tnsnames.ora # tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora # Generated by Oracle configuration tools. DBPOD = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.113.128.66)(PORT = 1525)) ) (CONNECT_DATA = (SERVICE_NAME = DBPOD) ) ) DBSDB = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.113.128.67)(PORT = 1525)) ) (CONNECT_DATA = (SERVICE_NAME = DBSDB) ) ) --- 主库修改DG相关参数 SQL> alter system set LOG_ARCHIVE_CONFIG='DG_CONFIG=(dbpod,dbsdb)' scope=spfile; SQL> alter system set LOG_ARCHIVE_DEST_1='LOCATION=/u01/app/oracle/fast_recovery_area/arch VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=dbpod' scope=spfile; SQL> alter system set LOG_ARCHIVE_DEST_2='SERVICE=dbsdb ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=dbsdb' scope=spfile; SQL> alter system set LOG_ARCHIVE_DEST_STATE_1=ENABLE scope=spfile; SQL> alter system set LOG_ARCHIVE_DEST_STATE_2=ENABLE scope=spfile; SQL> alter system set REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE scope=spfile; SQL> alter system set FAL_SERVER=dbsdb scope=spfile; SQL> alter system set DB_FILE_NAME_CONVERT='dbsdb','dbpod' scope=spfile; SQL> alter system set LOG_FILE_NAME_CONVERT= 'dbsdb','dbpod' scope=spfile; SQL> alter system set STANDBY_FILE_MANAGEMENT=AUTO scope=spfile; --- 主库开启归档 SQL> shutdown immediate; SQL> startup mount; SQL> alter database archivelog; SQL> alter database open; --- 主库创建备库参数文件 SQL> create pfile='/home/oracle/dbsdb.ora' from spfile; --- 将创建的参数文件拷贝到备库 $ scp /home/oracle/dbsdb.ora dbtest6:/u01/app/oracle/product/11.2.0/db_1/dbs/initdbsdb.ora --- 备库修改参数文件pfile【根据原主库的参数文件修改将所有dbpod替换成dbsdb除db_name以外】 $ cat /u01/app/oracle/product/11.2.0/db_1/dbs/initdbsdb.ora dbsdb.__db_cache_size=1157627904 dbsdb.__java_pool_size=16777216 dbsdb.__large_pool_size=419430400 dbsdb.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment dbsdb.__pga_aggregate_target=1325400064 dbsdb.__sga_target=1979711488 dbsdb.__shared_io_pool_size=0 dbsdb.__shared_pool_size=352321536 dbsdb.__streams_pool_size=0 *._index_partition_large_extents='FALSE' *._optimizer_null_aware_antijoin=FALSE *._partition_large_extents='FALSE' *._undo_autotune=FALSE *._use_adaptive_log_file_sync='FALSE' *.audit_file_dest='/u01/app/oracle/admin/dbsdb/adump' *.audit_trail='NONE' *.compatible='11.2.0.4.0' *.control_files='/u01/app/oracle/oradata/dbsdb/control01.ctl','/u01/app/oracle/fast_recovery_area/dbsdb/control02.ctl' *.db_block_size=8192 *.db_domain='' *.db_name='dbpod' *.db_recovery_file_dest='/u01/app/oracle/fast_recovery_area' *.db_recovery_file_dest_size=5218762752 *.deferred_segment_creation=FALSE *.diagnostic_dest='/u01/app/oracle' *.event='10949 trace name context forever,level 1' *.dispatchers='(PROTOCOL=TCP) (SERVICE=dbsdbXDB)' *.log_archive_dest_state_1='ENABLE' *.log_archive_dest_state_2='ENABLE' *.log_archive_format='%t_%s_%r.dbf' *.memory_target=3300917248 *.open_cursors=300 *.processes=1000 *.remote_login_passwordfile='EXCLUSIVE' *.sec_case_sensitive_logon=FALSE *.sessions=1105 *.undo_tablespace='UNDOTBS1' --- 创建备库spfile文件 SQL> create spfile from pfile; --- 备库启动到nomount SQL> startup nomount --- 修改备库与DG相关的参数 SQL >alter system set DB_UNIQUE_NAME=dbsdb scope=spfile; SQL >alter system set LOG_ARCHIVE_CONFIG='DG_CONFIG=(dbpod,dbsdb)' scope=spfile; SQL >alter system set DB_FILE_NAME_CONVERT='dbpod','dbsdb' scope=spfile; SQL >alter system set LOG_FILE_NAME_CONVERT='dbpod','dbsdb' scope=spfile; SQL >alter system set LOG_ARCHIVE_DEST_1='LOCATION=/u01/app/oracle/fast_recovery_area/arch VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=dbsdb' scope=spfile; SQL >alter system set LOG_ARCHIVE_DEST_2='SERVICE=dbpod ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=dbpod' scope=spfile; SQL >alter system set STANDBY_FILE_MANAGEMENT=AUTO scope=spfile; SQL >alter system set FAL_SERVER=dbpod scope=spfile; SQL >alter system set FAL_CLIENT=dbsdb scope=spfile; --- 使用RMAN DUPLICATE将主库恢复到备库【此处可以使用active database直接将主库在线复制到备库】 $ rman target sys/oracle@dbpod auxiliary sys/oracle@dbsdb nocatalog --- 如果使用非catalog则在RMAN连接时加上nocatalog关键字,否则会报如下错误: PLS-00201: identifier'DBMS_RCVCAT.GETDBID' must be declared RMAN> duplicate target database for standby from active database dorecover nofilenamecheck; --- 在执行duplicate的时候,如果源库和目标库目录相同,那么在duplicate 时需要加上nofilenamecheck关键字,否则会报如下错: RMAN-05001: auxiliary file name conflicts with a file used by the target database --- 下面为duplicate执行输出过程【此处未使用catalog且主备库目录不同】 [oracle@dbtest6 ~]$ rman target sys/oracle@dbpod auxiliary sys/oracle@dbsdb nocatalog Recovery Manager: Release 11.2.0.4.0 - Production on Thu Jul 21 15:41:15 2016 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. connected to target database: DBPOD (DBID=3530613280) using target database control file instead of recovery catalog connected to auxiliary database: DBPOD (not mounted) RMAN> duplicate target database for standby from active database; Starting Duplicate Db at 21-JUL-16 allocated channel: ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: SID=771 device type=DISK contents of Memory Script: { backup as copy reuse targetfile '/u01/app/oracle/product/11.2.0/db_1/dbs/orapwdbpod' auxiliary format '/u01/app/oracle/product/11.2.0/db_1/dbs/orapwdbsdb' ;--- 拷贝主库密码文件到备库 } executing Memory Script Starting backup at 21-JUL-16 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=18 device type=DISK Finished backup at 21-JUL-16 contents of Memory Script: { backup as copy current controlfile for standby auxiliary format '/u01/app/oracle/oradata/dbsdb/control01.ctl'; restore clone controlfile to '/u01/app/oracle/fast_recovery_area/dbsdb/control02.ctl' from '/u01/app/oracle/oradata/dbsdb/control01.ctl'; --- 创建备库控制文件 } executing Memory Script Starting backup at 21-JUL-16 using channel ORA_DISK_1 channel ORA_DISK_1: starting datafile copy copying standby control file output file name=/u01/app/oracle/product/11.2.0/db_1/dbs/snapcf_dbpod.f tag=TAG20160721T154230 RECID=2 STAMP=917797350 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01 Finished backup at 21-JUL-16 Starting restore at 21-JUL-16 using channel ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: copied control file copy Finished restore at 21-JUL-16 contents of Memory Script: { sql clone 'alter database mount standby database';--- 启动备库到mount } executing Memory Script sql statement: alter database mount standby database contents of Memory Script: { set newname for tempfile 1 to "/u01/app/oracle/oradata/dbsdb/temp01.dbf"; switch clone tempfile all; set newname for datafile 1 to "/u01/app/oracle/oradata/dbsdb/system01.dbf"; set newname for datafile 2 to "/u01/app/oracle/oradata/dbsdb/sysaux01.dbf"; set newname for datafile 3 to "/u01/app/oracle/oradata/dbsdb/undotbs01.dbf"; set newname for datafile 4 to "/u01/app/oracle/oradata/dbsdb/users01.dbf"; backup as copy reuse datafile 1 auxiliary format "/u01/app/oracle/oradata/dbsdb/system01.dbf" datafile 2 auxiliary format "/u01/app/oracle/oradata/dbsdb/sysaux01.dbf" datafile 3 auxiliary format "/u01/app/oracle/oradata/dbsdb/undotbs01.dbf" datafile 4 auxiliary format "/u01/app/oracle/oradata/dbsdb/users01.dbf" ; sql 'alter system archive log current'; } executing Memory Script--- 将主库数据文件进行convert后拷贝到备库 executing command: SET NEWNAME renamed tempfile 1 to /u01/app/oracle/oradata/dbsdb/temp01.dbf in control file executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME Starting backup at 21-JUL-16 using channel ORA_DISK_1 channel ORA_DISK_1: starting datafile copy input datafile file number=00001 name=/u01/app/oracle/oradata/dbpod/system01.dbf output file name=/u01/app/oracle/oradata/dbsdb/system01.dbf tag=TAG20160721T154238 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15 channel ORA_DISK_1: starting datafile copy input datafile file number=00002 name=/u01/app/oracle/oradata/dbpod/sysaux01.dbf output file name=/u01/app/oracle/oradata/dbsdb/sysaux01.dbf tag=TAG20160721T154238 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15 channel ORA_DISK_1: starting datafile copy input datafile file number=00003 name=/u01/app/oracle/oradata/dbpod/undotbs01.dbf output file name=/u01/app/oracle/oradata/dbsdb/undotbs01.dbf tag=TAG20160721T154238 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07 channel ORA_DISK_1: starting datafile copy input datafile file number=00004 name=/u01/app/oracle/oradata/dbpod/users01.dbf output file name=/u01/app/oracle/oradata/dbsdb/users01.dbf tag=TAG20160721T154238 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01 Finished backup at 21-JUL-16 sql statement: alter system archive log current contents of Memory Script: { switch clone datafile all; } executing Memory Script datafile 1 switched to datafile copy input datafile copy RECID=2 STAMP=917797396 file name=/u01/app/oracle/oradata/dbsdb/system01.dbf datafile 2 switched to datafile copy input datafile copy RECID=3 STAMP=917797396 file name=/u01/app/oracle/oradata/dbsdb/sysaux01.dbf datafile 3 switched to datafile copy input datafile copy RECID=4 STAMP=917797396 file name=/u01/app/oracle/oradata/dbsdb/undotbs01.dbf datafile 4 switched to datafile copy input datafile copy RECID=5 STAMP=917797396 file name=/u01/app/oracle/oradata/dbsdb/users01.dbf Finished Duplicate Db at 21-JUL-16 --- duplicate完成后备库处理mount状态 SQL> select status from v$instance; STATUS ------------ MOUNTED --- 主库添加standby redo log SQL> alter database add standby logfile group 4 ('/u01/app/oracle/oradata/dbpod/dbpod_srl01a.log','/u01/app/oracle/fast_recovery_area/dbpod/dbpod_srl01b.log') size 1024M; SQL> alter database add standby logfile group 5 ('/u01/app/oracle/oradata/dbpod/dbpod_srl02a.log','/u01/app/oracle/fast_recovery_area/dbpod/dbpod_srl02b.log') size 1024M; SQL> alter database add standby logfile group 6 ('/u01/app/oracle/oradata/dbpod/dbpod_srl03a.log','/u01/app/oracle/fast_recovery_area/dbpod/dbpod_srl03b.log') size 1024M; SQL> alter database add standby logfile group 7 ('/u01/app/oracle/oradata/dbpod/dbpod_srl04a.log','/u01/app/oracle/fast_recovery_area/dbpod/dbpod_srl04b.log') size 1024M; --- 备库添加standby redo log SQL> alter database add standby logfile group 4 ('/u01/app/oracle/oradata/dbsdb/dbsdb_srl01a.log','/u01/app/oracle/fast_recovery_area/dbsdb/dbsdb_srl01b.log') size 1024M; SQL> alter database add standby logfile group 5 ('/u01/app/oracle/oradata/dbsdb/dbsdb_srl02a.log','/u01/app/oracle/fast_recovery_area/dbsdb/dbsdb_srl02b.log') size 1024M; SQL> alter database add standby logfile group 6 ('/u01/app/oracle/oradata/dbsdb/dbsdb_srl03a.log','/u01/app/oracle/fast_recovery_area/dbsdb/dbsdb_srl03b.log') size 1024M; SQL> alter database add standby logfile group 7 ('/u01/app/oracle/oradata/dbsdb/dbsdb_srl04a.log','/u01/app/oracle/fast_recovery_area/dbsdb/dbsdb_srl04b.log') size 1024M; --- 备库开始实时应用 SQL> alter database recover managed standby database using current logfile disconnect from session; --- 备库日志应用情况 SQL> select sequence#, first_time, next_time from v$archived_log order by sequence#; SQL> select sequence#,applied from v$archived_log order by sequence#; --- 备库日志应用状态 SQL> select open_mode from v$database; OPEN_MODE -------------------- READ ONLY WITH APPLY
分类目录归档:Database
闰秒对Oracle RAC的影响
1.什么是闰秒
闰秒是在协调世界时(UTC中增加或减少一秒,使它与平太阳时贴近所做调整。UTC,是透过广播作为民用时的官方时间基础,它使用非常精确的原子钟来维护。要保持UTC与平太阳时的一致性,偶尔需要调整,也就是“跳个”1秒来做调整,就是所谓添加闰秒。闰秒时间现在是由国际地球自转和参考作坐标系统服务(IERS)来确认,而在1988年1月1日之前是由国际时间局(BIH)承担这项职责。
当要增加正闰秒时,这一秒是增加在第二天的00:00:00之前,效果是延缓UTC第二天的开始。当天23:59:59的下一秒被记为23:59:60,然后才是第二天的00:00:00。如果是负闰秒的话,23:59:58的下一秒就是第二天的00:00:00了,但目前还没有负闰秒调整的需求。需要时的日长度必须低于1750-1892年的平均日长度,才会累积足够调整1秒所需要的时间。除了每天4毫秒的波动外,日长度自1700年以来都保持一样[1]。然而,从历史上的日食观测则显示,自公元前700年以来,每个世纪的日长度大约增加1.7毫秒[2]。(来自维基百科)
2.闰秒的出现时间
3.闰秒的影响
从当前所了解的参考资料信息来看,闰秒主要会对Linux和Solaris平台系统存在影响,其主要影响是因为使用NTP的缘故,可能会导致OS CPU使用率100%。对于Oracle Database影响,则主要可能会导致RAC节点重启,EM OMS或Agent所导致的OS CPU使用100%,以及因为执行与时间戳数据类型相关的SQL而导致的ORA-01852错误。
3.1对于Linux影响
内核版本大于2.6.22的都受影响,详见:
http://www-01.ibm.com/support/docview.wss?uid=swg21602521
主要是可能出现CPU使用100%的情况,详见Leap Second Hang – CPU Can Be Seen at 100% (文档 ID 1472421.1),根据该文档描述,主要影响是Linux 4.4 – Linux 6.2的中间版本。该情况所涉及的OS环境版本范围:
Oracle VM – Version 2.1.1 to 3.1.1 [Release OVM211 to OVM31]
Linux OS – Version Oracle Linux 4.4 to Oracle Linux 6.2 with Unbreakable Enterprise Kernel [2.6.39] [Release OL4U4 to OL6U2]
Information in this document applies to any platform.
当ntpd调用adjtimex(2)告知kernel插入a leap second所导致livelock而引发的bug
解决办法:
# /etc/init.d/ntpd stop
# date -s “`date`” (reset the system clock)
# /etc/init.d/ntpd start
Or Reboot the Server.
3.2对于Solaris影响
影响Solaris 8、9、10等几个版本,最新的Solaris 11不受影响,解决办法与3.1类似,重启NTP或系统。
3.3闰秒对Oracle的影响
1)RAC集群节点重启
该情况所涉及的Oracle环境版本范围:
Oracle Server – Enterprise Edition – Version 10.1.0.2 to 11.1.0.7 [Release 10.1 to 11.1]
Oracle Solaris on SPARC (64-bit)
Oracle Solaris on x86-64 (64-bit)
Sun Solaris SPARC (64-bit)Sun Solaris x86-64 (64-bit)
Oracle Clusterware and patchsets 10.2.0.1 – 11.1.0.7
Sun Solaris 5.8 – 5.10 adjusting time through NTP daemon (xntpd)
解决办法:
(1)对于通用平台OS下NTP都应该使用NTP daemon with -x 参数选项,对于Solaris还要进行如下操作来避免集群node reboot:
Configure xntpd Solaris daemon running on the Oracle Clusterware cluster node to
disable PLL mode and enable slewing
adding to the /etc/inet/ntp.conf file the two lines: 3)Oracle EM agent或OMS过度Linux OS CPU 4.总结 5.参考文档
slewalways yes
disable pll
To restart xntpd the commands are:
Solaris 10: svcadm restart ntp
Solaris 8 and 9: /etc/init.d/xntpd stop ; /etc/init.d/xntpd start
这里还需要注意一点(针对Sun Solaris),如果无法保证NTP server和client时间同步,在重启集群或系统之前一定要先修改ntp.conf文件重启xntpd服务。
2)打Oracle Clusterware patch bundles or a recent MLR (i.e. MLR # 9 or higher) in order to resolve bugs 5015469 and 6022204补丁。针对Sun CR#6595936问题,可以修改cluster oprocd daemon进程的timeout margin>5s解决。
(2)ORA-01852错误
由于闰秒事件导致一分钟>60秒,此时如果恰好在数据库中执行插入带有时间戳的SQL语句时会报ORA-01852错误。
该情况所涉及的Oracle Database环境版本范围:
Oracle Database – Enterprise Edition – Version 8.1.7.4 and later
Oracle Database – Standard Edition – Version 8.1.7.4 and later
Information in this document applies to any platform.
出现该报错的原因是因为Oracle数据库无法存储大于59秒的日期时间戳数据
解决办法:
创建varchar2数据类型表去存储闰秒的时间戳记录:
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
PL/SQL Release 11.2.0.2.0 - Production
CORE 11.2.0.2.0 Production
TNS for Linux: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production
SQL> create table t_630(a number,b timestamp(8));
Table created.
SQL> insert into t_630 values(1,to_timestamp('2015-06-10 12:10:10.1','yyyy-mm-dd hh24:mi:ss.ff'));
1 row created.
A B
---------- ---------------------------------------------------------------------------
1 10-JUN-15 12.10.10.10000000 PM
SQL> insert into t_630 values(2,to_timestamp('2015-06-30 23:59:60','yyyy-mm-dd hh24:mi:ss'));
insert into t_630 values(2,to_timestamp('2015-06-30 23:59:60','yyyy-mm-dd hh24:mi:ss'))
*
ERROR at line 1:
ORA-01852: seconds must be between 0 and 59
对于此问题,Oracle建议使用varchar2数据类型来替代timestamp
SQL> drop table t_630 purge;
Table dropped.
SQL> create table t_630(a number,b varchar2(30));
Table created.
SQL> insert into t_630 values(1,'2015-06-10 12:10:10');
1 row created.
SQL> insert into t_630 values(2,'2015-06-30 23:59:60');
1 row created.
SQL> commit;
Commit complete.
SQL> select * from t_630;
A B
---------- ------------------------------
1 2015-06-10 12:10:10
2 2015-06-30 23:59:60
该情况所涉及的Oracle EM环境版本范围:
Enterprise Manager Base Platform – Version 10.2.0.5 to 10.2.0.5 [Release 10.2]
Enterprise Manager Base Platform – Version 11.1.0.1 to 11.1.0.1 [Release 11.1]
Enterprise Manager Base Platform – Version 12.1.0.1.0 and later
Linux x86
Linux x86-64
该情况在系统层面表现可能如下:
Check top on the system:
$ top – 09:38:24 up 354 days, 5:48, 4 users, load average: 6.49, 6.34, 6.44
Tasks: 296 total, 4 running, 292 sleeping, 0 stopped, 0 zombie
Cpu(s): 97.2%us, 1.8%sy, 0.0%ni, 0.7%id, 0.1%wa, 0.1%hi, 0.2%si, 0.0%st
Mem: 15991M total, 15937M used, 53M free, 107M buffers
Swap: 8110M total, 72M used, 8038M free, 13614M cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
22564 oracle 16 0 1400m 421m 109m S 353 2.6 2225:11 java <<<<<<< Note: Java PID consuming 353% CPU
7294 oracle 17 0 3096m 108m 104m S 22 0.7 0:02.61 oracle
Check for the following message from dmesg:
$ dmesg | grep -i leap
[10703552.860274] Clock: inserting leap second 23:59:60 UTC
解决办法:
该情况的解决办法与3.1类似,重启NTP或是系统。
除了按照上述Oracle建义来应对闰秒事件所造成的结果,同时为了尽可能避免闰秒事件可能导致的影响,最好是在闰秒日调整之前半小时,先将数据库环境下NTP Server和Client时间同步,然后停止服务器NTP,当闰秒调整结束后再开启服务器NTP继续同步。
Leap seconds (extra second in a year) and impact on the Oracle database. (文档 ID 730795.1)
Enterprise Manager Management Agent or OMS CPU Use Is Excessive near Leap Second Additions on Linux (文档 ID 1472651.1)
Leap Second on Oracle SuperCluster (文档 ID 1991954.1)
NTP leap second event causing Oracle Clusterware node reboot (文档 ID 759143.1)
leap seconds in Oracle Linux (文档 ID 2012659.1)
Insert leap seconds into a timestamp column fails with ORA-01852 (文档 ID 1553906.1)
Leap Second Time Adjustment (e.g. on June 30, 2015 at 23:59:59 UTC) and Its Impact on Exadata Database Machine (文档 ID 1986986.1)
ODA (Oracle Database Appliance): Leap Second adjustment impact (文档 ID 2015972.1)
Related questions with leap second on mysql (文档 ID 1450441.1)
http://www-01.ibm.com/support/docview.wss?uid=swg21602521