How to install or roll back small patches on the RAC database by Rolling

Source: Internet
Author: User
When installing a small patch on the RAC database, you can use Rolling installation to stop the service. That is to say, when installing the patch, you must first stop a database instance.

When installing a small patch on the RAC database, you can use Rolling installation to stop the service. That is to say, when installing the patch, you must first stop a database instance.

When installing a small patch on the RAC database, you can use Rolling installation to stop the service. That is to say, when installing the patch, stop a database instance first, install the patch on this node, start the instance, stop the next instance, and install the patch. This ensures that there are always available database instances and the business can continue.

The premise of Rolling Installation is that the patch can be Rolling installed. The following article will discuss how to determine whether a patch is Rolling.

In general, the general Rolling Installation Method is as follows:

1. download the patch.

2. Back up the database before patching.

3. Check whether the installed patch conflicts with the previous patch.

4. If you have a test library, you 'd better test the patch in the Test Library first.

5. Read the patch Readme carefully and install the patch according to the steps below:
1). Use Oracle users to upload the patch to a directory on the server.
2) decompress the file:
3). Stop all database instances and ASM instances under ORACLE_HOME on Host 1 (if any );
4) Install patches on Server 1:
$ Cd $ ORACLE_HOME/OPatch/10082277
$ Opatch apply
5). Then opatch will ask you if you want to create a node. Then, perform the following operations:
6). Start all database instances and ASM instances under ORACLE_HOME on Host 1 (if any );
7). Stop all database instances and ASM instances under ORACLE_HOME on host 2 (if any );
8). Confirm to continue hitting the next node at the patch prompt;
9). Start all database instances + ASM instances under ORACLE_HOME on host 2 (if any );
10). If there are multiple nodes, execute them in sequence.


The following is the Rolling process of installing patch 8575528 on 10.2.0.4 RAC:

1). Use oracle users to upload the patch to a directory on the server, for example, under $ ORACLE_HOME/OPatch.

$ Pwd
/U01/app/oracle/OPatch
$ Ls
Docs emdpatch. pl jlib opatch. ini opatch. pl opatchprereqs p8575528_10204_Linux-x86.zip

2) decompress the file:
Su-oracle
$ Unzip p8575528_10204_Linux-x86.zip
Archive: p8575528_10204_Linux-x86.zip
Creating: 8575528/
Creating: 8575528/files/
Creating: 8575528/files/lib/
Creating: 8575528/files/lib/libserver10.a/
Inflating: 8575528/files/lib/libserver10.a/kks1.o
Inflating: 8575528/files/lib/libserver10.a/kksc. o
Inflating: 8575528/files/lib/libserver10.a/kksh. o
Inflating: 8575528/files/lib/libserver10.a/ksmp. o
Creating: 8575528/etc/
Creating: 8575528/etc/config/
Inflating: 8575528/etc/config/inventory
Inflating: 8575528/etc/config/actions
Creating: 8575528/etc/xml/
Inflating: 8575528/etc/xml/GenericActions. xml
Inflating: 8575528/etc/xml/ShiphomeDirectoryStructure. xml
Inflating: 8575528/README.txt
$ Ls
8575528 docs emdpatch. pl jlib opatch. ini opatch. pl opatchprereqs p8575528_10204_Linux-x86.zip

3) check whether the patch can be rolled on RAC ).
$ ORACLE_HOME/OPatch/opatch query-all/u01/app/oracle/OPatch/8575528 | grep rolling
Patch is a rolling patch: true <==== you can scroll through the installation

4). Stop all database instances in ORACLE_HOME of database No. 1 (if there is ASM, stop it ):
$ Srvctl stop instance-d -I
$ Srvctl stop asm-n

For example:

$ Srvctl stop instance-d ONEPIECE-I ONEPIECE1
$ Srvctl stop asm-n nascds14
$ Crs_stat-t
Name Type Target State Host
------------------------------------------------------------
Ora... E1.inst application OFFLINE
Ora... SM1.asm application OFFLINE

5) Install patches on Server 1:
For example:
$ Su-oracle
$ Cd/u01/app/oracle/OPatch/8575528
$ Opatch apply

Invoking OPatch 10.2.0.4.2

Oracle Interim Patch Installer version 10.2.0.4.2
Copyright (c) 2007, Oracle Corporation. All rights reserved.


Oracle Home:/u01/app/oracle
Central Inventory:/home/oracle/oraInventory
From:/etc/oraInst. loc
OPatch version: 10.2.0.4.2
OUI version: 10.2.0.4.0
OUI location:/u01/app/oracle/oui
Log file location:/u01/app/oracle/export toollogs/opatch/opatch2012-06-13_01-27-38AM.log

ApplySession applying interim patch '000000' to oh'/u01/app/oracle'

Running prerequisite checks...

OPatch detected the node list and the local node from the inventory. OPatch will patch the local system then

Propagate the patch to the remote nodes.


This node is part of an Oracle Real Application Cluster.
Remote nodes: 'nascds15'
Local node: 'nascds14'
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle ')


Is the local system ready for patching? [Y | n]
Y <= input y
User Responded with: Y
Backing up files and inventory (not for auto-rollback) for the Oracle Home
Backing up files affected by the patch '000000' for restore. This might take a while...
Backing up files affected by the patch '000000' for rollback. This might take a while...

Patching component oracle. rdbms, 10.2.0.4.0...
Updating archive file "/u01/app/oracle/lib/libserver10.a" with "lib/libserver10.a/kkks1.o"
Updating archive file "/u01/app/oracle/lib/libserver10.a" with "lib/libserver10.a/kkksc. o"
Updating archive file "/u01/app/oracle/lib/libserver10.a" with "lib/libserver10.a/kkksh. o"
Updating archive file "/u01/app/oracle/lib/libserver10.a" with "lib/libserver10.a/ksmp. o"
Running make for target ioracle
ApplySession adding interim patch '000000' to inventory

Verifying the update...
Inventory check OK: Patch ID 8575528 is registered in Oracle Home inventory with proper meta-data.
Files check OK: Files from Patch ID 8575528 are present in Oracle Home.

The local system has been patched. You can restart Oracle instances on it.


Patching in rolling mode.


The node 'nascds15' will be patched next.


Please shutdown Oracle instances running out of this ORACLE_HOME on 'nascds15 '.
(Oracle Home = '/u01/app/oracle ')

Is the node ready for patching? [Y | n]

6). Then opatch will ask if you want to create a node. In this case, perform the following operations.

7). Start the ASM instance and database instance of machine 1:
$ Srvctl start asm-n
$ Srvctl start instance-d -I

For example:
$ Srvctl start asm-n nascds14
$ Srvctl start instance-d ONEPIECE-I ONEPIECE1

$ Crs_stat-t
Ora... E1.inst application ONLINE nascds14
Ora... SM1.asm application ONLINE nascds14

8). Stop the ASM instance and database instance of Machine 2:
$ Srvctl stop instance-d -I
$ Srvctl stop asm-n

$ Srvctl stop instance-d ONEPIECE-I ONEPIECE2
$ Srvctl stop asm-n nascds15
$ Crs_stat
Ora... E2.inst application OFFLINE
Ora... SM2.asm application OFFLINE

9) at the prompt that you installed the patch, confirm to continue hitting the next node.
Is the node ready for patching? [Y | n]
Y <= input y
User Responded with: Y
Updating nodes 'nascds15'
Apply-related files are:
FP = "/u01/app/oracle/. patch_storage/8575528_Aug_17_2010_07_56_36/rac/copy_files.txt"
DP = "/u01/app/oracle/. patch_storage/8575528_Aug_17_2010_07_56_36/rac/copy_dirs.txt"
MP = "/u01/app/oracle/. patch_storage/8575528_Aug_17_2010_07_56_36/rac/make_cmds.txt"
RC = "/u01/app/oracle/. patch_storage/8575528_Aug_17_2010_07_56_36/rac/remote_cmds.txt"

Instantiating the file "/u01/app/oracle/. patch_storage/8575528_Aug_17_2010_07_56_36/rac/copy_files.txt.instantiated"

By replacing $ ORACLE_HOME in "/u01/app/oracle/. patch_storage/8575528_Aug_17_2010_07_56_36/rac/copy_files.txt"

Actual path.
Propagating files to remote nodes...
Instantiating the file "/u01/app/oracle/. patch_storage/8575528_Aug_17_2010_07_56_36/rac/copy_dirs.txt.instantiated"

By replacing $ ORACLE_HOME in "/u01/app/oracle/. patch_storage/8575528_Aug_17_2010_07_56_36/rac/copy_dirs.txt"

Actual path.
Propagating directories to remote nodes...
Instantiating the file "/u01/app/oracle/. patch_storage/8575528_Aug_17_2010_07_56_36/rac/make_cmds.txt.instantiated"

By replacing $ ORACLE_HOME in "/u01/app/oracle/. patch_storage/8575528_Aug_17_2010_07_56_36/rac/make_cmds.txt"

Actual path.
Running command on remote node 'nascds15 ':
Cd/u01/app/oracle/rdbms/lib;/usr/bin/make-f ins_rdbms.mk ioracle ORACLE_HOME =/u01/app/oracle | echo

REMOTE_MAKE_FAILED:> & 2


The node 'nascds15' has been patched. You can restart Oracle instances on it.

There were relinks on remote nodes. Remember to check the binary size and timestamp on the nodes 'nascds15 '.
The following make commands were invoked on remote nodes:
'CD/u01/app/oracle/rdbms/lib;/usr/bin/make-f ins_rdbms.mk ioracle ORACLE_HOME =/u01/app/oracle
'


OPatch succeeded.

10) Start the ASM instance and database instance of Machine 2:
$ Srvctl start asm-n
$ Srvctl start instance-d -I

For example:
$ Srvctl start asm-n nascds15
$ Srvctl start instance-d ONEPIECE-I ONEPIECE2

11) execute the following commands on the two nodes to verify that the patch has been installed successfully.
$ ORACLE_HOME/OPatch/opatch lsinventory

[Oracle @ nascds14 8575528] $ ORACLE_HOME/OPatch/opatch lsinventory
Invoking OPatch 10.2.0.4.2

Oracle Interim Patch Installer version 10.2.0.4.2
Copyright (c) 2007, Oracle Corporation. All rights reserved.


Oracle Home:/u01/app/oracle
Central Inventory:/home/oracle/oraInventory
From:/etc/oraInst. loc
OPatch version: 10.2.0.4.2
OUI version: 10.2.0.4.0
OUI location:/u01/app/oracle/oui
Log file location:/u01/app/oracle/export toollogs/opatch/opatch2012-06-13_01-44-11AM.log

Lsinventory Output file location:/u01/app/oracle/export toollogs/opatch/lsinv/lsinventory2012-06-13_01-44-11AM.txt

--------------------------------------------------------------------------------
Installed Top-level Products (2 ):

Oracle Database 10g 10.2.0.1.0
Oracle Database 10g Release 2 Patch Set 3 10.2.0.4.0
There are 2 products installed in this Oracle Home.


Interim patches (1 ):

Patch 8575528: applied on Wed Jun 13 01:28:24 CST 2012 <
Created on 17 Aug 2010, 07:56:36 hrs PST8PDT
Bugs fixed:
8575528



Rac system comprising of multiple nodes
Local node = nascds14
Remote node = nascds15

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

OPatch succeeded.
Rac system comprising of multiple nodes
Local node = nascds14
Remote node = nascds15

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

OPatch succeeded.

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.