您的位置:首页 > 数据库 > Oracle

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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息