【故障處理】DBCA建庫詭異問題處理--rac環境不能建立rac庫

注意:文章內容太多,公衆號有限制,小麥苗作了精簡,全過程能夠參考http://blog.itpub.net/26736162/viewspace-2121863/ 或 http://www.cnblogs.com/lhrbest/articles/5661762.html 或者去雲盤下載pdf版本閱讀,謝謝你們的理解。html

 

 


 

導讀和注意事項

各位技術愛好者,看完本文後,你能夠掌握以下的技能,也能夠學到一些其它你所不知道的知識,~O(∩_∩)O~node

dbca靜默建立racsql

Inventory目錄做用及其2種重建方法(重點)數據庫

rac環境dbca工具不能建立rac庫的解決辦法微信

dbca靜默建庫常見問題處理oracle

⑤ 重建CRS集羣環境執行root.sh腳本app

 

 

1  故障分析及解決過程

 

1.1  故障環境介紹

 

 項目ide

source db工具

db 類型學習

RAC

db version

11.2.0.4

db 存儲

ASM

OS版本及kernel版本

AIX 646.1.0.0

 

 

1.2  故障發生現象及報錯信息

小麥苗採用dbca -silent+nodeinifo建立rac庫,原來用的好好的命令,結果在這個rac環境上建立出來的庫成了單實例的,非常鬱悶,,,,且看故障發生的現象:

[ZFZHLHRDB1:oracle]:/oracle>dbca -silent -createDatabase -templateName General_Purpose.dbc -responseFile NO_VALUE \

> -gdbname raclhr  -sid raclhr \

> -sysPassword oracle -systemPassword lhr \

> -datafileDestination 'DATA/' -recoveryAreaDestination 'DATA/' \

> -redoLogFileSize 50 \

> -storageType ASM -asmsnmpPassword lhr  -diskGroupName 'DATA' \

> -characterset ZHS16GBK -nationalCharacterSet AL16UTF16 \

> -sampleSchema true \

> -automaticMemoryManagement true -totalMemory 2048 \

> -databaseType OLTP  \

> -emConfiguration NONE \

> -nodeinfo ZFZHLHRDB1,ZFZHLHRDB2

Copying database files

1% complete

3% complete

10% complete

17% complete

24% complete

35% complete

Creating and starting Oracle instance

37% complete

42% complete

47% complete

52% complete

53% complete

56% complete

58% complete

Registering database with Oracle Restart

64% complete

Completing Database Creation

68% complete

71% complete

75% complete

85% complete

96% complete

100% complete

Look at the log file "/oracle/app/oracle/cfgtoollogs/dbca/raclhr/raclhr.log" for further details.

[ZFZHLHRDB1:oracle]:/oracle>more /oracle/app/oracle/cfgtoollogs/dbca/raclhr/raclhr.log

Copying database files

DBCA_PROGRESS : 1%

DBCA_PROGRESS : 3%

DBCA_PROGRESS : 10%

DBCA_PROGRESS : 17%

DBCA_PROGRESS : 24%

DBCA_PROGRESS : 31%

DBCA_PROGRESS : 35%

Creating and starting Oracle instance

DBCA_PROGRESS : 37%

DBCA_PROGRESS : 42%

DBCA_PROGRESS : 47%

DBCA_PROGRESS : 52%

DBCA_PROGRESS : 53%

DBCA_PROGRESS : 56%

DBCA_PROGRESS : 58%

Registering database with Oracle Restart

DBCA_PROGRESS : 64%

Completing Database Creation

DBCA_PROGRESS : 68%

DBCA_PROGRESS : 71%

DBCA_PROGRESS : 75%

DBCA_PROGRESS : 85%

DBCA_PROGRESS : 96%

DBCA_PROGRESS : 100%

Database creation complete. For details check the logfiles at:

 /oracle/app/oracle/cfgtoollogs/dbca/raclhr.

Database Information:

Global Database Name:raclhr

System Identifier(SID):raclhr

[ZFZHLHRDB1:oracle]:/oracle>

[ZFZHLHRDB1:oracle]:/oracle>ORACLE_SID=raclhr                                              

[ZFZHLHRDB1:oracle]:/oracle>sqlplus / as sysdba                                            

                                                                                           

SQL*Plus: Release 11.2.0.4.0 Production on Tue Jul 5 17:17:42 2016                         

                                                                                           

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                                           

                                                                                           

SYS@raclhr> show parameter cluster                                                         

                                                                                           

NAME                                 TYPE        VALUE                                     

------------------------------------ ----------- ------------------------------            

cluster_database                     boolean     FALSE                                     

cluster_database_instances           integer     1                                         

cluster_interconnects                string                                                

 

你們看到這裏的安裝百分比是1%->3%->10%-17%.....,rac庫建立的時候進度百分比應該是1%->3%->9%-15%.....,以下圖所示:

Copying database files

1% complete

3% complete

9% complete

15% complete

21% complete

30% complete

Creating and starting Oracle instance

32% complete

36% complete

40% complete

44% complete

45% complete

48% complete

50% complete

Creating cluster database views

52% complete

70% complete

Completing Database Creation

73% complete

76% complete

85% complete

94% complete

100% complete

Look at the log file "/oracle/app/oracle/cfgtoollogs/dbca/raclhr/raclhr.log" for further details.

 

接下來小麥苗嘗試了以下的幾種方式:①dbca採用響應文件的形式,②dbca圖形界面的方式,都是一樣的狀況。

 

個人環境dbca圖形界面的第一張圖:


而正常rac環境下dbca圖形界面的第一步圖應該是:


以上都是目前出現的問題,初步預估是哪一個配置文件出錯了,dbca不能判斷集羣環境。

 

1.3  故障分析及解決過程

 

起初小麥苗覺得是集羣出現了問題,在萬般無奈的狀況下執行root.sh重建了集羣,按照之前的經驗,這個終極大招執行後集羣確定能夠恢復到正常的狀況下,結果呢?結果仍是令小麥苗很傷心,狀況依舊沒有解決。

這個終極大招已經使用過了,問題沒有解決只能說明不是權限的問題,也不是集羣的問題,而是DB環境的問題。

因而硬着頭皮分析分析dbca的日誌,dbca建立庫的時候日誌在:11g:$ORACLE_BASE/cfgtoollogs/dbca , 10g:$ORACLE_HOME/cfgtoollogs/dbca,發現多是監聽的問題,因而又重建了監聽,仍是不行,

有種深深的挫敗感,因而解決同事碰到的那個DG問題,參考:http://blog.itpub.net/26736162/viewspace-2121688/時間就這樣過了2天,到了78號,手頭又沒什麼事情了,想起來dbca這個問題,想來想去仍是得從日誌入手,老子一行一行的看,總能看出點東西來,但此次我比對的看,就是找一個dbca能夠建立rac的環境,生成日誌來分析差別,結果令我震驚了。

當小麥苗看到第5行的日誌的時候,發現一個null的問題,Current Version From Inventory: null,截圖以下:

錯誤環境截圖:

而正常環境的rac是這個樣子的:


能夠看到正常環境下,能夠獲取到HomeinfoCurrent Version From Inventory的值,當看到Inventory這個詞的時候我就想我已經找到問題的答案了。應該是Inventory這個目錄出現了問題,標準點的說法應該是/oracle/app/oraInventory/ContentsXML/inventory.xml這個文件的內容有問題了。Inventory目錄存放的是Oracle軟件安裝的目錄信息,Oracle升級也須要這個目錄,執行opatch lspatches也須要這個目錄。oraInventory目錄的位置在/etc/oraInst.loc中記錄,11g中咱們能夠經過$ORACLE_HOME/oui/bin/attachHome.sh來重建這個目錄。

 

在其中的1個節點上分別用oraclegrid來執行:

[ZFLHRDB1:root]:/oracle/app/oraInventory>$ORACLE_HOME/oui/bin/attachHome.sh

 

The user is root. Oracle Universal Installer cannot continue installation if the user is root.

: A file or directory in the path name does not exist.

[ZFLHRDB1:root]:/oracle/app/oraInventory>su - grid  

[ZFLHRDB1:grid]:/home/grid>$ORACLE_HOME/oui/bin/attachHome.sh

Starting Oracle Universal Installer...

 

Checking swap space: must be greater than 500 MB.   Actual 8192 MB    Passed

The inventory pointer is located at /etc/oraInst.loc

The inventory is located at /oracle/app/oraInventory

'AttachHome' was successful.

[ZFLHRDB1:grid]:/home/grid>cd /oracle/app/oraInventory/ContentsXML

[ZFLHRDB1:grid]:/oracle/app/oraInventory/ContentsXML>more inv*

<?xml version="1.0" standalone="yes" ?>

<!-- Copyright (c) 1999, 2013, Oracle and/or its affiliates.

All rights reserved. -->

<!-- Do not modify the contents of this file by hand. -->

<INVENTORY>

<VERSION_INFO>

   <SAVED_WITH>11.2.0.4.0</SAVED_WITH>

   <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>

</VERSION_INFO>

<HOME_LIST>

<HOME NAME="Ora11g_gridinfrahome1" LOC="/oracle/app/11.2.0/grid" TYPE="O" IDX="1" CRS="true">

   <NODE_LIST>

      <NODE NAME="ZFLHRDB1"/>

      <NODE NAME="ZFLHRDB2"/>

   </NODE_LIST>

</HOME>

</HOME_LIST>

<COMPOSITEHOME_LIST>

</COMPOSITEHOME_LIST>

</INVENTORY>

[ZFLHRDB1:grid]:/oracle/app/oraInventory/ContentsXML>exit

[ZFLHRDB1:root]:/oracle/app/oraInventory>su - oracle

[ZFLHRDB1:oracle]:/oracle>$ORACLE_HOME/oui/bin/attachHome.sh

Starting Oracle Universal Installer...

 

Checking swap space: must be greater than 500 MB.   Actual 8192 MB    Passed

The inventory pointer is located at /etc/oraInst.loc

The inventory is located at /oracle/app/oraInventory

'AttachHome' was successful.

[ZFLHRDB1:oracle]:/oracle>cd /oracle/app/oraInventory/ContentsXML

[ZFLHRDB1:oracle]:/oracle/app/oraInventory/ContentsXML>more inv*

<?xml version="1.0" standalone="yes" ?>

<!-- Copyright (c) 1999, 2013, Oracle and/or its affiliates.

All rights reserved. -->

<!-- Do not modify the contents of this file by hand. -->

<INVENTORY>

<VERSION_INFO>

   <SAVED_WITH>11.2.0.4.0</SAVED_WITH>

   <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>

</VERSION_INFO>

<HOME_LIST>

<HOME NAME="Ora11g_gridinfrahome1" LOC="/oracle/app/11.2.0/grid" TYPE="O" IDX="1" CRS="true">

   <NODE_LIST>

      <NODE NAME="ZFLHRDB1"/>

      <NODE NAME="ZFLHRDB2"/>

   </NODE_LIST>

</HOME>

<HOME NAME="DbHome1" LOC="/oracle/app/oracle/product/11.2.0/db" TYPE="O" IDX="2">

   <NODE_LIST>

      <NODE NAME="ZFLHRDB1"/>

      <NODE NAME="ZFLHRDB2"/>

   </NODE_LIST>

</HOME>

</HOME_LIST>

<COMPOSITEHOME_LIST>

</COMPOSITEHOME_LIST>

</INVENTORY>

 

重建Inventory這個目錄後從新執行建庫腳本就正常了,唉,o(︶︿︶)o 唉,折騰了這麼久原來是這個文件的問題,至於新環境爲啥這個目錄的配置文件不全,這個估計得追溯到rac的安裝過程了,這個就不去糾結了。

 

  About Me

..........................................................................................................................................................................................................

本文做者:小麥苗,只專一於數據庫的技術,更注重技術的運用

本文在ITpub(http://blog.itpub.net/26736162)和博客園(http://www.cnblogs.com/lhrbest)有同步更新

本文地址:http://blog.itpub.net/26736162/viewspace-2121863/

本文pdf版:http://yunpan.cn/cdEQedhCs2kFz (提取碼:ed9b) 

小麥苗分享的其它資料:http://blog.itpub.net/26736162/viewspace-1624453/

聯繫我請加QQ好友(642808185),註明添加原因

於 2016-07-05 16:00~ 2016-07-08 19:00 在中行完成

【版權全部,文章容許轉載,但須以連接方式註明源地址,不然追究法律責任】

..........................................................................................................................................................................................................

拿起手機掃描下邊的圖片來關注小麥苗的微信公衆號:xiaomaimiaolhr,學習最實用的數據庫技術。


 


本文分享自微信公衆號 - DB寶(lhrdba)。
若有侵權,請聯繫 support@oschina.cn 刪除。
本文參與「OSC源創計劃」,歡迎正在閱讀的你也加入,一塊兒分享。

相關文章
相關標籤/搜索