- 论坛徽章:
- 0
|
前提11.2.0.4.0 RAC集群运行正常
1、数据库版本信息(两个节点执行,命令只记录一个节点)
OPATCH 版本
[oracle@orcl1 ~]$ cd /u01/app/oracle/product/11.2.0/dbhome_1/OPatch/
[oracle@orcl1 OPatch]$ ./opatch version
OPatch Version: 11.2.0.3.4
OPatch succeeded.
[oracle@orcl1 OPatch]$
DATABASE版本
./opatch lsinventory -bugs_fixed | grep "DATABASE"
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE 11.2.0.4.0 Production
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production
2、准备资源(两个节点执行,命令只记录一个节点)
上传资源到2节点/tmp目录
OPatch : p6880880_112000_Linux-x86-64.zip
GI PSU : GI_PSU_Linux-x86-64.zip(截至2017.10.17日)
[root@orcl1 tmp]# cp p6880880_112000_Linux-x86-64.zip /u01/app/11.2.0/grid/
[root@orcl1 tmp]# cp p6880880_112000_Linux-x86-64.zip /u01/app/oracle/product/11.2.0/dbhome_1/
3、停止集群资源
节点1:[root@orcl1 ~]# /u01/app/11.2.0/grid/bin/crsctl stop crs
节点2:[root@orcl2 ~]# /u01/app/11.2.0/grid/bin/crsctl stop crs
确定成功关闭
[root@orcl1 ~]# /u01/app/11.2.0/grid/bin/crsctl check crs
CRS-4639: Could not contact Oracle High Availability Services
[root@orcl2 ~]# /u01/app/11.2.0/grid/bin/crsctl check crs
CRS-4639: Could not contact Oracle High Availability Services
4、更新集群和DB的OPATCH(两个节点执行,命令只记录一个节点)
更新集群的OPATCH
备份原OPATCH
[root@orcl1 grid]# mv OPatch/ OPatch.bak
[root@orcl1 grid]$ unzip p6880880_112000_Linux-x86-64.zip
[root@orcl1 grid]# chown -R grid.oinstall OPatch
[root@orcl1 grid]# chmod 755 -R OPatch
验证:
[root@orcl1 OPatch]# ./opatch version
OPatch Version: 11.2.0.3.15
OPatch succeeded.
[root@orcl1 OPatch]#
更新DB的OPATCH
备份原OPATCH
[root@orcl1 oracle]# mv OPatch/ OPatch.bak
[root@orcl1 oracle]$ unzip p6880880_112000_Linux-x86-64.zip
[root@orcl1 oracle]# chown -R grid.oinstall OPatch
[root@orcl1 oracle]# chmod 755 -R OPatch
验证:
[root@orcl1 OPatch]# ./opatch version
OPatch Version: 11.2.0.3.15
OPatch succeeded.
[root@orcl1 OPatch]#
5、更新PSU(两个节点执行,命令只记录一个节点)
更新GI的PSU
[root@orcl1 tmp]# unzip GI_PSU_Linux-x86-64.zip
检查PSU包兼容性(即当前环境是否可以打PSU)
[grid@orcl1 26635745]$ /u01/app/11.2.0/grid/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 11.2.0.3.15
Copyright (c) 2017, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/11.2.0/grid
Central Inventory : /u01/app/oraInventory
from : /u01/app/11.2.0/grid/oraInst.loc
OPatch version : 11.2.0.3.15
OUI version : 11.2.0.4.0
Log file location : /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2017-09-29_23-31-53PM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
[grid@orcl1 26635745]$
确认CRS为关闭
[root@orcl1 26635745]# /u01/app/11.2.0/grid/crs/install/rootcrs.pl -unlock
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
CRS-4544: Unable to connect to OHAS
CRS-4000: Command Stop failed, or completed with errors.
Successfully unlock /u01/app/11.2.0/grid
[root@orcl1 26609445]#
[root@orcl2 OPatch]# /u01/app/11.2.0/grid/crs/install/rootcrs.pl -unlock
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
CRS-4544: Unable to connect to OHAS
CRS-4000: Command Stop failed, or completed with errors.
Successfully unlock /u01/app/11.2.0/grid
[grid@orcl1 26609445]$ /u01/app/11.2.0/grid/OPatch/opatch apply
Do you want to proceed? [y|n]
y
User Responded with: Y
Email address/User Name:(回车)
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]: y
Is the local system ready for patching? [y|n]
y
User Responded with: Y
Is the node ready for patching? [y|n]
y
User Responded with: Y
6、检查集群升级
[grid@orcl2 26635745]$ /u01/app/11.2.0/grid/OPatch/opatch lspatches
26609929;OCW Patch Set Update : 11.2.0.4.170814 (26609929)
26392168;Database Patch Set Update : 11.2.0.4.171017 (2639216
22502505;ACFS Patch Set Update : 11.2.0.4.160419 (22502505)
OPatch succeeded.
7、启动集群(CRS)(两个节点执行,命令只记录一个节点)
[root@orcl1 26635745]# /u01/app/11.2.0/grid/bin/crsctl start crs
CRS-4123: Oracle High Availability Services has been started.
8、DB升级PSU,使用同一个压缩包(两个节点执行,命令只记录一个节点)
[oracle@orcl2 26635745]$ /u01/app/oracle/product/11.2.0/dbhome_1/OPatch/opatch apply
Do you want to proceed? [y|n]
y
User Responded with: Y
Email address/User Name: (回车)
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]: y
Is the local system ready for patching? [y|n]
y
User Responded with: Y
可能出现报错信息
[oracle@orcl1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Sat Sep 30 22:20:41 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORA-01078: failure in processing system parameters
ORA-01565: error in identifying file '+DATA/orcl/spfileorcl.ora'
ORA-17503: ksfdopn:10 Failed to open file +DATA/orcl/spfileorcl.ora
ORA-29701: unable to connect to Cluster Synchronization Service
SQL>
[oracle@orcl2 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Sat Sep 30 22:20:29 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 722366464 bytes
Fixed Size 2256752 bytes
Variable Size 511705232 bytes
Database Buffers 205520896 bytes
Redo Buffers 2883584 bytes
ORA-00205: error in identifying control file, check alert log for more info
解决:
说明:无法启动数据库,经过查询是因为oracle权限被更改为oracle install。通过如下方式解决。
在集群的所有节点上执行如下命令修改:
# chown oracle:asmadmin /u01/app/oracle/product/11.2.0/dbhome_1/bin/oracle
# chmod 6751 /u01/app/oracle/product/11.2.0/dbhome_1/bin/oracle
9、升级数据库字典
SQL> @?/rdbms/admin/catbundle.sql psu apply
执行完后,查询到更新的PSU
set line 150
col ACTION_TIME for a30
col ACTION for a8
col NAMESPACE for a8
col VERSION for a10
col BUNDLE_SERIES for a5
col COMMENTS for a20
select * from dba_registry_history;
ACTION_TIME ACTION NAMESPAC VERSION ID BUNDL COMMENTS
------------------------------ -------- -------- ---------- ---------- ----- --------------------
24-AUG-13 12.03.45.119862 PM APPLY SERVER 11.2.0.4 0 PSU Patchset 11.2.0.2.0
28-JUN-17 11.06.48.715881 PM APPLY SERVER 11.2.0.4 0 PSU Patchset 11.2.0.2.0
30-SEP-17 10.44.33.683370 PM APPLY SERVER 11.2.0.4 171017 PSU PSU 11.2.0.4.171017
编译无效对象
@?/rdbms/admin/utlrp.sql
|
|