当前位置:Gxlcms > mysql > OracleRAC11.2(12C)正确关闭顺序

OracleRAC11.2(12C)正确关闭顺序

时间:2021-07-01 10:21:17 帮助过:53人阅读

在11.2后的版本中crs被称为gi,通过crsctl stop cluster来关闭整个实例的资源非常方便,但是对于数据库实例需要单独关闭,stop cl

在11.2后的版本中crs被称为gi,通过crsctl stop cluster来关闭整个实例的资源非常方便,,但是对于数据库实例需要单独关闭,stop cluster对于实例直接以非正常的方式结束,环境是基于12C的。

正确的顺序:

先关闭数据库

[Oracle@rac1 ~]$ srvctl stop database -db tt

alert.log显示是通过immediate方式关闭.

Sat Apr 19 05:12:19 2014
Shutting down instance (immediate)
Stopping background process SMCO
Shutting down instance: further logons disabled
Stopping background process CJQ0
Sat Apr 19 05:12:28 2014
Killed process oracle@rac1 (QM05) with pid is 58, OS pid 26310
Stopping background process MMNL
Stopping background process MMON
License high water mark = 8
All dispatchers and shared servers shutdown
ALTER DATABASE CLOSE NORMAL /* db agent *//* {1:28512:1593} */
Sat Apr 19 05:12:33 2014
SMON: disabling tx recovery
Sat Apr 19 05:12:33 2014


确认一下配置oracle实例是不是immediate方式来关闭的。

[oracle@rac1 ~]$ srvctl config database -db tt
Database unique name: tt
Database name: tt
Oracle home: /u01/app/oracle/product/12.1.0.0/db_1
Oracle user: oracle
Spfile: +DATA/tt/spfilett.ora
Password file: +DATA/tt/orapwtt
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: tt
Database instances: tt1,tt2
Disk Groups: DATA
Mount point paths:
Services:
Type: RAC
Start concurrency:
Stop concurrency:
Database is administrator managed
[oracle@rac1 ~]$

错误的方法:

为图省事,直接关闭整个cluster

[root@rac1 ~]# crsctl stop cluster -all

CRS-2673: Attempting to stop 'ora.crsd' on 'rac1'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'rac1'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'rac1'
CRS-2673: Attempting to stop 'ora.OCR1.dg' on 'rac1'
CRS-2673: Attempting to stop 'ora.tt.db' on 'rac1'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'rac1'
CRS-2673: Attempting to stop 'ora.cvu' on 'rac1'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.rac1.vip' on 'rac1'
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'rac1'
CRS-2677: Stop of 'ora.cvu' on 'rac1' succeeded
CRS-2677: Stop of 'ora.tt.db' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'rac1'
CRS-2677: Stop of 'ora.rac1.vip' on 'rac1' succeeded
CRS-2677: Stop of 'ora.scan1.vip' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.crsd' on 'rac2'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'rac2'
CRS-2673: Attempting to stop 'ora.tt.db' on 'rac2'
CRS-2673: Attempting to stop 'ora.OCR1.dg' on 'rac2'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'rac2'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'rac2' succeeded
CRS-2673: Attempting to stop 'ora.rac2.vip' on 'rac2'
CRS-2677: Stop of 'ora.rac2.vip' on 'rac2' succeeded
CRS-2677: Stop of 'ora.DATA.dg' on 'rac1' succeeded
CRS-2677: Stop of 'ora.tt.db' on 'rac2' succeeded
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'rac2'
CRS-2677: Stop of 'ora.DATA.dg' on 'rac2' succeeded

..............................

alert.log显示实例是非常结束

License high water mark = 6
Sat Apr 19 05:15:14 2014
USER (ospid: 5792): terminating the instance
Sat Apr 19 05:15:14 2014
opiodr aborting process unknown ospid (3667) as a result of ORA-1092
Sat Apr 19 05:15:15 2014
Instance terminated by USER, pid = 5792

由此可以看出通过stop cluster来关闭实例会非常危险,直接是以非正常的方式来关闭实例的.

重启实例可以看到恢复操作

Sat Apr 19 05:31:20 2014
Beginning crash recovery of 1 threads
parallel recovery started with 2 processes
Sat Apr 19 05:31:21 2014
Started redo scan
Sat Apr 19 05:31:21 2014
Completed redo scan
read 255 KB redo, 69 data blocks need recovery
Sat Apr 19 05:31:21 2014
Started redo application at
Thread 2: logseq 2, block 3004
Sat Apr 19 05:31:22 2014
Recovery of Online Redo Log: Thread 2 Group 4 Seq 2 Reading mem 0
Mem# 0: +DATA/tt/redo04.log
Sat Apr 19 05:31:22 2014
Completed redo application of 0.14MB
Sat Apr 19 05:31:22 2014
Completed crash recovery at
Thread 2: logseq 2, block 3514, scn 1969283
69 data blocks read, 69 data blocks written, 255 redo k-bytes read

推荐阅读:

CentOS 6.3(x32)下安装Oracle 10g R2

Linux-6-64下安装Oracle 12C笔记

本文永久更新链接地址:

linux

人气教程排行