Two Methods for patching Grid Infrastructure are described in detail.

Source: Internet
Author: User

Two Methods for patching Grid Infrastructure are described in detail.

Patching is an important task for system administrators. Oracle Grid Infrastructure is currently a complex cluster management middleware. In the case of various strange problems, seeking for official service support (MOS) and patching is the most common practice.

Different from the patch for a single-Instance file system database, the patch process for GI (Grid Infrastructure) involves the relationship between ASM, Listener, and Database Instance. At the same time, some key skeleton backend processes, such as ohasd, also require root permissions.

In this article, I mainly demonstrate two common methods of patching GI based on two OPatch patch policies: Apply and Auto.

1. experiment environment Introduction

I chose Oracle 11gR2 for testing. The GI version is 11.2.0.4.

[Grid @ NCR-Standby-Asm ~] $ Sqlplus/nolog

SQL * Plus: Release 11.2.0.4.0 Production on Wed May 27 09:32:18 2015

Copyright (c) 1982,201 3, Oracle. All rights reserved.

SQL> conn/as sysasm

Connected.

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

Note: according to the official Oracle comments, OPatch is an important tool for patching. Each patch solves different faults, and the installation methods are also different. Strict installation steps, backup, and rollback measures are important steps to ensure patch installation. In addition, you need to download the latest version of the OPatch package from MOS and replace the package under $ ORACLE_HOME.

2. OPatch Apply policy patch

Unlike Oracle instances, the GI mechanism is more complex. The basic ohasd and so on are all processes bound to the init Level of the operating system. When using the OPatch Apply policy for patching, pay attention to the operation prerequisites and steps to ensure that the related process service is disabled.

First, extract the patch package.

[Root @ NCR-Standby-Asm upload] # ls-l

Total 282780

Drwxr-xr-x 4 oracle oinstall 4096 Oct 20 2014

-Rw-r -- 1 oracle oinstall 407030 May 25 p19852360_112040_Generic.zip

NOTE: Refer to the patch installation document to determine which user to use to perform the patch operation. Generally, GI patches are applied. It is common to use grid. At the same time, pay attention to permission issues. It is best to "manually reduce" the patch package permissions to avoid troubles.

[Root @ NCR-Standby-Asm upload] # chown-R grid: oinstall 19852360/

[Root @ NCR-Standby-Asm upload] # ls-l

Total 282780

Drwxr-xr-x 4 grid oinstall 4096 Oct 20 2014

Before patching, you must use the prereq method of opatch to check the patch compatibility and detect problems as soon as possible to avoid rollback.

[Grid @ NCR-Standby-Asm upload] $ cd 19852360/

[Grid @ NCR-Standby-Asm 19852360] $ opatch prereq CheckConflictAgainstOHWithDetail-ph ./

Oracle Interim Patch Installer version 11.2.0.3.10

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

PREREQ session

Oracle Home:/u01/app/grid/product/11.2.0/grid

Central Inventory:/u01/app/oraInventory

From:/u01/app/grid/product/11.2.0/grid/oraInst. loc

OPatch version: 11.2.0.3.10

OUI version: 11.2.0.4.0

Log file location:/u01/app/grid/product/11.2.0/grid/export toollogs/opatch/opatch2015-05-25_09-57-08AM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

Disable listeners, database servers, and all JDBC-related components as required.

[Grid @ NCR-Standby-Asm ~] $ Crsctl stat res-t-init

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

Name target state server STATE_DETAILS

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

Local Resources

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

Ora. DATA. dg

Online offline ncr-standby-asm

Ora. LISTENER. lsnr

OFFLINE ncr-standby-asm

Ora. RECO. dg

Online offline ncr-standby-asm

Ora. asm

OFFLINE ncr-standby-asm Instance Shutdown

Ora. ons

OFFLINE ncr-standby-asm

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

Cluster Resources

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

Ora.css d

1 ONLINE ncr-standby-asm

Ora. diskmon

1 OFFLINE

Ora. evmd

1 ONLINE ncr-standby-asm

Ora. sicsstb. db

1 OFFLINE Instance Shutdown

Execute the lock script. Due to the working principle of some GI processes, execute a special root script before applying the patch to continue locking the process (the scripts in RAC and Non-rac gi architectures are different, note ).

[Grid @ NCR-Standby-Asm 19852360] $ env | grep ORACLE_HOME

ORACLE_HOME =/u01/app/grid/product/11.2.0/grid

[Root @ NCR-Standby-Asm ~] # Cd/u01/app/grid/product/11.2.0/grid

[Root @ NCR-Standby-Asm grid] # cd crs/install/

[Root @ NCR-Standby-Asm install] #./roothas. pl-unlock

Using configuration parameter file:./crsconfig_params

Successfully unlock/u01/app/grid/product/11.2.0/grid

Patch action.

[Grid @ NCR-Standby-Asm 19852360] $ opatch apply

Oracle Interim Patch Installer version 11.2.0.3.10

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

Oracle Home:/u01/app/grid/product/11.2.0/grid

Central Inventory:/u01/app/oraInventory

From:/u01/app/grid/product/11.2.0/grid/oraInst. loc

OPatch version: 11.2.0.3.10

OUI version: 11.2.0.4.0

Log file location:/u01/app/grid/product/11.2.0/grid/export toollogs/opatch/19852360_May_25_2015_10_02_26/apply2015-05-25_10-02-26AM_1.log

Applying interim patch '000000' to oh'/u01/app/grid/product/11.2.0/grid'

Verifying environment and padding Ming prerequisite checks...

All checks passed.

Provide your email address to be informed of security issues, install and

Initiate Oracle Configuration Manager. Easier for you if you use your My

Oracle Support Email address/User Name.

Visit http://www.oracle.com/support/policies.html for details.

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

Backing up files...

Patching component oracle. dbjava. jdbc, 11.2.0.4.0...

Patching component oracle. dbjava. ic, 11.2.0.4.0...

Verifying the update...

Patch 19852360 successfully applied

Log file location:/u01/app/grid/product/11.2.0/grid/export toollogs/opatch/19852360_May_25_2015_10_02_26/apply2015-05-25_10-02-26AM_1.log

OPatch succeeded.

Execute the script to lock the GI process.

[Root @ NCR-Standby-Asm install] #./roothas. pl-patch

Using configuration parameter file:./crsconfig_params

CRS-4123: Oracle High Availability Services has been started

Use the opatch program to verify that the patch operation is successful.

[Grid @ NCR-Standby-Asm 19852360] $ opatch lsinventory

Oracle Interim Patch Installer version 11.2.0.3.10

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

Oracle Home:/u01/app/grid/product/11.2.0/grid

Central Inventory:/u01/app/oraInventory

From:/u01/app/grid/product/11.2.0/grid/oraInst. loc

OPatch version: 11.2.0.3.10

OUI version: 11.2.0.4.0

Log file location:/u01/app/grid/product/11.2.0/grid/export toollogs/opatch/opatch2015-05-25_10-03-07AM_1.log

Lsinventory Output file location:/u01/app/grid/product/11.2.0/grid/export toollogs/opatch/lsinv/lsinventory2015-05-25_10-03-07AM.txt

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

Local Machine Information ::

Hostname: localhost

ARU platform id: 226

ARU platform description: Linux x86-64

Installed Top-level Products (1 ):

Oracle Grid Infrastructure 11g 11.2.0.4.0

There are 1 products installed in this Oracle Home.

Interim patches (1 ):

Patch 19852360: applied on Mon May 25 10:02:48 CST 2015

Unique Patch ID: 18170553

Created on 20 Oct 2014, 08:17:43 hrs PST8PDT

Bugs fixed:

19852360

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

OPatch succeeded.

Patch installed successfully.

The following describes the auto patching method of opatch.

For more details, please continue to read the highlights on the next page:

  • 1
  • 2
  • Next Page
[Content navigation]
Page 1: Up Page 1: Bottom

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.