rac11g错误:ORA-15097: cannot SHUTDOWN ASM instance with connected client

背景:

想停rac环境,之前10g都是用crs_stop -all 来停止,所以,这次也这样做的,没想到报了如下错误:

[grid@rac2 ~]$ crs_stop -all
CRS-2500: Cannot stop resource 'ora.gsd' as it is not running
CRS-2500: Cannot stop resource 'ora.oc4j' as it is not running
Attempting to stop `ora.ons` on member `rac2`
Attempting to stop `ora.LISTENER.lsnr` on member `rac2`
Attempting to stop `ora.eons` on member `rac2`
CRS-2789: Cannot stop resource 'ora.gsd' as it is not running on server 'rac2'
Attempting to stop `ora.eons` on member `rac1`
Attempting to stop `ora.LISTENER.lsnr` on member `rac1`
Attempting to stop `ora.DATA.dg` on member `rac2`
Attempting to stop `ora.FRA.dg` on member `rac2`
Attempting to stop `ora.OCR_VOTE.dg` on member `rac2`
Attempting to stop `ora.registry.acfs` on member `rac2`
Attempting to stop `ora.test.db` on member `rac2`
CRS-2789: Cannot stop resource 'ora.gsd' as it is not running on server 'rac1'
Attempting to stop `ora.DATA.dg` on member `rac1`
Attempting to stop `ora.FRA.dg` on member `rac1`
Attempting to stop `ora.OCR_VOTE.dg` on member `rac1`
Attempting to stop `ora.registry.acfs` on member `rac1`
Attempting to stop `ora.test.db` on member `rac1`
Stop of `ora.LISTENER.lsnr` on member `rac2` succeeded.
CRS-2789: Cannot stop resource 'ora.LISTENER.lsnr' as it is not running on server 'rac2'
Attempting to stop `ora.rac2.vip` on member `rac2`
Stop of `ora.rac2.vip` on member `rac2` succeeded.
Stop of `ora.ons` on member `rac2` succeeded.
CRS-2789: Cannot stop resource 'ora.ons' as it is not running on server 'rac2'
Attempting to stop `ora.net1.network` on member `rac2`
Stop of `ora.net1.network` on member `rac2` succeeded.
Stop of `ora.LISTENER.lsnr` on member `rac1` succeeded.
Attempting to stop `ora.ons` on member `rac1`
Attempting to stop `ora.rac1.vip` on member `rac1`
Attempting to stop `ora.LISTENER_SCAN1.lsnr` on member `rac1`
Stop of `ora.registry.acfs` on member `rac2` succeeded.
Stop of `ora.rac1.vip` on member `rac1` succeeded.
Stop of `ora.LISTENER_SCAN1.lsnr` on member `rac1` succeeded.
Attempting to stop `ora.scan1.vip` on member `rac1`
Stop of `ora.scan1.vip` on member `rac1` succeeded.
Stop of `ora.ons` on member `rac1` succeeded.
CRS-2789: Cannot stop resource 'ora.ons' as it is not running on server 'rac1'
Attempting to stop `ora.net1.network` on member `rac1`
Stop of `ora.net1.network` on member `rac1` succeeded.
Stop of `ora.registry.acfs` on member `rac1` succeeded.
Stop of `ora.eons` on member `rac2` succeeded.
Stop of `ora.OCR_VOTE.dg` on member `rac1` succeeded.
Stop of `ora.eons` on member `rac1` succeeded.
Stop of `ora.test.db` on member `rac2` succeeded.
Stop of `ora.OCR_VOTE.dg` on member `rac2` succeeded.
Stop of `ora.test.db` on member `rac1` succeeded.
CRS-0216: Could not stop resource 'ora.LISTENER.lsnr rac2 1'.

CRS-0216: Could not stop resource 'ora.asm rac1 1'.
CRS-0216: Could not stop resource 'ora.asm rac2 1'.
CRS-0216: Could not stop resource 'ora.gsd'.
CRS-0216: Could not stop resource 'ora.gsd rac1 1'.
CRS-0216: Could not stop resource 'ora.gsd rac2 1'.
CRS-0216: Could not stop resource 'ora.oc4j'.
CRS-0216: Could not stop resource 'ora.ons rac1 1'.
CRS-0216: Could not stop resource 'ora.ons rac2 1'.

以上这些进程都没有被关闭,现在看下就跟下面这样了:

[grid@rac2 bin]$ crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora.DATA.dg    ora....up.type OFFLINE   OFFLINE               
ora.FRA.dg     ora....up.type OFFLINE   OFFLINE               
ora....ER.lsnr ora....er.type OFFLINE   OFFLINE               
ora....N1.lsnr ora....er.type OFFLINE   OFFLINE               
ora....VOTE.dg ora....up.type OFFLINE   OFFLINE               
ora.asm        ora.asm.type   OFFLINE   ONLINE    rac2        
ora.eons       ora.eons.type  OFFLINE   OFFLINE               
ora.gsd        ora.gsd.type   OFFLINE   OFFLINE               
ora....network ora....rk.type OFFLINE   OFFLINE               
ora.oc4j       ora.oc4j.type  OFFLINE   OFFLINE               
ora.ons        ora.ons.type   OFFLINE   OFFLINE               
ora....SM1.asm application    OFFLINE   ONLINE    rac1        
ora....C1.lsnr application    OFFLINE   OFFLINE               
ora.rac1.gsd   application    OFFLINE   OFFLINE               
ora.rac1.ons   application    OFFLINE   OFFLINE               
ora.rac1.vip   ora....t1.type OFFLINE   OFFLINE               
ora....SM2.asm application    OFFLINE   ONLINE    rac2        
ora....C2.lsnr application    OFFLINE   OFFLINE               
ora.rac2.gsd   application    OFFLINE   OFFLINE               
ora.rac2.ons   application    OFFLINE   OFFLINE               
ora.rac2.vip   ora....t1.type OFFLINE   OFFLINE               
ora....ry.acfs ora....fs.type OFFLINE   OFFLINE               
ora.scan1.vip  ora....ip.type OFFLINE   OFFLINE               
ora.test.db    ora....se.type OFFLINE   OFFLINE  

然后再尝试手工关闭asm:

[grid@rac2 bin]$ srvctl stop asm -n rac1
PRCR-1014 : Failed to stop resource ora.asm
PRCR-1065 : Failed to stop resource ora.asm
CRS-2673: Attempting to stop 'ora.asm' on 'rac1'
ORA-15097: cannot SHUTDOWN ASM instance with connected client
CRS-2675: Stop of 'ora.asm' on 'rac1' failed

CRS-2675: Stop of 'ora.asm' on 'rac1' failed

原因及解决方案:

原来在Oracle 10g 环境下,我们停RAC的顺序是:

       (1)数据库

       (2)ASM

       (3)CRS

 

       但是在Oracle 11gR2下,如果是用OUI来安装的话,除了数据文件之外,OCR 也是放在ASM里的。  所以这里就遇到了问题。 OCR放在ASM里,这样CRSD 就会成为ASM的客户端。 如果我们像Oracle 10g里那样直接停ASM的时候,就会报上面的错误。 所以,在11gR2下面,要停ASM实例的话,只能和CRS一起停。

用以下方法停asm:在root用户下执行:crsctl stop crs

问题就解决了。。。
注意:不要直接kill 掉ASM 进程,或者用shutdown abort 来关闭ASM 实例。 这样CRS 也会被挂掉。

所以,我们之前10g rac停止的步骤,到了srvctl stop asm -n rac1 这一行,就没法执行了。。

srvctl stop instance -d test -i test1 
srvctl stop instance -d test -i test2 
srvctl stop asm -n rac1 
srvctl stop asm -n rac2 
srvctl stop nodeapps -n rac1 
srvctl stop nodeapps -n rac2 

所以,一般11g rac的启动和关闭步骤,要按照下面的顺序进行:

一 关闭rac
1,确认srvctl 和ps -ef|grep smon
[grid@rac1 ~]$ srvctl status database -d RACDB
实例 RACDB1 正在节点 rac1 上运行
实例 RACDB2 正在节点 rac2 上运行
[grid@rac1 ~]$ ps -ef|grep smon
oracle    3676     1  0 06:05 ?        00:00:02 ora_smon_RACDB1
grid     12840     1  0 01:54 ?        00:00:00 asm_smon_+ASM1
grid     27890 27621  0 07:52 pts/3    00:00:00 grep smon

2,将数据库关闭并再次确认
[grid@rac1 ~]$ srvctl stop database -d RACDB
[grid@rac1 ~]$  ps -ef|grep smon

3,使用root 帐号关闭ASM
[grid@rac1 ~]$ su -
口令:
[root@rac1 ~]# cd /home/grid

[root@rac1 grid]# sh .bash_profile
4,使用crs_stat 确认集群各项资源和服务运行状态
[root@rac1 bin]# /u01/app/11.2.0/grid/bin/crs_stat -t -v
5,使用crsctl 指令关闭集群
[root@rac1 bin]# /u01/app/11.2.0/grid/bin/crsctl stop cluster -all
6,使用crs_stat 确认集群各项资源和服务运行状态
[root@rac1 bin]# /u01/app/11.2.0/grid/bin/crs_stat -t -v
[root@rac2 ~]# /u01/app/11.2.0/grid/bin/crs_stat -t -v
CRS-0184: Cannot communicate with the CRS daemon.
 说明顺利关闭

二 。RAC 开启
1,root 执行grid 下面的环境变量 (可以不执行直接到/u01/app/11.2.0/grid/bin/模式下)
2,[root@rac1 ~]# /u01/app/11.2.0/grid/bin/crsctl stop cluster -all
3,开启集群
  [root@rac1 ~]# /u01/app/11.2.0/grid/bin/crsctl start cluster -all
  检查状态
  [root@rac2 ~]# /u01/app/11.2.0/grid/bin/crs_stat -t -v
4,使用srvcel 确认数据库状态

 [root@rac1 ~]# /u01/app/11.2.0/grid/bin/srvctl status database -d RACDB
实例 RACDB1 没有在 rac1 节点上运行
实例 RACDB2 没有在 rac2 节点上运行
5,打开RAC 
[root@rac1 ~]# /u01/app/11.2.0/grid/bin/srvctl start database -d RACDB
 确认状态
[root@rac2 ~]# /u01/app/11.2.0/grid/bin/srvctl status database -d RACDB
实例 RACDB1 正在节点 rac1 上运行
实例 RACDB2 正在节点 rac2 上运行
 
6,打开OEM

[root@rac1 ~]# /u01/app/11.2.0/grid/bin/emctl start  RACDB

时间: 2024-09-14 02:05:53

rac11g错误:ORA-15097: cannot SHUTDOWN ASM instance with connected client的相关文章

【RAC】Diskgroup shows offline after restart even it is mounted in ASM instance

Diskgroup resource shows status offline after restart even it is mounted in ASM instance Applies to: Oracle Server - Enterprise Edition - Version: 11.2.0.1.0 - Release: 11.2 Information in this document applies to any platform. Symptoms After restart

ASMCA fails to create 11.2 ASM instance when upgrading from 10.2 [ID 1125053.1]

ASMCA fails to create 11.2 ASM instance when upgrading from 10.2 [ID 1125053.1]   修改时间 20-DEC-2011     类型 PROBLEM     状态 PUBLISHED   In this Document  Symptoms   Cause   Solution Applies to: Oracle Server - Enterprise Edition - Version: 11.2.0.1.0 to

能够管理ASM instance的三种角色

能够管理ASM instance的角色有三种,他们的分工如下:组描述     OS指定的组      具有的权限    能做的事情OSASM      asmadmin        SYSASM           ASM所有管理工作OSDBA      asmdba           SYSDBA            访问diskgroup上的文件,database instance所在用户必须是此组成员,因为要对数据文件进行操作,注意只有基于数据库层面的操作权限,没有底层diskgro

rac11g错误:远程连接报错:ORA-12545: 因目标主机或对象不存在, 连接失败

描述: 刚搭建起来的rac环境,通过监听连接:sqlplus system/oracle@11grac 发现报了如下错误: ORA-12545: 因目标主机或对象不存在, 连接失败 查看两个节点的tnsnames.ora 信息如下: 11grac =  (DESCRIPTION =    (ADDRESS = (PROTOCOL = TCP)(HOST = rac-scan)(PORT = 1521))    (CONNECT_DATA =      (SERVER = DEDICATED) 

【RAC】关闭Clusterware 遇到CRS-2529,ORA-15097:

需要关闭整个集群,遇到CRS-2529,ORA-15097 错误 ~! grid@rac1:/home/grid/Opatch>srvctl stop asm  -n rac1  -o immediate       PRCR-1014 : 无法停止资源 ora.asm PRCR-1065 : 无法停止资源 ora.asm CRS-2529: 无法对 'ora.asm' 执行操作, 因为这样做需要停止或重新定位 'ora.DATA1.dg', 但未指定强制选项 grid@rac1:/home/g

11g 10g rac 停库方法、步骤

11g 10g rac 停库方法.步骤 停RAC的ASM实例的时候报错: ORA-15097: cannot SHUTDOWN ASM instance with connected client srvctl stop asm -n enode1 -f PRCR-1014 : Failed to stop resource ora.asm PRCR-1065 : Failed to stop resource ora.asm CRS-2673: Attempting to stop 'ora.

ORA-00845 MEMORY_TARGET not supported on this system

ORA-00845: MEMORY_TARGET not supported on this system 我建立虚拟机的时候 选择的是8G的内存,但是检查的时候报错,我只有4G提示 Swap分区不够, 其实是可以使用DD命令解决的.  GG 同步不起. 解决Linux上11g的ORA-00845错误 下午想把一个11.2.0.2实例的memory_target AMM内存初始化参数修改到2000M,改好后重启发现实例起不来了,出现了ORA-00845错误: [oracle@rh2 ~]$ [o

探索ORACLE之ASM概念(完整版)_oracle

一.     ASM(自动存储管理)的来由: ASM是Oracle 10g R2中为了简化Oracle数据库的管理而推出来的一项新功能,这是Oracle自己提供的卷管理器,主要用于替代操作系统所提供的LVM,它不仅支持单实例,同时对RAC的支持也是非常好.ASM可以自动管理磁盘组并提供有效的数据冗余功能.使用ASM(自动存储管理)后,数据库管理员不再需要对ORACLE中成千上万的数据文件进行管理和分类,从而简化了DBA的工作量,可以使得工作效率大大提高. 二.     什么是ASM ASM它提供

AIX平台下磁盘的PVID对ASM磁盘的破坏

    这篇文章将通过两篇MOS文章来讨论AIX平台下为磁盘分配PVID对ASM磁盘的破坏. 文章一:    这篇文章说明的是对一个存在的ASM磁盘分配PVID将破坏ASM的磁盘头,导致ASM磁盘组无法正常MOUNT. Assigning a Physical Volume ID (PVID) To An Existing ASM Disk Corrupts the ASM Disk Header (文档 ID 353761.1)修改时间:2013-4-19类型:ALERT In this Do