【kingsql分享】Oracle 18c RAC补丁升级实战【DBRU】

一.补丁编号

2******5


二.升级步骤

1.查看Oracle CRS版本信息

[grid@rac02 ~]$ crsctl query crs softwareversion

Oracle Clusterware version on node [rac02] is [18.0.0.0.0]


2.检查数据库RDBMS版本

SQL> select * from v$version;

 

BANNER

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

BANNER_FULL

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

BANNER_LEGACY

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

    CON_ID

----------

Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production

Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production

Version 18.4.0.0.0

Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production

         0


3.检查是否已安装2******5补丁

[oracle@rac02 ~]$ /u01/app/oracle/product/18.0.0.0/db_1/OPatch/opatch lsinventory -all -oh $ORACLE_HOME


4.检查当前Opatch版本

[oracle@rac02 ~]$ $ORACLE_HOME/OPatch/opatch version

OPatch Version: 12.2.0.1.16


OPatch succeeded.


5.备份数据库


6.清理补丁备份目录中的无效备份集

[oracle@rac02 ~]$ $ORACLE_HOME/OPatch/opatch util cleanup

Oracle Interim Patch Installer version 12.2.0.1.16

Copyright (c) 2018, Oracle Corporation.  All rights reserved.



Oracle Home       : /u01/app/oracle/product/18.0.0.0/db_1

Central Inventory : /u01/app/oraInventory

   from           : /u01/app/oracle/product/18.0.0.0/db_1/oraInst.loc

OPatch version    : 12.2.0.1.16

OUI version       : 12.2.0.4.0

Log file location : /u01/app/oracle/product/18.0.0.0/db_1/cfgtoollogs/opatch/opatch2018-11-29_06-21-05AM_1.log


Invoking utility "cleanup"

OPatch will clean up 'restore.sh,make.txt' files and 'scratch,backup' directories.

You will be still able to rollback patches after this cleanup.

Do you want to proceed? [y|n]

y

User Responded with: Y


Backup area for restore has been cleaned up. For a complete list of files/directories

deleted, Please refer log file.


OPatch succeeded.


7.查看“$ORACLE_HOME”目录空间

du -sk $ORACLE_HOME


8.检查磁盘空间

df -lh


9.关闭集群

[root@rac02 grid]# crsctl stop has


10.安装补丁

[oracle@rac02 ~]$ unzip p2******5_184000DBRU_Linux-x86-64.zip 

Archive:  p2******5_184000DBRU_Linux-x86-64.zip

   creating: 2******5/

   creating: 2******5/etc/

   creating: 2******5/etc/config/

  inflating: 2******5/etc/config/actions.xml  

  inflating: 2******5/etc/config/inventory.xml  

   creating: 2******5/files/

   creating: 2******5/files/lib/

   creating: 2******5/files/lib/libserver18.a/

  inflating: 2******5/files/lib/libserver18.a/kxfp.o  

  inflating: 2******5/README.txt 


[oracle@rac02 2******5]$ /u01/app/oracle/product/18.0.0.0/db_1/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./

Oracle Interim Patch Installer version 12.2.0.1.16

Copyright (c) 2018, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/18.0.0.0/db_1

Central Inventory : /u01/app/oraInventory

   from           : /u01/app/oracle/product/18.0.0.0/db_1/oraInst.loc

OPatch version    : 12.2.0.1.16

OUI version       : 12.2.0.4.0

Log file location : /u01/app/oracle/product/18.0.0.0/db_1/cfgtoollogs/opatch/opatch2018-11-29_06-52-40AM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.


[oracle@rac02 2******5]$ /u01/app/oracle/product/18.0.0.0/db_1/OPatch/opatch apply

Oracle Interim Patch Installer version 12.2.0.1.16

Copyright (c) 2018, Oracle Corporation.  All rights reserved.

Oracle Home       : /u01/app/oracle/product/18.0.0.0/db_1

Central Inventory : /u01/app/oraInventory

   from           : /u01/app/oracle/product/18.0.0.0/db_1/oraInst.loc

OPatch version    : 12.2.0.1.16

OUI version       : 12.2.0.4.0

Log file location : /u01/app/oracle/product/18.0.0.0/db_1/cfgtoollogs/opatch/opatch2018-11-29_06-34-52AM_1.log

Verifying environment and performing prerequisite checks...

OPatch continues with these patches:   2******5  

Do you want to proceed? [y|n]

y

User Responded with: Y

All checks passed.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.

(Oracle Home = '/u01/app/oracle/product/18.0.0.0/db_1')

Is the local system ready for patching? [y|n]

y

User Responded with: Y

Backing up files...

Applying interim patch '2******5' to OH '/u01/app/oracle/product/18.0.0.0/db_1'

Patching component oracle.rdbms, 18.0.0.0.0...

Patch 2******5 successfully applied.

Log file location: /u01/app/oracle/product/18.0.0.0/db_1/cfgtoollogs/opatch/opatch2018-11-29_06-34-52AM_1.log

OPatch succeeded.


11.启动集群

启动集群[root@rac02 grid]# crsctl start has

CRS-4123: Oracle High Availability Services has been started.


12.如果需要回退

[oracle@rac02 ~]$ $ORACLE_HOME/OPatch/opatch rollback -id 2******5 -local -oh $ORACLE_HOME

Oracle Interim Patch Installer version 12.2.0.1.16

Copyright (c) 2018, Oracle Corporation.  All rights reserved.

Oracle Home       : /u01/app/oracle/product/18.0.0.0/db_1

Central Inventory : /u01/app/oraInventory

   from           : /u01/app/oracle/product/18.0.0.0/db_1/oraInst.loc

OPatch version    : 12.2.0.1.16

OUI version       : 12.2.0.4.0

Log file location : /u01/app/oracle/product/18.0.0.0/db_1/cfgtoollogs/opatch/opatch2018-11-29_06-49-25AM_1.log

Patches will be rolled back in the following order: 

   2******5

The following patch(es) will be rolled back: 2******5  

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.

(Oracle Home = '/u01/app/oracle/product/18.0.0.0/db_1')

Is the local system ready for patching? [y|n]

y

User Responded with: Y

Rolling back patch 2******5...

RollbackSession rolling back interim patch '2******5' from OH '/u01/app/oracle/product/18.0.0.0/db_1'

Patching component oracle.rdbms, 18.0.0.0.0...

RollbackSession removing interim patch '2******5' from inventory

Log file location: /u01/app/oracle/product/18.0.0.0/db_1/cfgtoollogs/opatch/opatch2018-11-29_06-49-25AM_1.log

OPatch succeeded.


另附说明书

Oracle Database 18 Release 18.4.0.0.181016DBRU

PARALLEL QUERY Patch for Bug# 2******5 for Linux-x86-64 Platforms

This patch is RAC Rolling Installable  - Please read My Oracle Support Document 244241.1 https://support.us.oracle.com/oip/faces/secure/km/DocumentDisplay.jspx?id=244241.1 

Rolling Patch - OPatch Support for RAC.

This patch is Data Guard Standby-First Installable - Please read My Oracle Support Note 1265700.1 https://support.us.oracle.com/oip/faces/secure/km/DocumentDisplay.jspx?id=1265700.1

Oracle Patch Assurance - Data Guard Standby-First Patch Apply for details on how to remove risk and reduce downtime when applying this patch. 

Released: Fri Dec 14 13:30:31 2018

This document describes how you can install the PARALLEL QUERY overlay patch for bug#  2******5 on your Oracle Database 18 Release 18.4.0.0.181016DBRU

 (I) Prerequisites

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

Before you install or deinstall the patch, ensure that you meet the following requirements:

Note: In case of an Oracle RAC environment, meet these prerequisites on each of the nodes.

1.Ensure that the Oracle home on which you are installing the patch or from which you are rolling back the patch is Oracle Database 18 Release 18.4.0.0.181016DBRU.

2.Ensure that 18 Release 18.4.0.0.181016DBRU Patch Set Update (PSU) 28655784 is already applied on the Oracle Database.

3. Ensure that you have OPatch 18 Release 12.2.0.1.14 or higher. Oracle recommends that you use the latest version available for  18 Release 12.2.0.1.14. 

Note:

If you do not have OPatch 18 Release 12.2.0.1.14 or the latest version available for 18 Release 12.2.0.1.14, then download it from patch# 6880880 for  12.2.0.1.14.

For information about OPatch documentation, including any known issues, see My Oracle Support Document 293369.1 OPatch documentation list:

https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=224346.1

4.Ensure that you set (as the home user) the ORACLE_HOME environment variable to the Oracle home.

5.Ensure that the $PATH definition has the following executables: make, ar, ld and nm. The location of these executables depends on your operating system. On many operating systems, they are located in /usr/ccs/bin.

6.Ensure that you verify the Oracle Inventory because OPatch accesses it to install the patches. To verify the inventory, run the following command.

       $ opatch lsinventory 

Note:

-If this command succeeds, it will list the Top-Level Oracle Products and one-off patches if any that are installed in the Oralce Home.

- Save the output so you have the status prior to the patch apply.

-If the command displays some errors, then contact Oracle Support and resolve the issue first before proceeding further.

7.(Only for Installation) Maintain a location for storing the contents of the patch ZIP file. In the rest of the document, this location (absolute path) is referred to as <PATCH_TOP_DIR>. Extract the contents of the patch ZIP file to the location (PATCH_TOP_DIR) you have created above. To do so, run the following command:

$ unzip -d <PATCH_TOP_DIR>  p2******5_184000DBRU_Linux-x86-64.zip 

8.(Only for Installation) Determine whether any currently installed interim patches conflict with this patch 2******5 as shown below:

$ cd <PATCH_TOP_DIR>/2******5

$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./

The report will indicate the patches that conflict with this patch and the patches for which the current 2******5 is a superset.

Note:

When OPatch starts, it validates the patch and ensures that there are no conflicts with the software already installed in the ORACLE_HOME. OPatch categorizes conflicts into the following types: 

-Conflicts with a patch already applied to the ORACLE_HOME that is a subset of the patch you are trying to apply  - In this case, continue with the patch installation because the new patch contains all the fixes from the existing patch in the ORACLE_HOME. The subset patch will automatically be rolled back prior to the installation of the new patch.

-Conflicts with a patch already applied to the ORACLE_HOME - In this case, stop the patch installation and contact Oracle Support Services.

9.Ensure that you shut down all the services running from the Oracle home.

Note:

-For a Non-RAC environment, shut down all the services running from the Oracle home. 

-For a RAC environment, shut down all the services (database, ASM, listeners, nodeapps, and CRS daemons) running from the Oracle home of the node you want to patch. After you patch this node, start the services on this node.Repeat this process for each of the other nodes of the Oracle RAC system. OPatch is used on only one node at a time.

(II) Installation  

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

To install the patch, follow these steps:

1.Set your current directory to the directory where the patch is located and then run the OPatch utility by entering the following commands:

$ cd <PATCH_TOP_DIR>/2******5

$ opatch apply

2.Verify whether the patch has been successfully installed by running the following command:

$ opatch lsinventory

3.Start the services from the Oracle home.

(III) Deinstallation

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

Ensure to follow the Prerequsites (Section I). To deinstall the patch, follow these steps:

1.Deinstall the patch by running the following command:

$ opatch rollback -id 2******5

2.Start the services from the Oracle home.

3.Ensure that you verify the Oracle Inventory and compare the output with the one run before the patch installation and re-apply any patches that were rolled back as part of this patch apply. To verify the inventory, run the following command:

$ opatch lsinventory


转载请注明出处


本来好几年没有更新博客了,最近我的学生们都在勤劳的写博客,所以带动了我。。

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

我曾发现有写网站直接拷贝粘贴,连图片都能复制,请把作者也加上谢谢O(∩_∩)O

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


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/28389881/viewspace-2305487/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/28389881/viewspace-2305487/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值