天天看點

ORA-00205

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][[email protected] /u01/app/11.2.0.4/grid]$ cd $ORACLE_HOME
[db1][[email protected] /u01/app/oracle/product/11.2.0.4]$ cd bin
[db1][[email protected] /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][[email protected] /u01/app/oracle/product/11.2.0.4/bin]$      

2、檢視第二個節點$ORACLE_HOME/bin/oracle檔案權限
[db2][[email protected] /u01/app/oracle/product/11.2.0.4/bin]$ ls -l oracle
-rwsr-s--x 1 oracle asmadmin 242829255 Oct 30  2019 oracle
[db2][[email protected] /u01/app/oracle/product/11.2.0.4/bin]$ 
           

因為在進入更新檔目錄手動更新之後,自動更改了

$ORACLE_HOME/bin/oracle

檔案的屬組為

oracle:oinstall

,原來的屬主應該為

oracle:asmadmin

,不是在同一個組中,是以才對asm共享存儲沒有讀取權限,導緻資料庫不能啟動。

4、更改檔案屬主

[[email protected] /u01/app/oracle/product/11.2.0.4/bin]# chown oracle:asmadmin oracle                     
[[email protected] /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授權

[[email protected] /u01/app/oracle/product/11.2.0.4/bin]# chmod 6751 oracle
[[email protected] /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>
           

資料庫啟動成功!

至此結束,有什麼問題歡迎留言,謝謝。