RAC升級11.2.0.1到11.2.0.4的實戰

lusklusklusk發表於2016-08-11

grid

ORACLE_BASE=/u01/app/oracle

ORACLE_HOME=/u01/app/grid

oracle

ORACLE_BASE=/u01/app/oracle

ORACLE_ HOME =/u01/app/oracle/product/11.2.0/db_1

 

grid

ORACLE_BASE=/u01/app/oracle

ORACLE_HOME=/u01/app/110204/grid

oracle

ORACLE_BASE=/u01/app/oracle

ORACLE_ HOME =/u01/app/oracle/product/11.2.0.4/db_1

 

 

1. 上傳新版本oraclegrid安裝檔案至第一個節點,並解壓出來

2. 所有節點上新建目錄/u01/app/110204/grid/u01/app/oracle/product/11.2.0.4/db_1並分別授予gridoracle的許可權

3. Grid升級前檢查,進入grid安裝檔案的目錄,執行如下語句(-src_crshome後面對應的是原來grid$ORACLE_HOME, -dest_crshome後面對應的是新版本grid$ORACLE_HOME,個人實驗的情況是兩個問題都忽略了)

./runcluvfy.sh stage -pre crsinst -upgrade -n testdb01,testdb02 -rolling -src_crshome /u01/app/grid -dest_crshome /u01/app/110204/grid -dest_version 11.2.0.4.0 -fixup -fixupdir /tmp -verbose

一般都有如下兩個問題(第一個解決辦法:安裝9706490補丁包;第二個解決辦法:忽略)

Checking for Oracle patch "9413827 or 9706490" in home "/u01/app/grid".

Node Name     Applied          Required                 Comment

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

 testdb02      missing          9413827 or 9706490      failed

testdb01      missing          9413827 or 9706490      failed

Result: Check for Oracle patch "9413827 or 9706490" in home "/u01/app/grid" failed

There are no oracle patches required for home "/u01/app/110204/grid".

 

Checking if search entry in file "/etc/resolv.conf" is consistent across the nodes...

search entry in file "/etc/resolv.conf" is consistent across nodes

Checking DNS response time for an unreachable node

  Node Name              Status

  -------                 ----

  testdb02               failed

  testdb01               failed

PRVF-5636 : The DNS response time for an unreachable node exceeded "15000" ms on following nodes: testdb02,testdb01

File "/etc/resolv.conf" is not consistent across nodes

 

4. 關閉所有節點的CRS(個人實驗過程中因為沒有打9706490補丁,所以採用了關閉CRS來避免後期執行rootupgrade.sh導致Failed to stop the lower version of Grid Infrastructure錯引發的grid升級不成功的問題)

Root#/u01/app/grid/bin/crsctl stop crs

5. 安裝grid

6. 啟動所有節點的CRS(當然安裝完grid後,過一段時間發現會自動啟動gridcrsctl start crs,但是安裝過程中還是手工啟動的好,且啟動後的grid的版本有更新瞭如下)

Root#/u01/app/grid/bin/crsctl start crs

 

crsctl query crs activeversion -- 11.2.0.4.0

/u01/app/110204/grid/bin/crsctl query crs activeversion  -- 11.2.0.4.0

crsctl query crs releaseversion -- 11.2.0.1.0

/u01/app/110204/grid/bin/crsctl query crs releaseversion -- 11.2.0.4.0

crsctl query crs softwareversion -- 11.2.0.4.0

/u01/app/110204/grid/bin/crsctl query crs softwareversion -- 11.2.0.4.0

srvctl config asm顯示ASM home: /u01/app/110204/grid

/u01/app/110204/grid/bin/srvctl config asm顯示ASM home: /u01/app/110204/grid

但是grid使用者下sqlplus / as sysasm顯示例項時idle狀態,asmcmd進入也是idle狀態,執行srvctl status asm卻顯示ASM is running。檢視了$ORACLE_BASE/diag/asm目錄沒有發現另外的ASM例項名稱,也就是ASM例項的名稱還是低版本的,那為何grid使用者下sqlplus / as sysasm顯示idle,但是oracle使用者下sqlplus / as sysdba可以查詢,奇怪了,理論上ASM沒有啟動,DB是啟動不了的。

 

7. 安裝oracle,選擇update an existing databae,執行完$ORACLE_HOME/root.sh後會自動執行DBUA,這些步驟完成後不用再手動執行什麼catupgrd.sqlutlrp.sql了,因為DBUA的過程中會自動performing post upgrade之類

8. 修改gridoracle.bash_profileresource一下

9. 繼續使用原來目錄的命令關閉叢集如/u01/app/grid/bin/crsctl stop crs,再重啟伺服器驗證下如查詢如下語句
SQL> select comp_name,version,status from dba_registry;



Grid安裝介面





















DB安裝介面



























來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30126024/viewspace-2123327/,如需轉載,請註明出處,否則將追究法律責任。

相關文章