ORACLE 11g RAC测试环境GI和DB打 PSU操作流程
2015-02-02 16:46
661 查看
1、环境介绍。
node1-> cat /proc/version
Linux version 2.6.18-238.el5 (mockbuild@x86-012.build.bos.redhat.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-50)) #1 SMP Sun Dec 19 14:22:44 EST 2010
node1-> lsb_release -a
LSB Version: :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 5.6 (Tikanga)
Release: 5.6
Codename: Tikanga
node2-> cat /proc/version
Linux version 2.6.18-238.el5 (mockbuild@x86-012.build.bos.redhat.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-50)) #1 SMP Sun Dec 19 14:22:44 EST 2010
node2-> lsb_release -a
LSB Version: :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 5.6 (Tikanga)
Release: 5.6
Codename: Tikanga
2、升级前数据库补丁情况。(两个结点都要查询)
node1-> su - grid
node1-> cd $ORACLE_HOME/OPatch
node1-> ./opatch version
Invoking OPatch 11.2.0.1.7
OPatch Version: 11.2.0.1.7
OPatch succeeded.
node1-> su - oracle
node1-> cd $ORACLE_HOME/OPatch
node1-> ./opatch version
Invoking OPatch 11.2.0.1.7
OPatch Version: 11.2.0.1.7
OPatch succeeded.
SQL> select action,comments from registry$history;
ACTION COMMENTS
-------------------- --------------------
APPLY Patchset 11.2.0.2.0
APPLY Patchset 11.2.0.2.0
3、更新opatch版本。(两个结点的集群和数据库软件的OPATCH版本都要更新)
node1->mv OPatch/ OPatch_BAK/
node1->unzip p6880880_112000_Linux-x86-64.zip
node1->chown -R oracle:oinstall OPatch/
node1-> ./opatch version
OPatch Version: 11.2.0.3.6
OPatch succeeded.
node1->mv OPatch/ OPatch_BAK/
node1->unzip p6880880_112000_Linux-x86-64.zip
node1->chown -R grid:oinstall OPatch/
node1-> ./opatch version
OPatch Version: 11.2.0.3.6
OPatch succeeded.
4、配置OCM文件。(两个结点都执行,GI和DB下都生成ocm.rsp文件)
node1-> $ORACLE_HOME/OPatch/ocm/bin/emocmrsp
5、验证ORACLE INVENTORY
$ <ORACLE_HOME>/OPatch/opatch lsinventory -detail -oh <ORACLE_HOME>
6、停止EM,停止监听。
$ <ORACLE_HOME>/bin/emctl stop dbconsole
$ lsnrctl stop
7、解压补丁包。
[root@node1 ~]# cd /u01
[root@node1 ~]# chown -R grid:oinstall p19440385_112030_Linux-x86-64.zip
[root@node1 ~]# su - grid
node1-> cd /u01
node1-> mkdir patch
node1-> unzip p19440385_112030_Linux-x86-64.zip -d patch/
8、检查补丁是否有冲突。
$ /$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patch/ -oh $ORACLE_HOME
9、安装补丁。
使用root用户去安装可以同时给GI和DB打补丁。补丁包赋予grid:oinstall权限,opatch工具GI的opatch工具。
# opatch auto <UNZIPPED_PATCH_LOCATION> -ocmrf <ocm response file>
/u01/app/11.2.0/grid/OPatch/opatch auto /u01/patch/ -ocmrf /u01/app/11.2.0/grid/OPatch/ocm/bin/ocm.rsp
10、安装过程日志报下面错误,原因为磁盘空间不够,删除大的文件,释放磁盘空间,则PSU打补丁成功。
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.6
OUI version : 11.2.0.3.0
Log file location : /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2015-01-30_18-56-20下午_1.log
Verifying environment and performing prerequisite checks...
Prerequisite check "CheckSystemSpace" failed.
The details are:
Required amount of space(6601.28MB) is not available.
UtilSession 失败:
Prerequisite check "CheckSystemSpace" failed.
Log file location: /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2015-01-30_18-56-20下午_1.log
OPatch failed with error code 73
2015-01-30 18:56:24: patch /u01/patch/17592127 apply failed for home /u01/app/11.2.0/grid
2015-01-30 18:56:24: Performing Post patch actions
2015-01-30 18:56:24: norestart flag is set to
2015-01-30 18:56:24: Opening file /etc/oracle/ocr.loc
2015-01-30 18:56:24: Value (FALSE) is set for key=local_only
2015-01-30 18:56:24: Oracle user for /u01/app/11.2.0/grid is grid
2015-01-30 18:56:24: Oracle user for /u01/app/11.2.0/grid is grid
2015-01-30 18:56:24: Running as user grid: /u01/app/11.2.0/grid/bin/emctl start dbconsole
2015-01-30 18:56:24: s_run_as_user2: Running /bin/su grid -c ' /u01/app/11.2.0/grid/bin/emctl start dbconsole '
2015-01-30 18:56:24: Removing file /tmp/filewRBYdq
2015-01-30 18:56:24: Successfully removed file: /tmp/filewRBYdq
2015-01-30 18:56:24: /bin/su exited with rc=13
11、更新数据字典。
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql psu apply
SQL> QUIT
12、查询新安装的补丁集。
SQL> select action,comments from registry$history;
ACTION COMMENTS
------------------------------ ------------------------------
APPLY Patchset 11.2.0.2.0
APPLY Patchset 11.2.0.2.0
APPLY PSU 11.2.0.3.12
ROLLBACK PSU 11.2.0.3.12
APPLY Patchset 11.2.0.2.0
APPLY PSU 11.2.0.3.12
node1-> cat /proc/version
Linux version 2.6.18-238.el5 (mockbuild@x86-012.build.bos.redhat.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-50)) #1 SMP Sun Dec 19 14:22:44 EST 2010
node1-> lsb_release -a
LSB Version: :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 5.6 (Tikanga)
Release: 5.6
Codename: Tikanga
node2-> cat /proc/version
Linux version 2.6.18-238.el5 (mockbuild@x86-012.build.bos.redhat.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-50)) #1 SMP Sun Dec 19 14:22:44 EST 2010
node2-> lsb_release -a
LSB Version: :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 5.6 (Tikanga)
Release: 5.6
Codename: Tikanga
2、升级前数据库补丁情况。(两个结点都要查询)
node1-> su - grid
node1-> cd $ORACLE_HOME/OPatch
node1-> ./opatch version
Invoking OPatch 11.2.0.1.7
OPatch Version: 11.2.0.1.7
OPatch succeeded.
node1-> su - oracle
node1-> cd $ORACLE_HOME/OPatch
node1-> ./opatch version
Invoking OPatch 11.2.0.1.7
OPatch Version: 11.2.0.1.7
OPatch succeeded.
SQL> select action,comments from registry$history;
ACTION COMMENTS
-------------------- --------------------
APPLY Patchset 11.2.0.2.0
APPLY Patchset 11.2.0.2.0
3、更新opatch版本。(两个结点的集群和数据库软件的OPATCH版本都要更新)
node1->mv OPatch/ OPatch_BAK/
node1->unzip p6880880_112000_Linux-x86-64.zip
node1->chown -R oracle:oinstall OPatch/
node1-> ./opatch version
OPatch Version: 11.2.0.3.6
OPatch succeeded.
node1->mv OPatch/ OPatch_BAK/
node1->unzip p6880880_112000_Linux-x86-64.zip
node1->chown -R grid:oinstall OPatch/
node1-> ./opatch version
OPatch Version: 11.2.0.3.6
OPatch succeeded.
4、配置OCM文件。(两个结点都执行,GI和DB下都生成ocm.rsp文件)
node1-> $ORACLE_HOME/OPatch/ocm/bin/emocmrsp
5、验证ORACLE INVENTORY
$ <ORACLE_HOME>/OPatch/opatch lsinventory -detail -oh <ORACLE_HOME>
6、停止EM,停止监听。
$ <ORACLE_HOME>/bin/emctl stop dbconsole
$ lsnrctl stop
7、解压补丁包。
[root@node1 ~]# cd /u01
[root@node1 ~]# chown -R grid:oinstall p19440385_112030_Linux-x86-64.zip
[root@node1 ~]# su - grid
node1-> cd /u01
node1-> mkdir patch
node1-> unzip p19440385_112030_Linux-x86-64.zip -d patch/
8、检查补丁是否有冲突。
$ /$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patch/ -oh $ORACLE_HOME
9、安装补丁。
使用root用户去安装可以同时给GI和DB打补丁。补丁包赋予grid:oinstall权限,opatch工具GI的opatch工具。
# opatch auto <UNZIPPED_PATCH_LOCATION> -ocmrf <ocm response file>
/u01/app/11.2.0/grid/OPatch/opatch auto /u01/patch/ -ocmrf /u01/app/11.2.0/grid/OPatch/ocm/bin/ocm.rsp
10、安装过程日志报下面错误,原因为磁盘空间不够,删除大的文件,释放磁盘空间,则PSU打补丁成功。
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.6
OUI version : 11.2.0.3.0
Log file location : /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2015-01-30_18-56-20下午_1.log
Verifying environment and performing prerequisite checks...
Prerequisite check "CheckSystemSpace" failed.
The details are:
Required amount of space(6601.28MB) is not available.
UtilSession 失败:
Prerequisite check "CheckSystemSpace" failed.
Log file location: /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2015-01-30_18-56-20下午_1.log
OPatch failed with error code 73
2015-01-30 18:56:24: patch /u01/patch/17592127 apply failed for home /u01/app/11.2.0/grid
2015-01-30 18:56:24: Performing Post patch actions
2015-01-30 18:56:24: norestart flag is set to
2015-01-30 18:56:24: Opening file /etc/oracle/ocr.loc
2015-01-30 18:56:24: Value (FALSE) is set for key=local_only
2015-01-30 18:56:24: Oracle user for /u01/app/11.2.0/grid is grid
2015-01-30 18:56:24: Oracle user for /u01/app/11.2.0/grid is grid
2015-01-30 18:56:24: Running as user grid: /u01/app/11.2.0/grid/bin/emctl start dbconsole
2015-01-30 18:56:24: s_run_as_user2: Running /bin/su grid -c ' /u01/app/11.2.0/grid/bin/emctl start dbconsole '
2015-01-30 18:56:24: Removing file /tmp/filewRBYdq
2015-01-30 18:56:24: Successfully removed file: /tmp/filewRBYdq
2015-01-30 18:56:24: /bin/su exited with rc=13
11、更新数据字典。
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql psu apply
SQL> QUIT
12、查询新安装的补丁集。
SQL> select action,comments from registry$history;
ACTION COMMENTS
------------------------------ ------------------------------
APPLY Patchset 11.2.0.2.0
APPLY Patchset 11.2.0.2.0
APPLY PSU 11.2.0.3.12
ROLLBACK PSU 11.2.0.3.12
APPLY Patchset 11.2.0.2.0
APPLY PSU 11.2.0.3.12
相关文章推荐
- 测试环境ORACLE 11g单实例打11.2.0.3.13 p19769496 PSU操作流程
- VMware搭建Oracle 11g RAC测试环境 For Linux
- VMware搭建Oracle 11g RAC测试环境 For Linux
- Oracle 11g RAC自动打GI PSU补丁(11.2.0.4.8)
- Oracle 11g RAC手动打GI PSU补丁(11.2.0.4.8)
- Oracle 11g R2(11.2.0.3.0) RAC环境搭建(二)
- Oracle 11g RAC 环境下单实例非缺省监听及端口配置
- Oracle 11g R2(11.2.0.3.0) RAC环境搭建(八)
- Oracle Study之案例--Oracle 11g RAC环境下手工建库
- Oracle 11g RAC 环境下单实例非缺省监听及端口配置
- 修改db编码的办法:(在oracle 11g上通过测试)
- oracle linux 5.8安装oracle 11g rac 第二章:配置虚拟主机,环境准备
- Oracle 11g R2(11.2.0.3.0) RAC环境搭建(一)
- Oracle 11g单实例GI and DB升级
- Linux 6.4下oracle 11g RAC安装前环境配置
- 【数据库基础】 Oracle DB基本操作(11g E)
- Oracle 11g R2(11.2.0.3.0) RAC环境搭建(六)
- Oracle 11g R2(11.2.0.3.0) RAC环境搭建(五)
- Oracle 11g RAC操作DBCA期间报ORA-04031错误
- oracle 11g rac 环境(1)