对于RAC环境而言,调整系统时间不是一件小事情,Oracle为了保证节点之间的一致性,很可能会重启其中一个节点。
测试发现,如果将系统时间向前调整,那么无论调整多长的时间都不会造成系统的重启。但是如果将系统时间向后调整,就会造成整个节点的重启。
即使是关闭数据库,调整时间仍然会重启节点。
正确的方法是首先关闭数据库和CLUSTER环境,然后修改系统时间,为了避免数据库中的时间出现冲突,最好等待当前时间超过修改前的系统时间后,再启动CLUSTER环境和RAC数据库:
# date
Tue Aug 4 17:51:44 CST 2009
# su - oracle
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
You have mail.
$ bash
bash-3.00$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.3.0 - Production on星期二8月4 17:51:59 2009
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
连接到:
Oracle Database10gEnterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
SQL> shutdown immediate
数据库已经关闭。
已经卸载数据库。
ORACLE例程已经关闭。
SQL> exit
从Oracle Database10gEnterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options断开
bash-3.00$ lsnrctl stop
LSNRCTL for Solaris: Version 10.2.0.3.0 - Production on 04-8月-2009 17:54:41
Copyright (c) 1991, 2006, Oracle. All rights reserved.
正在连接到(ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
命令执行成功
bash-3.00$ exit
exit
$ exit
# date
Tue Aug 4 17:54:51 CST 2009
# /etc/init.d/init.crs stop
Shutting down Oracle Cluster Ready Services (CRS):
Aug 4 17:54:57.422 | INF | daemon shutting down
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
Shutdown has begun. The daemons should exit soon.
# date
Tue Aug 4 17:55:02 CST 2009
# date 080417472009.20
Tue Aug 4 17:47:20 CST 2009
# date
Tue Aug 4 17:59:18 CST 2009
# /etc/init.d/init.crs start
Startup will be queued to init within 30 seconds.
# ps -ef|grep ora
oracle 18590 1 0 17:55:01 ? 0:00 sh -c sh -c 'ulimit -c unlimited; cd /opt/oracle/product/10.2/crs/log/ahrac1/ev
oracle 24249 1 0 18:01:03 ? 0:00 oracletradedb1 (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
root 18636 1 0 17:55:01 ? 0:01 /opt/oracle/product/10.2/crs/bin/crsd.bin reboot
oracle 24454 1 0 18:01:09 ? 0:00 ora_q001_tradedb1
oracle 23386 1 0 18:00:34 ? 0:00 ora_pmon_tradedb1
oracle 22101 21913 0 17:59:52 ? 0:00 sh -c /bin/sh -c 'ulimit -c unlimited; cd /opt/oracle/product/10.2/crs/log/ahra
oracle 23445 1 0 18:00:35 ? 0:00 ora_reco_tradedb1
oracle 24450 1 0 18:01:09 ? 0:00 oracletradedb1 (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
oracle 23429 1 1 18:00:34 ? 0:07 ora_lms1_tradedb1
oracle 22104 22101 0 17:59:52 ? 0:00 /bin/sh -c ulimit -c unlimited; cd /opt/oracle/product/10.2/crs/log/ahrac1/cssd
oracle 23435 1 0 18:00:34 ? 0:00 ora_dbw0_tradedb1
oracle 22106 22104 0 17:59:52 ? 0:01 /opt/oracle/product/10.2/crs/bin/ocssd.bin
oracle 22139 18590 0 17:59:53 ? 0:00 /opt/oracle/product/10.2/crs/bin/evmd.bin
oracle 23390 1 0 18:00:34 ? 0:00 ora_psp0_tradedb1
oracle 4764 4762 0 May 27 ? 3:09 /opt/oracle/product/10.2/crs/opmn/bin/ons -d
oracle 4762 1 0 May 27 ? 0:00 /opt/oracle/product/10.2/crs/opmn/bin/ons -d
oracle 22667 1 0 18:00:08 ? 0:00 /opt/oracle/product/10.2/database/bin/tnslsnr LISTENER_AHRAC1 -inherit
oracle 22713 1 0 18:00:10 ? 0:00 /opt/oracle/product/10.2/database/bin/racgimon startd tradedb
oracle 23388 1 0 18:00:34 ? 0:00 ora_diag_tradedb1
oracle 23425 1 1 18:00:34 ? 0:07 ora_lms0_tradedb1
oracle 24446 1 0 18:01:09 ? 0:00 oracletradedb1 (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
oracle 23437 1 0 18:00:34 ? 0:00 ora_dbw1_tradedb1
oracle 24183 1 0 18:01:00 ? 0:00 ora_pz99_tradedb1
oracle 23433 1 2 18:00:34 ? 0:07 ora_mman_tradedb1
oracle 23423 1 0 18:00:34 ? 0:01 ora_lmd0_tradedb1
oracle 23443 1 0 18:00:35 ? 0:01 ora_smon_tradedb1
oracle 23439 1 1 18:00:35 ? 0:01 ora_lgwr_tradedb1
oracle 24448 1 0 18:01:09 ? 0:00 oracletradedb1 (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
oracle 23451 1 0 18:00:35 ? 0:00 ora_mmnl_tradedb1
oracle 23945 1 0 18:00:52 ? 0:00 ora_arc1_tradedb1
oracle 22391 22139 0 18:00:01 ? 0:00 /opt/oracle/product/10.2/crs/bin/evmlogger.bin -o /opt/oracle/product/10.2/crs/
oracle 23447 1 0 18:00:35 ? 0:00 ora_cjq0_tradedb1
oracle 23453 1 0 18:00:35 ? 0:00 ora_d000_tradedb1
oracle 23914 1 0 18:00:51 ? 0:00 ora_arc0_tradedb1
oracle 24094 1 0 18:00:58 ? 0:00 ora_qmnc_tradedb1
oracle 23414 1 1 18:00:34 ? 0:02 ora_lmon_tradedb1
oracle 23441 1 0 18:00:35 ? 0:00 ora_ckpt_tradedb1
oracle 23455 1 0 18:00:35 ? 0:00 ora_s000_tradedb1
root 24513 577 0 18:01:11 pts/1 0:00 grep ora
oracle 23765 1 0 18:00:45 ? 0:01 ora_lck0_tradedb1
root 21963 21912 0 17:59:50 ? 0:00 /opt/oracle/product/10.2/crs/bin/oprocd run -t 1000 -m 500 -f
oracle 24452 1 0 18:01:09 ? 0:00 ora_q000_tradedb1
oracle 23449 1 4 18:00:35 ? 0:08 ora_mmon_tradedb1
检查节点1上alert文件中的信息:
Tue Aug 4 17:52:03 2009
Starting background process EMN0
EMN0 started with pid=72, OS id=13528
Tue Aug 4 17:52:03 2009
Shutting down instance: further logons disabled
Tue Aug 4 17:52:04 2009
Stopping background process QMNC
Tue Aug 4 17:52:04 2009
Stopping background process CJQ0
Tue Aug 4 17:52:06 2009
Stopping background process MMNL
Tue Aug 4 17:52:07 2009
Stopping background process MMON
Tue Aug 4 17:52:08 2009
Shutting down instance (immediate)
License high water mark = 82
Tue Aug 4 17:52:08 2009
Stopping Job queue slave processes
Tue Aug 4 17:52:08 2009
Job queue slave processes stopped
All dispatchers and shared servers shutdown
Tue Aug 4 17:52:18 2009
ALTER DATABASE CLOSE NORMAL
Tue Aug 4 17:52:18 2009
SMON: disabling tx recovery
SMON: disabling cache recovery
Tue Aug 4 17:52:19 2009
Shutting down archive processes
Archiving is disabled
Tue Aug 4 17:52:24 2009
ARCH shutting down
ARC1: Archival stopped
Tue Aug 4 17:52:29 2009
ARCH shutting down
ARC0: Archival stopped
Tue Aug 4 17:52:30 2009
Thread 1 closed at log sequence 3316
Successful close of redo thread 1
Tue Aug 4 17:52:41 2009
Completed: ALTER DATABASE CLOSE NORMAL
Tue Aug 4 17:52:41 2009
ALTER DATABASE DISMOUNT
Completed: ALTER DATABASE DISMOUNT
ARCH: Archival disabled due to shutdown: 1089
Shutting down archive processes
Archiving is disabled
Archive process shutdown avoided: 0 active
ARCH: Archival disabled due to shutdown: 1089
Shutting down archive processes
Archiving is disabled
Archive process shutdown avoided: 0 active
Tue Aug 4 17:52:46 2009
freeing rdom 0
Tue Aug 4 18:00:12 2009
Starting ORACLE instance (normal)
Tue Aug 4 18:00:32 2009
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Interface type 1 ce1 10.0.0.0 configured from OCR for use as a cluster interconnect
Interface type 1 ce0 172.0.2.0 configured from OCR for use as a public interface
Picked latch-free SCN scheme 3
Autotune of undo retention is turned on.
LICENSE_MAX_USERS = 0
SYS auditing is disabled
ksdpec: called for event 13740 prior to event group initialization
Starting up ORACLE RDBMS Version: 10.2.0.3.0.
System parameters with non-default values:
processes = 300
sessions = 335
__shared_pool_size = 7532969984
__large_pool_size = 16777216
__java_pool_size = 16777216
__streams_pool_size = 50331648
streams_pool_size = 50331648
spfile = /dev/vx/rdsk/datadg/tradedb_spfile
nls_language = AMERICAN
nls_territory = AMERICA
sga_target = 21474836480
control_files = /dev/vx/rdsk/datadg/tradedb_control1, /dev/vx/rdsk/datadg/tradedb_control2, /dev/vx/rdsk/datadg/tradedb_control3
db_block_size = 16384
__db_cache_size = 13841203200
compatible = 10.2.0.1.0
log_archive_dest_1 = LOCATION=/data/oradata/tradedb/archivelog1
standby_archive_dest = /data/oradata/tradedb/archivelog1
log_archive_local_first = FALSE
log_archive_format = %t_%s_%r.dbf
db_file_multiblock_read_count= 16
cluster_database = TRUE
cluster_database_instances= 2
thread = 1
instance_number = 1
undo_management = AUTO
undo_tablespace = UNDOTBS1
undo_retention = 10800
remote_login_passwordfile= EXCLUSIVE
db_domain = us.oracle.com
global_names = TRUE
dispatchers = (PROTOCOL=TCP) (SERVICE=tradedbXDB)
local_listener = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.0.2.13)(PORT = 1521))
remote_listener = LISTENERS_TRADEDB
job_queue_processes = 50
background_dump_dest = /opt/oracle/admin/tradedb/bdump
user_dump_dest = /opt/oracle/admin/tradedb/udump
core_dump_dest = /opt/oracle/admin/tradedb/cdump
audit_file_dest = /opt/oracle/admin/tradedb/adump
session_max_open_files = 20
db_name = tradedb
open_cursors = 5000
pga_aggregate_target = 4395630592
Cluster communication is configured to use the following interface(s) for this instance
10.0.0.1
Tue Aug 4 18:00:33 2009
cluster interconnect IPC version:Oracle UDP/IP (generic)
IPC Vendor 1 proto 2
PMON started with pid=2, OS id=23386
DIAG started with pid=4, OS id=23388
PSP0 started with pid=6, OS id=23390
LMON started with pid=8, OS id=23414
LMD0 started with pid=10, OS id=23423
LMS0 started with pid=12, OS id=23425
LMS1 started with pid=3, OS id=23429
MMAN started with pid=14, OS id=23433
DBW0 started with pid=16, OS id=23435
DBW1 started with pid=5, OS id=23437
LGWR started with pid=7, OS id=23439
CKPT started with pid=18, OS id=23441
SMON started with pid=20, OS id=23443
RECO started with pid=22, OS id=23445
CJQ0 started with pid=24, OS id=23447
MMON started with pid=26, OS id=23449
Tue Aug 4 18:00:34 2009
starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
MMNL started with pid=28, OS id=23451
Tue Aug 4 18:00:34 2009
starting up 1 shared server(s) ...
Tue Aug 4 18:00:35 2009
lmon registered with NM - instance id 1 (internal mem no 0)
Tue Aug 4 18:00:39 2009
Reconfiguration started (old inc 0, new inc 8)
List of nodes:
0 1
Global Resource Directory frozen
* allocate domain 0, invalid = TRUE
Communication channels reestablished
* domain 0 valid according to instance 1
* domain 0 valid = 1 according to instance 1
Tue Aug 4 18:00:39 2009
Master broadcasted resource hash value bitmaps
Non-local Process blocks cleaned out
Tue Aug 4 18:00:39 2009
LMS 0: 0 GCS shadows cancelled, 0 closed
Tue Aug 4 18:00:39 2009
LMS 1: 0 GCS shadows cancelled, 0 closed
Set master node info
Submitted all remote-enqueue requests
Dwn-cvts replayed, VALBLKs dubious
All grantable enqueues granted
Tue Aug 4 18:00:40 2009
LMS 0: 0 GCS shadows traversed, 0 replayed
Tue Aug 4 18:00:40 2009
LMS 1: 0 GCS shadows traversed, 0 replayed
Tue Aug 4 18:00:40 2009
Submitted all GCS remote-cache requests
Post SMON to start 1st pass IR
Fix write in gcs resources
Reconfiguration complete
LCK0 started with pid=34, OS id=23765
Tue Aug 4 18:00:46 2009
ALTER DATABASE MOUNT
Tue Aug 4 18:00:50 2009
Setting recovery target incarnation to 1
Tue Aug 4 18:00:50 2009
Successful mount of redo thread 1, with mount id 4249192057
Tue Aug 4 18:00:50 2009
Database mounted in Shared Mode (CLUSTER_DATABASE=TRUE)
Completed: ALTER DATABASE MOUNT
Tue Aug 4 18:00:50 2009
ALTER DATABASE OPEN
Tue Aug 4 18:00:50 2009
Picked broadcast on commit scheme to generate SCNs
Tue Aug 4 18:00:51 2009
LGWR: STARTING ARCH PROCESSES
ARC0 started with pid=38, OS id=23914
Tue Aug 4 18:00:51 2009
ARC0: Archival started
ARC1: Archival started
LGWR: STARTING ARCH PROCESSES COMPLETE
ARC1 started with pid=9, OS id=23945
Tue Aug 4 18:00:52 2009
Thread 1 opened at log sequence 3316
Current log# 4 seq# 3316 mem# 0: /dev/vx/rdsk/datadg/tradedb_redo1_4_1_1g
Current log# 4 seq# 3316 mem# 1: /dev/vx/rdsk/datadg/tradedb_redo1_4_2_1g
Successful open of redo thread 1
Tue Aug 4 18:00:52 2009
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
Tue Aug 4 18:00:52 2009
ARC1: Becoming the 'no FAL' ARCH
ARC1: Becoming the 'no SRL' ARCH
Tue Aug 4 18:00:52 2009
ARC0: Becoming the heartbeat ARCH
Tue Aug 4 18:00:52 2009
SMON: enabling cache recovery
Tue Aug 4 18:00:56 2009
Successfully onlined Undo Tablespace 1.
Tue Aug 4 18:00:56 2009
SMON: enabling tx recovery
Tue Aug 4 18:00:56 2009
Database Characterset is ZHS16GBK
replication_dependency_tracking turned off (no async multimaster replication found)
Starting background process QMNC
QMNC started with pid=40, OS id=24094
Tue Aug 4 18:01:00 2009
Completed: ALTER DATABASE OPEN
采用这种方式系统不会重启:
SQL> select sysdate from dual;
SYSDATE
-------------------
2009-08-04 17:43:16
SQL> select instance_name, startup_time from gv$instance;
INSTANCE_NAME STARTUP_TIME
---------------- -------------------
testrac2 2009-05-22 18:04:16
testrac3 2009-08-04 17:28:55
(以上内容摘于网络,如有侵权,请告之,将第一时间删除)
总机:(010)-88589926,88589826,88587026 QQ讨论群:243729577 182441349 邮箱:cuug_bj@cuug.com
通信地址:北京市海淀区紫竹院路98号北京化工大学科技园609室(CUUG)邮政编码:100089
中国UNIX用户协会 Copyright 2010 ALL Rights Reserved 北京神脑资讯技术有限公司
京ICP备11008061号 京公网安备110108006275号