WHCSRL 技术网

Oracle 11.2.0.1 rac升级到11.2.0.4

升级过程分为三部分:

1、升级grid

2、升级rdbms

3、升级数据字典

前期准备:

新建grid_home和oracle_home

升级前升级后
版本11.2.0.111.2.0.4
grid_base/u01/app/grid/u01/app/grid
grid_home/u01/app/11.2.0/grid/u01/app/11.2.0.4/grid
oracle_base/u01/app/oracle/u01/app/oracle
oracle_home/u01/app/oracle/product/11.2.0/db_1/u01/app/oracle/product/11.2.0.4/db_1

2、升级前检查:

./runcluvfy.sh stage -pre crsinst -upgrade -n zmkj1,zmkj2 -rolling -src_crshome /u01/app/11.2.0/grid -dest_crshome /u01/app/11.2.0.4/grid -dest_version 11.2.0.4.0 -fixup -fixupdir /tmp -verbose

根据检查结果需要升级cuvqdisk、安装补丁9413827 或 9706490

  1. Checking for Oracle patch "9413827 or 9706490" in home "/u01/app/11.2.0/grid".
  2. Node Name Applied Required Comment
  3. ------------ ------------------------ ------------------------ ----------
  4. zmkj2 missing 9413827 or 9706490 failed
  5. zmkj1 missing 9413827 or 9706490 failed
  6. Result: Check for Oracle patch "9413827 or 9706490" in home "/u01/app/11.2.0/grid" failed
  7. Check: Package existence for "cvuqdisk"
  8. Node Name Available Required Status
  9. ------------ ------------------------ ------------------------ ----------
  10. zmkj2 cvuqdisk-1.0.7-1 cvuqdisk-1.0.9-1 failed
  11. zmkj1 cvuqdisk-1.0.7-1 cvuqdisk-1.0.9-1 failed
  12. Result: Package existence check failed for "cvuqdisk"

根据提示在两个节点都执行/tmp/CVU_11.2.0.4.0_grid/runfixup.sh,进行配置:

  1. Fixup information has been generated for following node(s):
  2. zmkj2,zmkj1
  3. Please run the following script on each node as "root" user to execute the fixups:
  4. '/tmp/CVU_11.2.0.4.0_grid/runfixup.sh'
  5. Pre-check for cluster services setup was unsuccessful on all the nodes.

执行结果如下:

  1. [root@zmkj1 ~]# /tmp/CVU_11.2.0.4.0_grid/runfixup.sh
  2. Response file being used is :/tmp/CVU_11.2.0.4.0_grid/fixup.response
  3. Enable file being used is :/tmp/CVU_11.2.0.4.0_grid/fixup.enable
  4. Log file location: /tmp/CVU_11.2.0.4.0_grid/orarun.log
  5. Installing Package /tmp/CVU_11.2.0.4.0_grid//cvuqdisk-1.0.9-1.rpm
  6. Preparing... ################################# [100%%]
  7. Updating / installing...
  8. 1:cvuqdisk-1.0.9-1 ################################# [ 50%%]
  9. Cleaning up / removing...
  10. 2:cvuqdisk-1.0.7-1 ################################# [100%%]
  11. [root@zmkj1 ~]#

Oracle补丁9413827 或 9706490需要手工进行安装,在两个几点都需要打补丁,打补丁的方法可以参考 9413827 或 9706490安装。

3、升级grid

将安装包p13390677_112040_Linux-x86-64_3of7.zip解压,使用grid用户进行升级

  1. [grid@zmkj1 grid]$ cd /tmp
  2. [grid@zmkj1 grid]$ unzip p13390677_112040_Linux-x86-64_3of7.zip
  3. [grid@zmkj1 grid]$ cd /tmp/grid
  4. [grid@zmkj1 grid]$ unset ORACLE_SID
  5. [grid@zmkj1 grid]$ unset ORACLE_BASE
  6. [grid@zmkj1 grid]$ unset ORACLE_HOME

export DISPLAY=192.168.10.143:0.0,执行runInstaller,开始升级

 

 

 

software location 选择新版本所在的目录:

 

 

 

 

 

 

 两个节点分别使用root用户执行脚本:/u01/app/11.2.0.4/grid/rootupgrade.sh

 

  1. 节点1
  2. [root@zmkj1 ~]# /u01/app/11.2.0.4/grid/rootupgrade.sh
  3. Performing root user operation for Oracle 11g
  4. The following environment variables are set as:
  5. ORACLE_OWNER= grid
  6. ORACLE_HOME= /u01/app/11.2.0.4/grid
  7. Enter the full pathname of the local bin directory: [/usr/local/bin]:
  8. The contents of "dbhome" have not changed. No need to overwrite.
  9. The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
  10. [n]: y
  11. Copying oraenv to /usr/local/bin ...
  12. The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
  13. [n]: y
  14. Copying coraenv to /usr/local/bin ...
  15. Entries will be added to the /etc/oratab file as needed by
  16. Database Configuration Assistant when a database is created
  17. Finished running generic part of root script.
  18. Now product-specific root actions will be performed.
  19. Using configuration parameter file: /u01/app/11.2.0.4/grid/crs/install/crsconfig_params
  20. Creating trace directory
  21. User ignored Prerequisites during installation
  22. Installing Trace File Analyzer
  23. ASM upgrade has started on first node.
  24. CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'zmkj1'
  25. CRS-2673: Attempting to stop 'ora.crsd' on 'zmkj1'
  26. CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'zmkj1'
  27. CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'zmkj1'
  28. CRS-2673: Attempting to stop 'ora.CRS.dg' on 'zmkj1'
  29. CRS-2673: Attempting to stop 'ora.zmkj.db' on 'zmkj1'
  30. CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'zmkj1' succeeded
  31. CRS-2673: Attempting to stop 'ora.zmkj1.vip' on 'zmkj1'
  32. CRS-2677: Stop of 'ora.zmkj1.vip' on 'zmkj1' succeeded
  33. CRS-2672: Attempting to start 'ora.zmkj1.vip' on 'zmkj2'
  34. CRS-2676: Start of 'ora.zmkj1.vip' on 'zmkj2' succeeded
  35. CRS-2677: Stop of 'ora.CRS.dg' on 'zmkj1' succeeded
  36. CRS-2677: Stop of 'ora.zmkj.db' on 'zmkj1' succeeded
  37. CRS-2673: Attempting to stop 'ora.DATADG.dg' on 'zmkj1'
  38. CRS-2677: Stop of 'ora.DATADG.dg' on 'zmkj1' succeeded
  39. CRS-2673: Attempting to stop 'ora.asm' on 'zmkj1'
  40. CRS-2677: Stop of 'ora.asm' on 'zmkj1' succeeded
  41. CRS-2673: Attempting to stop 'ora.ons' on 'zmkj1'
  42. CRS-2673: Attempting to stop 'ora.eons' on 'zmkj1'
  43. CRS-2677: Stop of 'ora.ons' on 'zmkj1' succeeded
  44. CRS-2673: Attempting to stop 'ora.net1.network' on 'zmkj1'
  45. CRS-2677: Stop of 'ora.net1.network' on 'zmkj1' succeeded
  46. CRS-2677: Stop of 'ora.eons' on 'zmkj1' succeeded
  47. CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'zmkj1' has completed
  48. CRS-2677: Stop of 'ora.crsd' on 'zmkj1' succeeded
  49. CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'zmkj1'
  50. CRS-2673: Attempting to stop 'ora.ctssd' on 'zmkj1'
  51. CRS-2673: Attempting to stop 'ora.evmd' on 'zmkj1'
  52. CRS-2673: Attempting to stop 'ora.asm' on 'zmkj1'
  53. CRS-2673: Attempting to stop 'ora.mdnsd' on 'zmkj1'
  54. CRS-2677: Stop of 'ora.cssdmonitor' on 'zmkj1' succeeded
  55. CRS-2677: Stop of 'ora.evmd' on 'zmkj1' succeeded
  56. CRS-2677: Stop of 'ora.mdnsd' on 'zmkj1' succeeded
  57. CRS-2677: Stop of 'ora.ctssd' on 'zmkj1' succeeded
  58. CRS-2677: Stop of 'ora.asm' on 'zmkj1' succeeded
  59. CRS-2673: Attempting to stop 'ora.cssd' on 'zmkj1'
  60. CRS-2677: Stop of 'ora.cssd' on 'zmkj1' succeeded
  61. CRS-2673: Attempting to stop 'ora.gpnpd' on 'zmkj1'
  62. CRS-2673: Attempting to stop 'ora.diskmon' on 'zmkj1'
  63. CRS-2677: Stop of 'ora.gpnpd' on 'zmkj1' succeeded
  64. CRS-2673: Attempting to stop 'ora.gipcd' on 'zmkj1'
  65. CRS-2677: Stop of 'ora.gipcd' on 'zmkj1' succeeded
  66. CRS-2677: Stop of 'ora.diskmon' on 'zmkj1' succeeded
  67. CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'zmkj1' has completed
  68. CRS-4133: Oracle High Availability Services has been stopped.
  69. OLR initialization - successful
  70. Replacing Clusterware entries in inittab
  71. clscfg: EXISTING configuration version 5 detected.
  72. clscfg: version 5 is 11g Release 2.
  73. Successfully accumulated necessary OCR keys.
  74. Creating OCR keys for user 'root', privgrp 'root'..
  75. Operation successful.
  76. Configure Oracle Grid Infrastructure for a Cluster ... succeeded
  77. [root@zmkj1 ~]#
  78. 节点2
  79. [root@zmkj2 ~]# /u01/app/11.2.0.4/grid/rootupgrade.sh
  80. Performing root user operation for Oracle 11g
  81. The following environment variables are set as:
  82. ORACLE_OWNER= grid
  83. ORACLE_HOME= /u01/app/11.2.0.4/grid
  84. Enter the full pathname of the local bin directory: [/usr/local/bin]:
  85. The contents of "dbhome" have not changed. No need to overwrite.
  86. The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
  87. [n]: y
  88. Copying oraenv to /usr/local/bin ...
  89. The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
  90. [n]: y
  91. Copying coraenv to /usr/local/bin ...
  92. Entries will be added to the /etc/oratab file as needed by
  93. Database Configuration Assistant when a database is created
  94. Finished running generic part of root script.
  95. Now product-specific root actions will be performed.
  96. Using configuration parameter file: /u01/app/11.2.0.4/grid/crs/install/crsconfig_params
  97. Creating trace directory
  98. User ignored Prerequisites during installation
  99. Installing Trace File Analyzer
  100. CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'zmkj2'
  101. CRS-2673: Attempting to stop 'ora.crsd' on 'zmkj2'
  102. CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'zmkj2'
  103. CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'zmkj2'
  104. CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'zmkj2'
  105. CRS-2673: Attempting to stop 'ora.CRS.dg' on 'zmkj2'
  106. CRS-2673: Attempting to stop 'ora.zmkj.db' on 'zmkj2'
  107. CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'zmkj2' succeeded
  108. CRS-2673: Attempting to stop 'ora.scan1.vip' on 'zmkj2'
  109. CRS-2677: Stop of 'ora.scan1.vip' on 'zmkj2' succeeded
  110. CRS-2672: Attempting to start 'ora.scan1.vip' on 'zmkj1'
  111. CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'zmkj2' succeeded
  112. CRS-2673: Attempting to stop 'ora.zmkj2.vip' on 'zmkj2'
  113. CRS-2677: Stop of 'ora.zmkj2.vip' on 'zmkj2' succeeded
  114. CRS-2672: Attempting to start 'ora.zmkj2.vip' on 'zmkj1'
  115. CRS-2676: Start of 'ora.scan1.vip' on 'zmkj1' succeeded
  116. CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'zmkj1'
  117. CRS-2676: Start of 'ora.zmkj2.vip' on 'zmkj1' succeeded
  118. CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'zmkj1' succeeded
  119. CRS-2677: Stop of 'ora.CRS.dg' on 'zmkj2' succeeded
  120. CRS-2677: Stop of 'ora.zmkj.db' on 'zmkj2' succeeded
  121. CRS-2673: Attempting to stop 'ora.DATADG.dg' on 'zmkj2'
  122. CRS-2677: Stop of 'ora.DATADG.dg' on 'zmkj2' succeeded
  123. CRS-2673: Attempting to stop 'ora.asm' on 'zmkj2'
  124. CRS-2677: Stop of 'ora.asm' on 'zmkj2' succeeded
  125. CRS-2673: Attempting to stop 'ora.ons' on 'zmkj2'
  126. CRS-2673: Attempting to stop 'ora.eons' on 'zmkj2'
  127. CRS-2677: Stop of 'ora.ons' on 'zmkj2' succeeded
  128. CRS-2673: Attempting to stop 'ora.net1.network' on 'zmkj2'
  129. CRS-2677: Stop of 'ora.net1.network' on 'zmkj2' succeeded
  130. CRS-2677: Stop of 'ora.eons' on 'zmkj2' succeeded
  131. CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'zmkj2' has completed
  132. CRS-2677: Stop of 'ora.crsd' on 'zmkj2' succeeded
  133. CRS-2673: Attempting to stop 'ora.gpnpd' on 'zmkj2'
  134. CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'zmkj2'
  135. CRS-2673: Attempting to stop 'ora.ctssd' on 'zmkj2'
  136. CRS-2673: Attempting to stop 'ora.evmd' on 'zmkj2'
  137. CRS-2673: Attempting to stop 'ora.asm' on 'zmkj2'
  138. CRS-2673: Attempting to stop 'ora.mdnsd' on 'zmkj2'
  139. CRS-2677: Stop of 'ora.cssdmonitor' on 'zmkj2' succeeded
  140. CRS-2677: Stop of 'ora.gpnpd' on 'zmkj2' succeeded
  141. CRS-2677: Stop of 'ora.evmd' on 'zmkj2' succeeded
  142. CRS-2677: Stop of 'ora.mdnsd' on 'zmkj2' succeeded
  143. CRS-2677: Stop of 'ora.asm' on 'zmkj2' succeeded
  144. CRS-2677: Stop of 'ora.ctssd' on 'zmkj2' succeeded
  145. CRS-2673: Attempting to stop 'ora.cssd' on 'zmkj2'
  146. CRS-2677: Stop of 'ora.cssd' on 'zmkj2' succeeded
  147. CRS-2673: Attempting to stop 'ora.diskmon' on 'zmkj2'
  148. CRS-2673: Attempting to stop 'ora.gipcd' on 'zmkj2'
  149. CRS-2677: Stop of 'ora.diskmon' on 'zmkj2' succeeded
  150. CRS-2677: Stop of 'ora.gipcd' on 'zmkj2' succeeded
  151. CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'zmkj2' has completed
  152. CRS-4133: Oracle High Availability Services has been stopped.
  153. OLR initialization - successful
  154. Replacing Clusterware entries in inittab
  155. clscfg: EXISTING configuration version 5 detected.
  156. clscfg: version 5 is 11g Release 2.
  157. Successfully accumulated necessary OCR keys.
  158. Creating OCR keys for user 'root', privgrp 'root'..
  159. Operation successful.
  160. Started to upgrade the Oracle Clusterware. This operation may take a few minutes.
  161. Started to upgrade the CSS.
  162. Started to upgrade the CRS.
  163. The CRS was successfully upgraded.
  164. Successfully upgraded the Oracle Clusterware.
  165. Oracle Clusterware operating version was successfully set to 11.2.0.4.0
  166. ASM upgrade has finished on last node.
  167. Configure Oracle Grid Infrastructure for a Cluster ... succeeded
  168. [root@zmkj2 ~]#

 

 

 

 

 grid升级完成。

升级完成后检查grid的版本:

  1. [grid@zmkj2 ~]$ crsctl query crs activeversion
  2. Oracle Clusterware active version on the cluster is [11.2.0.4.0]
  3. [root@zmkj2 ~]# crsctl query crs releaseversion
  4. Oracle High Availability Services release version on the local node is [11.2.0.4.0]
  5. [root@zmkj2 ~]# crsctl query crs softwareversion
  6. Oracle Clusterware version on node [zmkj2] is [11.2.0.4.0]
  7. [grid@zmkj2 ~]$

2、升级rdbms

  1. [oracle@zmkj1 database]$ unset ORACLE_SID
  2. [oracle@zmkj1 database]$ unset ORACLE_BASE
  3. [oracle@zmkj1 database]$ unset ORACLE_HOME
  4. [oracle@zmkj1 database]$ ./runInstaller
  5. Starting Oracle Universal Installer...
  6. Checking Temp space: must be greater than 120 MB. Actual 3736 MB Passed
  7. Checking swap space: must be greater than 150 MB. Actual 12266 MB Passed
  8. Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed
  9. Preparing to launch Oracle Universal Installer from /tmp/OraInstall2021-11-01_02-09-00PM. Please wait ...[oracle@zmkj1 database]$
  10. [root@zmkj1 ~]#

 

选择upgrade and existing database:

 

 

 

 

 

选择新的安装目录:

 

 

 

 

 

 

 

 两节点分别执行root.sh。

3、升级数据字典

在节点1执行,shutdown节点2

 

 

 

 

 

 

 

 

升级完成 

推荐阅读