设为首页 收藏本站
查看: 741|回复: 0

[经验分享] oracle RAC环境调整系统时间

[复制链接]

尚未签到

发表于 2018-9-22 10:57:10 | 显示全部楼层 |阅读模式
  对于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:>  Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.
  连接到:

  Oracle Database10gEnterprise Edition>  With the Partitioning, Real Application Clusters, OLAP and Data Mining options
  SQL> shutdown immediate
  数据库已经关闭。
  已经卸载数据库。
  ORACLE例程已经关闭。
  SQL> exit

  从Oracle Database10gEnterprise Edition>  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>  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:>  Tue Aug  4 17:52:41 2009
  ALTER DATABASE DISMOUNT

  Completed:>  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>
  DIAG started with pid=4, OS>
  PSP0 started with pid=6, OS>
  LMON started with pid=8, OS>
  LMD0 started with pid=10, OS>
  LMS0 started with pid=12, OS>
  LMS1 started with pid=3, OS>
  MMAN started with pid=14, OS>
  DBW0 started with pid=16, OS>
  DBW1 started with pid=5, OS>
  LGWR started with pid=7, OS>
  CKPT started with pid=18, OS>
  SMON started with pid=20, OS>
  RECO started with pid=22, OS>
  CJQ0 started with pid=24, OS>
  MMON started with pid=26, OS>  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>  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>  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>  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>  Tue Aug  4 18:00:50 2009
  Database mounted in Shared Mode (CLUSTER_DATABASE=TRUE)

  Completed:>  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>  Tue Aug  4 18:00:51 2009
  ARC0: Archival started
  ARC1: Archival started
  LGWR: STARTING ARCH PROCESSES COMPLETE

  ARC1 started with pid=9, OS>  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>  Tue Aug  4 18:01:00 2009

  Completed:>  采用这种方式系统不会重启:
  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
  oracle视频教程请关注:http://u.youku.com/user_video/id_UMzAzMjkxMjE2.html


运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.iyunv.com/thread-599844-1-1.html 上篇帖子: Oracle:OracleServiceORCL服务不见了啊 下篇帖子: 部署Oracle 11.2.0.3 RAC (二)
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表