操作系统为suse11sp3_x86_64位,数据库为11204。
不小心修改了RAC目录及子目录的权限,资源启动后发现两个节点数据库都未启动,如下:
jason1:/u01/app/11.2.0/grid/bin # ./crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE jason1
ONLINE ONLINE jason2
ora.FRA.dg
ONLINE ONLINE jason1
ONLINE ONLINE jason2
ora.LISTENER.lsnr
ONLINE ONLINE jason1
ONLINE ONLINE jason2
ora.OCR.dg
ONLINE ONLINE jason1
ONLINE ONLINE jason2
ora.asm
ONLINE ONLINE jason1 Started
ONLINE ONLINE jason2 Started
ora.gsd
OFFLINE OFFLINE jason1
OFFLINE OFFLINE jason2
ora.net1.network
ONLINE ONLINE jason1
ONLINE ONLINE jason2
ora.ons
ONLINE ONLINE jason1
ONLINE ONLINE jason2
ora.registry.acfs
ONLINE ONLINE jason1
ONLINE ONLINE jason2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE jason1
ora.cvu
1 ONLINE ONLINE jason1
ora.jason1.vip
1 ONLINE ONLINE jason1
ora.jason2.vip
1 ONLINE ONLINE jason2
ora.oc4j
1 ONLINE ONLINE jason1
ora.oracle.db
1 ONLINE OFFLINE Instance Shutdown
2 ONLINE OFFLINE Instance Shutdown
ora.scan1.vip
1 ONLINE ONLINE jason1
jason1:/u01/app/11.2.0/grid/bin #
发现只有数据库没有打开,于是尝试在各节点尝试打开数据库,报错如下:
oracle@jason1:/u01/app/oracle/product/11.2.0/dbhome_1/bin> sqlplus /nolog
SQL*Plus: Release 11.2.0.4.0 Production on Wed Jan 20 11:48:33 2016
Copyright (c) 1982, 2013, Oracle. All rights reserved.
SQL> conn /as sysdba
Connected to an idle instance.
SQL> startup
ORA-01078: failure in processing system parameters
ORA-01565: error in identifying file '+DATA/ORACLE/spfileORACLE.ora'
ORA-17503: ksfdopn:2 Failed to open file +DATA/ORACLE/spfileORACLE.ora
ORA-12547: TNS:lost contact
SQL> exit
Disconnected
oracle@jason1
查看grid用户下/u01/app/11.2.0/grid/bin/oracle文件权限变为-rwxr-x--x,其正常权限应为-rwsr-s--x(6751)
jason1:/u01/app/11.2.0/grid/bin # ll oracle
-rwxr-x--x 1 grid oinstall 210439832 Jan 7 21:38 oracle
修改/u01/app/11.2.0/grid/bin/oracle文件权限
jason1:/u01/app/11.2.0/grid/bin # chmod 6751 oracle
jason1:/u01/app/11.2.0/grid/bin # ll oracle
-rwsr-s--x 1 grid oinstall 210439832 Jan 7 21:38 oracle
jason1:/u01/app/11.2.0/grid/bin #
查看oracle用户下/u01/app/oracle/product/11.2.0/dbhome_1/bin/oracle文件权限,权限正常。
oracle@jason1:/u01/app/oracle/product/11.2.0/dbhome_1/bin> ll oracle
-rwxr-s--x 1 oracle asmadmin 240294882 Jan 7 22:40 oracle
oracle用户启动sqlplus启动数据库。
oracle@jason1:/u01/app/oracle/product/11.2.0/dbhome_1/bin> sqlplus /nolog
SQL*Plus: Release 11.2.0.4.0 Production on Wed Jan 20 11:52:05 2016
Copyright (c) 1982, 2013, Oracle. All rights reserved.
SQL> conn /as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 780824576 bytes
Fixed Size 2257312 bytes
Variable Size 545263200 bytes
Database Buffers 230686720 bytes
Redo Buffers 2617344 bytes
Database mounted.
Database opened.
SQL>
正常启动数据库后,再看通过集群命令查看资源状态,显示jason1节点数据库已open,jason2还未打开。
jason1:/u01/app/11.2.0/grid/bin # ./crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE jason1
ONLINE ONLINE jason2
ora.FRA.dg
ONLINE ONLINE jason1
ONLINE ONLINE jason2
ora.LISTENER.lsnr
ONLINE ONLINE jason1
ONLINE ONLINE jason2
ora.OCR.dg
ONLINE ONLINE jason1
ONLINE ONLINE jason2
ora.asm
ONLINE ONLINE jason1 Started
ONLINE ONLINE jason2 Started
ora.gsd
OFFLINE OFFLINE jason1
OFFLINE OFFLINE jason2
ora.net1.network
ONLINE ONLINE jason1
ONLINE ONLINE jason2
ora.ons
ONLINE ONLINE jason1
ONLINE ONLINE jason2
ora.registry.acfs
ONLINE ONLINE jason1
ONLINE ONLINE jason2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE jason1
ora.cvu
1 ONLINE ONLINE jason1
ora.jason1.vip
1 ONLINE ONLINE jason1
ora.jason2.vip
1 ONLINE ONLINE jason2
ora.oc4j
1 ONLINE ONLINE jason1
ora.oracle.db
1 ONLINE ONLINE jason1 Open
2 ONLINE OFFLINE Instance Shutdown
ora.scan1.vip
1 ONLINE ONLINE jason1
jason1:/u01/app/11.2.0/grid/bin #
切换至jason2节点查看文件权限是否正常,并做以修改。
grid用户:
jason2:/u01/app/11.2.0/grid/bin # ll oracle
-rwxr-x--x 1 grid oinstall 210439832 Jan 7 21:38 oracle
jason2:/u01/app/11.2.0/grid/bin # chmod 6751 oracle
jason2:/u01/app/11.2.0/grid/bin # ll oracle
-rwsr-s--x 1 grid oinstall 210439832 Jan 7 21:38 oracle
oracle用户:
jason2:/u01/app/oracle/product/11.2.0/dbhome_1/bin # ll oracle
-rwxr-s--x 1 oracle asmadmin 240294882 Jan 7 22:48 oracle
jason2:/u01/app/oracle/product/11.2.0/dbhome_1/bin # su - oracle
oracle@jason2:~> sqlplus /nolog
SQL*Plus: Release 11.2.0.4.0 Production on Wed Jan 20 11:58:07 2016
Copyright (c) 1982, 2013, Oracle. All rights reserved.
SQL> conn /as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 780824576 bytes
Fixed Size 2257312 bytes
Variable Size 574623328 bytes
Database Buffers 201326592 bytes
Redo Buffers 2617344 bytes
Database mounted.
Database opened.
SQL>
jason2节点数据库打开后,再次查看资源状态,两节点数据库均已打开。
jason1:/u01/app/11.2.0/grid/bin # ./crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE jason1
ONLINE ONLINE jason2
ora.FRA.dg
ONLINE ONLINE jason1
ONLINE ONLINE jason2
ora.LISTENER.lsnr
ONLINE ONLINE jason1
ONLINE ONLINE jason2
ora.OCR.dg
ONLINE ONLINE jason1
ONLINE ONLINE jason2
ora.asm
ONLINE ONLINE jason1 Started
ONLINE ONLINE jason2 Started
ora.gsd
OFFLINE OFFLINE jason1
OFFLINE OFFLINE jason2
ora.net1.network
ONLINE ONLINE jason1
ONLINE ONLINE jason2
ora.ons
ONLINE ONLINE jason1
ONLINE ONLINE jason2
ora.registry.acfs
ONLINE ONLINE jason1
ONLINE ONLINE jason2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE jason1
ora.cvu
1 ONLINE ONLINE jason1
ora.jason1.vip
1 ONLINE ONLINE jason1
ora.jason2.vip
1 ONLINE ONLINE jason2
ora.oc4j
1 ONLINE ONLINE jason1
ora.oracle.db
1 ONLINE ONLINE jason1 Open
2 ONLINE ONLINE jason2 Open
ora.scan1.vip
1 ONLINE ONLINE jason1
jason1:/u01/app/11.2.0/grid/bin #
参考链接:修改了目录权限u01后crs不能启动的解决方法