ORA-00205: error in identifying control file, check alert log for more info
上周在给一套11g RAC打210420补丁的时候,第一个节点使用
opatch auto
成功升级了GI PSU,但是给DB PSU升级补丁的时候失败(数据库之前补丁版本为19年第一季度),日志也没有检查出来什么,遂进入补丁32328626
目录执行opatch apply
手动升级PSU。
升级成功后启动数据库报错:ORA-00205: error in identifying control file, check alert log for more info
原因:$ORACLE_HOME/bin/oracle
文件属主权限问题
解决:
chown oracle:asmadmin $ORACLE_HOME/bin/oracle
chmod 6751 $ORACLE_HOME/bin/oracle
#有时候执行第一次文件权限还是有问题,在执行一次
具体处理操作如下:
1、启动数据库
SQL> startup
ORACLE instance started.
Total System Global Area 5.1310E+10 bytes
Fixed Size 2265224 bytes
Variable Size 6308237176 bytes
Database Buffers 4.4829E+10 bytes
Redo Buffers 170287104 bytes
ORA-00205: error in identifying control file, check alert log for more info
#识别控制文件错误,检查告警日志或查看更多
SQL>
2、查看数据库alter日志
$ cd $ORACLE_BASE/diag/rdbms/<database_name>/<instance_name>/trace
$ tail -500 alert_instance_name.log
#日志部分内容如下:
...
Thu May 27 19:02:55 2021
LCK0 started with pid=30, OS id=10943
Thu May 27 19:02:55 2021
Starting background process RSMN
Thu May 27 19:02:55 2021
RSMN started with pid=31, OS id=10948
ORACLE_BASE from environment = /u01/app/oracle
Thu May 27 19:02:55 2021
ALTER DATABASE MOUNT
This instance was first to mount
NOTE: Loaded library: System
ORA-15025: could not open disk "/dev/asm-disk01"
ORA-27041: unable to open file
Linux-x86_64 Error: 13: Permission denied
Additional information: 9
ORA-15025: could not open disk "/dev/asm-disk02"
ORA-27041: unable to open file
Linux-x86_64 Error: 13: Permission denied
Additional information: 9
ORA-15025: could not open disk "/dev/asm-disk03"
ORA-27041: unable to open file
Linux-x86_64 Error: 13: Permission denied
Additional information: 9
ORA-15025: could not open disk "/dev/asm-disk04"
ORA-27041: unable to open file
Linux-x86_64 Error: 13: Permission denied
Additional information: 9
SUCCESS: diskgroup DG_DATA was dismounted
ERROR: diskgroup DG_DATA was not mounted
ORA-15025: could not open disk "/dev/asm-disk01"
ORA-27041: unable to open file
Linux-x86_64 Error: 13: Permission denied
Additional information: 9
ORA-15025: could not open disk "/dev/asm-disk02"
ORA-27041: unable to open file
Linux-x86_64 Error: 13: Permission denied
Additional information: 9
ORA-15025: could not open disk "/dev/asm-disk03"
ORA-27041: unable to open file
Linux-x86_64 Error: 13: Permission denied
Additional information: 9
ORA-15025: could not open disk "/dev/asm-disk04"
ORA-27041: unable to open file
Linux-x86_64 Error: 13: Permission denied
Additional information: 9
SUCCESS: diskgroup DG_DATA was dismounted
ERROR: diskgroup DG_DATA was not mounted
ORA-00210: cannot open the specified control file
ORA-00202: control file: '+DG_DATA/dtxydb/controlfile/current.257.1023047957'
ORA-17503: ksfdopn:2 Failed to open file +DG_DATA/dtxydb/controlfile/current.257.1023047957
ORA-15001: diskgroup "DG_DATA" does not exist or is not mounted
ORA-15040: diskgroup is incomplete
ORA-15040: diskgroup is incomplete
ORA-15040: diskgroup is incomplete
ORA-15040: diskgroup is incomplete
ORA-00210: cannot open the specified control file
ORA-00202: control file: '+DG_DATA/dtxydb/controlfile/current.256.1023047957'
ORA-17503: ksfdopn:2 Failed to open file +DG_DATA/dtxydb/controlfile/current.256.1023047957
ORA-15001: diskgroup "DG_DATA" does not exist or is not mounted
ORA-15040: diskgroup is incomplete
ORA-15040: diskgroup is incomplete
ORA-15040: diskgroup is incomplete
ORA-15040: diskgroup is incomplete
ORA-205 signalled during: ALTER DATABASE MOUNT...
Thu May 27 19:02:55 2021
通过告警日志很清楚的看见报错:
ORA-15025: could not open disk "/dev/asm-disk01" #不能打开磁盘
ORA-27041: unable to open file #不能打开文件
Linux-x86_64 Error: 13: Permission denied #权限不足(主要原因)
因为权限不足所以不能打开磁盘文件中的控制文件,导致数据库不能正常启动
ORA-00210: cannot open the specified control file
ORA-00202: control file: '+DG_DATA/dtxydb/controlfile/current.257.1023047957'
ORA-17503: ksfdopn:2 Failed to open file +DG_DATA/dtxydb/controlfile/current.257.1023047957
ORA-15001: diskgroup "DG_DATA" does not exist or is not mounted
经检查共享存储的权限,属组等无任何问题
3、查看ORACLE_HOME/bin/oracle
文件
1、现在是在第一个节点打的补丁,查看$ORACLE_HOME/bin/oracle文件权限
[db1][oracle@db01 /u01/app/11.2.0.4/grid]$ cd $ORACLE_HOME
[db1][oracle@db01 /u01/app/oracle/product/11.2.0.4]$ cd bin
[db1][oracle@db01 /u01/app/oracle/product/11.2.0.4/bin]$ ls -l oracle
-rwsr-s--x 1 oracle oinstall 242841384 May 27 18:52 oracle
[db1][oracle@db01 /u01/app/oracle/product/11.2.0.4/bin]$
2、查看第二个节点$ORACLE_HOME/bin/oracle文件权限
[db2][oracle@db02 /u01/app/oracle/product/11.2.0.4/bin]$ ls -l oracle
-rwsr-s--x 1 oracle asmadmin 242829255 Oct 30 2019 oracle
[db2][oracle@db02 /u01/app/oracle/product/11.2.0.4/bin]$
因为在进入补丁目录手动升级之后,自动更改了$ORACLE_HOME/bin/oracle
文件的属组为oracle:oinstall
,原来的属主应该为oracle:asmadmin
,不是在同一个组中,所以才对asm共享存储没有读取权限,导致数据库不能启动。
4、更改文件属主
[root@db01 /u01/app/oracle/product/11.2.0.4/bin]# chown oracle:asmadmin oracle
[root@db01 /u01/app/oracle/product/11.2.0.4/bin]# ll oracle
-rwxr-x--x 1 oracle asmadmin 243090681 May 27 19:33 oracle
虽然更改了属主,但是文件权限并没有使用suid,进行suid授权
[root@db01 /u01/app/oracle/product/11.2.0.4/bin]# chmod 6751 oracle
[root@db01 /u01/app/oracle/product/11.2.0.4/bin]# ll oracle
-rwsr-s--x 1 oracle asmadmin 243090681 May 27 19:33 oracle
此时$ORACLE_HOME/bin/oracle
文件与第二个节点oracle文件权限属主一致
5、启动数据库
SQL> startup
ORACLE instance started.
Total System Global Area 5.1310E+10 bytes
Fixed Size 2265224 bytes
Variable Size 6308237176 bytes
Database Buffers 4.4829E+10 bytes
Redo Buffers 170287104 bytes
Database mounted.
Database opened.
SQL>
数据库启动成功!
至此结束,有什么问题欢迎留言,谢谢。