ASM路徑問題導致數據庫不能正常啟動 -- 報:ORA-03113: end-of-file on communication channel


環境描述:

操作系統版本:Red Hat Enterprise Linux Server release 6.5 (Santiago)

數據庫版本:Oracle 11.2.0.4 RAC

場景描述:

Oracle RAC環境搭建完成之后,數據庫可以啟動到mounted狀態,無法啟動到open狀態;其他的CRS集群服務、ASM服務狀態正常!!!

處理過程:

[oracle@oracle01 ~]$ sqlplus / as sysdba;

SQL*Plus: Release 11.2.0.4.0 Production on Thu Jun 15 12:48:00 2017
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL> 
SQL> select open_mode from v$database;

OPEN_MODE
--------------------
MOUNTED

SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01154: database busy. Open, close, mount, and dismount not allowed now

++++++++++++++++++++++++++++++++++++++++++

再次嘗試:

SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01154: database busy. Open, close, mount, and dismount not allowed now

啟動數據庫一直停留在Database mounted.
最后報ORA-03113: end-of-file on communication channel

++++++++++++++++++++++++++++++++++++++++

查看告警日志,輸出如下錯誤信息:

<txt>ORACLE Instance EBJDB1 - Archival Error
 </txt>
</msg>
<msg time='2017-06-15T14:38:26.640+08:00' org_id='oracle' comp_id='rdbms'
 client_id='' type='UNKNOWN' level='16'
 host_id='oracle01' host_addr='127.0.0.1' module=''
 pid='7977'>
 <txt>ORA-16014: log 1 sequence# 5 not archived, no available destinations
ORA-00312: online log 1 thread 1: &apos;+DATA/ebjdb/onlinelog/group_1.261.945309179&apos;
ORA-00312: online log 1 thread 1: &apos;+FRA/ebjdb/onlinelog/group_1.257.945309181&apos;
 </txt>
</msg>
<msg time='2017-06-15T14:38:26.857+08:00' org_id='oracle' comp_id='rdbms'
 client_id='' type='UNKNOWN' level='16'
 host_id='oracle01' host_addr='127.0.0.1' module=''
 pid='7977'>
 <txt>Archiver process freed from errors. No longer stopped
 </txt>
</msg>

有戲!!!

初步分析是:日志不能正常歸檔,導致了數據庫只能在mounted狀態,在往open狀態切換的時候,找不到相關的日志歸檔路徑,導致數據庫不能啟動到open狀態

++++++++++++++++++++++++++++++++++++++++

開始處理:

首先查看數據庫當前啟動狀態:

SQL> select open_mode from v$database;

OPEN_MODE
--------------------
MOUNTED

查看當前數據庫的歸檔路徑設置:

注:數據庫在open狀態下,可以通過如下命令查看歸檔信息,

SQL> archive log list
Database log mode           Archive Mode
Automatic archival           Enabled
Archive destination           +FRA/archivelog/
Oldest online log sequence     8
Next log sequence to archive   9
Current log sequence           9

數據庫在mounted狀態下的時候,需要通過查看參數文件來確認:

SQL> set linesize 200
SQL> set pagesize 100
SQL> show parameter log_

NAME                     TYPE     VALUE
------------------------------------ ----------- ------------------------------
audit_syslog_level             string
commit_logging                 string
db_create_online_log_dest_1         string
db_create_online_log_dest_2         string
db_create_online_log_dest_3         string
db_create_online_log_dest_4         string
db_create_online_log_dest_5         string
enable_ddl_logging             boolean     FALSE
log_archive_config             string
log_archive_dest             string
.. .. .. .. ..              .. .. .......
log_archive_dest_1             string     LOCATION=+FRA/archivelog/
log_archive_dest_state_4         string     enable
log_archive_dest_state_5         string     enable
log_archive_dest_state_9         string     enable
log_archive_duplex_dest          string
log_archive_format             string     %t_%s_%r.dbf
log_archive_local_first          boolean     TRUE
log_archive_max_processes         integer     4
log_archive_min_succeed_dest         integer     1
log_archive_start             boolean     FALSE
log_archive_trace             integer     0
log_buffer                 integer     2379776
log_checkpoint_interval          integer     0
log_checkpoint_timeout             integer     1800
log_checkpoints_to_alert         boolean     FALSE
log_file_name_convert             string
remote_login_passwordfile         string     EXCLUSIVE
sec_case_sensitive_logon         boolean     TRUE
sec_max_failed_login_attempts         integer     10

可以看出歸檔日志的路徑是:LOCATION=+FRA/archivelog/

+++++++++++++++++++++++++++++++++++
切換到oracle用戶或者grid用戶下,執行asmcmd查看磁盤組信息:

[grid@oracle01 ~]$ asmcmd
ASMCMD> ls
BAK/
CRS/
DATA/
FRA/
ASMCMD> 
ASMCMD> cd FRA
ASMCMD> ls
EBJDB/
ASMCMD> 

發現沒有+FRA/archivelog目錄,我們在+FRA目錄下,創建archivelog目錄:
ASMCMD> pwd      
+FRA
ASMCMD> mkdir archivelog 
archivelog/
ASMCMD> cd archivelog
ASMCMD> pwd
+FRA/archivelog
ASMCMD> 

OK!!!!!!歸檔日志目錄設置完畢!
++++++++++++++++++++++++++++++++++++++

回到sqlplus界面,

SQL> alter database open;

SQL> select instance_name,status from v$instance;

INSTANCE_NAME     STATUS
---------------- ------------
EBJDB1         OPEN

查看集群服務狀態:

[grid@oracle01 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.BAK.dg
               ONLINE  ONLINE       oracle01                                  
               ONLINE  ONLINE       oracle02                                  
ora.CRS.dg
               ONLINE  ONLINE       oracle01                                  
               ONLINE  ONLINE       oracle02                                  
ora.DATA.dg
               ONLINE  ONLINE       oracle01                                  
               ONLINE  ONLINE       oracle02                                  
ora.FRA.dg
               ONLINE  ONLINE       oracle01                                  
               ONLINE  ONLINE       oracle02                                  
ora.LISTENER.lsnr
               ONLINE  ONLINE       oracle01                                  
               ONLINE  ONLINE       oracle02                                  
ora.asm
               ONLINE  ONLINE       oracle01              Started             
               ONLINE  ONLINE       oracle02              Started             
ora.gsd
               ONLINE  OFFLINE      oracle01                                  
               ONLINE  OFFLINE      oracle02                                  
ora.net1.network
               ONLINE  ONLINE       oracle01                                  
               ONLINE  ONLINE       oracle02                                  
ora.ons
               ONLINE  ONLINE       oracle01                                  
               ONLINE  ONLINE       oracle02                                  
ora.registry.acfs
               ONLINE  ONLINE       oracle01                                  
               ONLINE  ONLINE       oracle02                                  
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       oracle01                                  
ora.cvu
      1        ONLINE  ONLINE       oracle01                                  
ora.db.db
      1        ONLINE  ONLINE       oracle01              Open                
      2        ONLINE  ONLINE       oracle02              Open                
ora.oracle01.vip
      1        ONLINE  ONLINE       oracle01                                  
ora.oracle02.vip
      1        ONLINE  ONLINE       oracle02                                  
ora.oc4j
      1        ONLINE  ONLINE       oracle01                                  
ora.scan1.vip
      1        ONLINE  ONLINE       oracle01      

 

OK!!! 焦急的心情稍許平靜!!!!有木有!!!
網上查找各種資料的時候,心情特別難受,都開始懷疑人生了,對面的純開發同事,人家一天啥事沒有。。。。。這次問題雖然解決了,以后估計還會有相同的想法, 哈哈!!!

其他參考:
http://blog.csdn.net/tianlesoftware/article/details/6051672
http://blog.csdn.net/jingleli21/article/details/45888295
http://www.itpub.net/thread-1510308-1-1.html
https://wenku.baidu.com/view/755ddc25bcd126fff7050bdc.html
http://blog.chinaunix.net/uid-28813259-id-3987260.html

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM