Oracle11gR2 is an Oracle version that is widely used in new systems. According to the official roadmap, 11.2.0.4 is a version later than 11g. It should be said that after 11gR2, Oracle
Oracle 11gR2 is an Oracle version widely used in new systems. According to the official roadmap, 11.2.0.4 is a later version of The 11g version. It should be said that after 11gR2, Oracle
Oracle 11gR2 is an Oracle version widely used in new systems. According to the official roadmap, 11.2.0.4 is a later version of The 11g version. It should be said that after 11gR2, Oracle directly provides a complete upgrade version, you can directly install the Database System of the higher version, without the need to gradually upgrade from the basic version.
This document describes how to install Oracle patches on a single instance based on 11.2.0.4.
1. Patch packages and Environment Introduction
First, determine the database version. The author installs Oracle 11gR2 on a single instance, and the specific version is 11.2.0.4.
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
The patch file for the operation is as follows:
[Root @ XXX-PROD-DB upload] # cd patch/
[Root @ XXX-PROD-DB patch] # ls-l
Total 282772
-Rw-r --. 1 root 407030 Jul 15 09:03 p19852360_112040_Generic.zip
-Rw-r --. 1 root 71580583 Jul 15 p20299013_112040_Linux-x86-64.zip
-Rw-r --. 1 root 12335412 Jul 15 p20299015_112040_Linux-x86-64.zip
-Rw-r --. 1 root 40486165 Jul 15 p20406239_112040_Linux-x86-64.zip
-Rw-r --. 1 root 112087303 Jul 15 p20834611_112040_Linux-x86-64.zip
-Rw-r --. 1 root 52648436 Jul 15 p6880880_112000_Linux-x86-64.zip
Note: p6880880_112000_linux-x86-64.zip is the latest version of OPatch. In general, the latest OPatch must be updated when patching.
2. Upgrade OPatch Components
First, you must upgrade the OPatch component in overwriting mode.
[Oracle @ XXX-PROD-DB ~] $ Cd $ ORACLE_HOME
[Oracle @ XXX-PROD-DB dbhome_1] $ ls-l | grep OPatch
Drwxr-xr-x. 8 oracle oinstall 4096 Jul 16 OPatch
Back up the OPatch directory and replace it with the decompressed zip file.
[Oracle @ XXX-PROD-DB dbhome_1] $ cp/upload/patch/p6880880_112000_Linux-x86-64.zip $ ORACLE_HOME
[Oracle @ XXX-PROD-DB dbhome_1] $ ls-l | grep p6880880_112000_Linux-x86-64.zip
-Rw-r --. 1 oracle oinstall 52648436 Aug 4 p6880880_112000_Linux-x86-64.zip
[Oracle @ XXX-PROD-DB dbhome_1] $ mv OPatch OPatch_BK
[Oracle @ XXX-PROD-DB dbhome_1] $ ls-l | grep OPatch
Drwxr-xr-x. 8 oracle oinstall 4096 Jul 16 OPatch_BK
Decompress the OPatch file.
[Root @ XXX-PROD-DB ~] # Cd/u01/app/oracle/product/11.2.0/dbhome_1
[Root @ XXX-PROD-DB dbhome_1] # ls-l | grep p6880880_112000_Linux-x86-64.zip
-Rw-r --. 1 oracle oinstall 52648436 Aug 4 p6880880_112000_Linux-x86-64.zip
[Root @ XXX-PROD-DB dbhome_1] # unzip p6880880_112000_Linux-x86-64.zip
[Root @ XXX-PROD-DB dbhome_1] # ls-l | grep OPatch
Drwxr-x ---. 10 root 4096 Mar 31 OPatch
Drwxr-xr-x. 8 oracle oinstall 4096 Jul 16 OPatch_BK
[Root @ XXX-PROD-DB dbhome_1] # chown-R oracle: oinstall OPatch
[Root @ XXX-PROD-DB dbhome_1] # ls-l | grep OPatch
Drwxr-x ---. 10 oracle oinstall 4096 Mar 31 OPatch
Drwxr-xr-x. 8 oracle oinstall 4096 Jul 16 OPatch_BK
OPatch is a Command Script tool. For convenience, you can add it to the PATH environment variable.
[Oracle @ XXX-PROD-DB dbhome_1] $ cd ~
[Oracle @ XXX-PROD-DB ~] $ Vi. bash_profile
(Space reasons, omitted ......)
ORACLE_SID = XXXCDB
ORACLE_BASE =/u01/app/oracle
ORACLE_HOME =/u01/app/oracle/product/11.2.0/dbhome_1
PATH = $ PATH: $ ORACLE_HOME/bin:/u01/app/oracle/product/11.2.0/dbhome_1/OPatch
Export ORACLE_SID
Export ORACLE_BASE
Export ORACLE_HOME
Export PATH
". Bash_profile" 23L, 409C written
View the OPatch version.
[Oracle @ XXX-PROD-DB ~] $ Opatch version
OPatch Version: 11.2.0.3.10
OPatch succeeded.
2. Patch 19852360_112040
Patch 19852360_112040 is a simple patch mainly for JDBC-related patch types. In principle, you do not need to shut down the database.
[Root @ XXX-PROD-DB patch] # unzip p19852360_112040_Generic.zip
Archive: p19852360_112040_Generic.zip
Creating: 19852360/
Inflating: 19852360/README.txt
Creating: 19852360/files/
Creating: 19852360/files/jdbc/
(Space reasons, omitted ......)
Inflating: 19852360/etc/xml/GenericActions. xml
Inflating: 19852360/etc/xml/ShiphomeDirectoryStructure. xml
Go to the decompressed directory. Note: Make sure that the file permissions of the patch file are set.
[Oracle @ XXX-PROD-DB ~] $ Cd/upload/patch/
[Oracle @ XXX-PROD-DB patch] $ ls-l
Total 282776
Drwxr-xr-x. 4 oracle oinstall 4096 Oct 20 2014 19852360
-Rw-r --. 1 root 407030 Jul 15 09:03 p19852360_112040_Generic.zip
[Oracle @ XXX-PROD-DB patch] $ cd 19852360/
[Oracle @ XXX-PROD-DB 19852360] $ ls-l
Total 20
Drwxr-xr-x. 4 oracle oinstall 4096 Oct 20 2014 etc
Drwxr-xr-x. 3 oracle oinstall 4096 Oct 20 2014 files
-Rw-r --. 1 oracle oinstall 10858 Oct 28 2014 README.txt
[Oracle @ XXX-PROD-DB 19852360] $
Note: There are no arguments about the experience of dba. when entering the patch, you must refer to the readme.txt file of each patch and follow the official steps. Using mature technologies and official steps is an important principle for us to ensure success.
First, check the patch prerequisites.
[Oracle @ XXX-PROD-DB 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/oracle/product/11.2.0/dbhome_1
Central Inventory:/u01/app/oraInventory
From:/u01/app/oracle/product/11.2.0/dbhome_1/oraInst. loc
OPatch version: 11.2.0.3.10
OUI version: 11.2.0.4.0
Log file location:/u01/app/oracle/product/11.2.0/dbhome_1/export toollogs/opatch/opatch2015-08-04_10-22-39AM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
If no problem is found, you can directly install the patch.
[Oracle @ XXX-PROD-DB 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/oracle/product/11.2.0/dbhome_1
Central Inventory:/u01/app/oraInventory
From:/u01/app/oracle/product/11.2.0/dbhome_1/oraInst. loc
OPatch version: 11.2.0.3.10
OUI version: 11.2.0.4.0
Log file location:/u01/app/oracle/product/11.2.0/dbhome_1/export toollogs/opatch/19852360_Aug_04_2015_10_21_09/apply2015-08-04_10-21-09AM_1.log
Applying interim patch '000000' to oh'/u01/app/oracle/product/11.2.0/dbhome_1'
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 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/oracle/product/11.2.0/dbhome_1/export toollogs/opatch/19852360_Aug_04_2015_10_21_09/apply2015-08-04_10-21-09AM_1.log
OPatch succeeded.
3. Patch 20299013_112040
Decompress the patch file:
[Root @ XXX-PROD-DB patch] # unzip p20299013_112040_Linux-x86-64.zip
Inflating: 20299013/18522509/files/lib/libserver11.a/qerel. o
Inflating: 20299013/18522509/files/lib/libserver11.a/knahs. o
(Space reasons, omitted ......)
Inflating: 20299013/18522509/etc/config/actions. xml
Inflating: 20299013/18522509/etc/config/inventory. xml
Inflating: PatchSearch. xml
Set the owner permission.
[Root @ XXX-PROD-DB patch] # chown-R oracle: oinstall 20299013/
[Root @ XXX-PROD-DB patch] # ls-l
Total 282840
Drwxr-xr-x. 4 oracle oinstall 4096 Oct 20 2014 19852360
Drwxrwxr-x. 8 oracle oinstall 4096 Mar 4 20299013
Patch 20299013_112040 is a patch set. It prevents multiple verified security patch sets and allows you to perform patch operations in a unified manner.
[Oracle @ XXX-PROD-DB 20299013] $ ls-l
Total 88
Drwxr-xr-x. 4 oracle oinstall 4096 Mar 4 17478514
Drwxr-xr-x. 4 oracle oinstall 4096 Mar 4 18031668
Drwxr-xr-x. 4 oracle oinstall 4096 Mar 4 18522509
Drwxr-xr-x. 4 oracle oinstall 4096 Mar 4 19121551
Drwxrwxr-x. 4 oracle oinstall 4096 Mar 4 19769489
Drwxrwxr-x. 4 oracle oinstall 4096 Mar 4 20299013
-Rw-r --. 1 oracle oinstall 3068 Mar 4 patchmd. xml
-Rw-r --. 1 oracle oinstall 54747 Apr 12 README.html
-Rw-r --. 1 oracle oinstall 21 Mar 4 18:30 README.txt
Perform a prerequisite check.
[Oracle @ XXX-PROD-DB 20299013] $ 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/oracle/product/11.2.0/dbhome_1
Central Inventory:/u01/app/oraInventory
From:/u01/app/oracle/product/11.2.0/dbhome_1/oraInst. loc
OPatch version: 11.2.0.3.10
OUI version: 11.2.0.4.0
Log file location:/u01/app/oracle/product/11.2.0/dbhome_1/export toollogs/opatch/opatch2015-08-04_10-28-53AM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
The verification is successful, indicating that there is no conflict between the current system installation patch and the patch to be installed. However, there is a problem when executing apply.
[Oracle @ XXX-PROD-DB 20299013] $ opatch apply
Oracle Interim Patch Installer version 11.2.0.3.10
Copyright (c) 2015, Oracle Corporation. All rights reserved.
Oracle Home:/u01/app/oracle/product/11.2.0/dbhome_1
Central Inventory:/u01/app/oraInventory
From:/u01/app/oracle/product/11.2.0/dbhome_1/oraInst. loc
OPatch version: 11.2.0.3.10
OUI version: 11.2.0.4.0
Log file location:/u01/app/oracle/product/11.2.0/dbhome_1/export toollogs/opatch/opatch2015-08-04_10-29-25AM_1.log
Verifying environment and padding Ming prerequisite checks...
Prerequisite check "CheckActiveFilesAndExecutables" failed.
The details are:
Following executables are active:
/U01/app/oracle/product/11.2.0/dbhome_1/bin/oracle
/U01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh. so.11.1
UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.
Log file location:/u01/app/oracle/product/11.2.0/dbhome_1/export toollogs/opatch/opatch2015-08-04_10-29-25AM_1.log
OPatch failed with error code 73
The error message contains the log Content. Once an Oracle error occurs, various logs are the best method for diagnosis.
[Root @ XXX-PROD-DB patch] # cd/u01/app/oracle/product/11.2.0/dbhome_1/export toollogs/opatch/
[Root @ XXX-PROD-DB opatch] # ls-l
Total 36
Drwxr-xr-x. 2 oracle oinstall 4096 Aug 4 21 19852360_Aug_04_2015_10_21_09
Drwxr-xr-x. 2 oracle oinstall 4096 Aug 4 lsinv
-Rw-r --. 1 oracle oinstall 2050 Aug 4 opatch2015-08-04_10-06-22AM_1.log
-Rw-r --. 1 oracle oinstall 1665 Aug 4 opatch2015-08-04_10-22-39AM_1.log
-Rw-r --. 1 oracle oinstall 2021 Aug 4 opatch2015-08-04_10-28-53AM_1.log
-Rw-r --. 1 oracle oinstall 10540 Aug 4 opatch2015-08-04_10-29-25AM_1.log
-Rw-r --. 1 oracle oinstall 1872 Aug 4 opatch_history.txt
[Root @ INTCTL-PROD-DB opatch] # ls-l | grep 2015-08-04_10-29-25
-Rw-r --. 1 oracle oinstall 10540 Aug 4 opatch2015-08-04_10-29-25AM_1.log
-- Log segment:
[Aug 4, 2015 10:29:31 AM] Finish fuser command/sbin/fuser/u01/app/oracle/product/11.2.0/dbhome_1/bin/proc at Tue Aug 04 10:29:31 CST 2015
[Aug 4, 2015 10:29:31 AM] Start fuser command/sbin/fuser/u01/app/oracle/product/11.2.0/dbhome_1/lib/liborasdkbase. so.11.1 at Tue Aug 04 10:29:31 CST 2015
[Aug 4, 2015 10:29:31 AM] Finish fuser command/sbin/fuser/u01/app/oracle/product/11.2.0/dbhome_1/lib/liborasdkbase. so.11.1 at Tue Aug 04 10:29:31 CST 2015
[Aug 4, 2015 10:29:31 AM] Start fuser command/sbin/fuser/u01/app/oracle/product/11.2.0/dbhome_1/bin/wrap at Tue Aug 04 10:29:31 CST 2015
[Aug 4, 2015 10:29:31 AM] Finish fuser command/sbin/fuser/u01/app/oracle/product/11.2.0/dbhome_1/bin/wrap at Tue Aug 04 10:29:31 CST 2015
[Aug 4, 2015 10:29:31 AM] Start fuser command/sbin/fuser/u01/app/oracle/product/11.2.0/dbhome_1/bin/e2eme at Tue Aug 04 10:29:31 CST 2015
[Aug 4, 2015 10:29:31 AM] Finish fuser command/sbin/fuser/u01/app/oracle/product/11.2.0/dbhome_1/bin/e2eme at Tue Aug 04 10:29:31 CST 2015
[Aug 4, 2015 10:29:31 AM] OUI-67073: UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.
[Aug 4, 2015 10:29:31 AM] Finishing UtilSession at Tue Aug 04 10:29:31 CST 2015
[Aug 4, 2015 10:29:31 AM] Log file location:/u01/app/oracle/product/11.2.0/dbhome_1/export toollogs/opatch/opatch2015-08-04_10-29-25AM_1.log
[Aug 4, 2015 10:29:31 AM] Stack Description: java. lang. RuntimeException: Prerequisite check "CheckActiveFilesAndExecutables" failed.
[Aug 4, 2015 10:29:31 AM] StackTrace: oracle. opatch. OPatchSessionHelper. runApplyPrereqs (OPatchSessionHelper. java: 5717)
[Aug 4, 2015 10:29:31 AM] StackTrace: oracle. opatch. opatchutil. NApply. process (NApply. java: 697)
[Aug 4, 2015 10:29:31 AM] StackTrace: oracle. opatch. opatchutil. OUSession. napply (OUSession. java: 1082)
[Aug 4, 2015 10:29:31 AM] StackTrace: sun. reflect. NativeMethodAccessorImpl. invoke0 (Native Method)
[Aug 4, 2015 10:29:31 AM] StackTrace: sun. reflect. NativeMethodAccessorImpl. invoke (NativeMethodAccessorImpl. java: 39)
[Aug 4, 2015 10:29:31 AM] StackTrace: sun. reflect. DelegatingMethodAccessorImpl. invoke (DelegatingMethodAccessorImpl. java: 25)
[Aug 4, 2015 10:29:31 AM] StackTrace: java. lang. reflect. Method. invoke (Method. java: 592)
[Aug 4, 2015 10:29:31 AM] StackTrace: oracle. opatch. UtilSession. process (UtilSession. java: 317)
[Aug 4, 2015 10:29:31 AM] StackTrace: oracle. opatch. OPatchSession. main (OPatchSession. java: 2575)
[Aug 4, 2015 10:29:31 AM] StackTrace: oracle. opatch. OPatch. main (OPatch. java: 626)
After analysis, it is considered that it is the startup status of the Oracle database and listener. When installing the patch, it is best to stop the service.
[Oracle @ XXX-PROD-DB 20299013] $ lsnrctl stop
LSNRCTL for Linux: Version 11.2.0.4.0-Production on 04-AUG-2015 10:37:25
Copyright (c) 1991,201 3, Oracle. All rights reserved.
Connecting to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = localhost) (PORT = 1521 )))
The command completed successfully
[Oracle @ INTCTL-PROD-DB 20299013] $ sqlplus/nolog
SQL * Plus: Release 11.2.0.4.0 Production ction on Tue Aug 4 10:37:32 2015
Copyright (c) 1982,201 3, Oracle. All rights reserved.
SQL> conn/as sysdba
Connected.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> quit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Perform the OPatch Apply operation.
[Oracle @ XXX-PROD-DB 20299013] $ opatch apply
Oracle Interim Patch Installer version 11.2.0.3.10
Copyright (c) 2015, Oracle Corporation. All rights reserved.
Oracle Home:/u01/app/oracle/product/11.2.0/dbhome_1
Central Inventory:/u01/app/oraInventory
From:/u01/app/oracle/product/11.2.0/dbhome_1/oraInst. loc
OPatch version: 11.2.0.3.10
OUI version: 11.2.0.4.0
Log file location:/u01/app/oracle/product/11.2.0/dbhome_1/export toollogs/opatch/opatch2015-08-04_10-38-47AM_1.log
Verifying environment and padding Ming prerequisite checks...
OPatch continues with these patches: 17478514 18031668 18522509 19121551 19769489
(Space reasons, omitted ......)
Composite patch 20299013 successfully applied.
Log file location:/u01/app/oracle/product/11.2.0/dbhome_1/export toollogs/opatch/opatch2015-08-04_10-38-47AM_1.log
OPatch succeeded.
Patch successful.
Note: database software and database instances are upgraded. However, the database objects are not upgraded. Restart the database and perform the script upgrade.
[Oracle @ XXX-PROD-DB 20299013] $ sqlplus/nolog
SQL * Plus: Release 11.2.0.4.0 Production ction on Tue Aug 4 10:41:37 2015
Copyright (c) 1982,201 3, Oracle. All rights reserved.
SQL> conn/as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 5227814912 bytes
Fixed Size 2262368 bytes
Variable Size 1140853408 bytes
Database Buffers 4076863488 bytes
Redo Buffers 7835648 bytes
Database mounted.
Database opened.
Run the script.
SQL> @? /Rdbms/admin/catbundle. SQL psu apply
SQL> COMMIT;
Commit complete.
SQL> SPOOL off
SQL> SET echo off
Check the following log file for errors:
/U01/app/oracle/export toollogs/catbundle/catbundle_PSU_INTCDB_APPLY_2015Aug04_10_42_39.log
View the patch content:
[Oracle @ XXX-PROD-DB 20299013] $ opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.10
Copyright (c) 2015, Oracle Corporation. All rights reserved.
Oracle Home:/u01/app/oracle/product/11.2.0/dbhome_1
Central Inventory:/u01/app/oraInventory
From:/u01/app/oracle/product/11.2.0/dbhome_1/oraInst. loc
OPatch version: 11.2.0.3.10
OUI version: 11.2.0.4.0
Log file location:/u01/app/oracle/product/11.2.0/dbhome_1/export toollogs/opatch/opatch2015-08-04_10-45-21AM_1.log
Lsinventory Output file location:/u01/app/oracle/product/11.2.0/dbhome_1/export toollogs/opatch/lsinv/lsinventory2015-08-04_10-45-21AM.txt
--------------------------------------------------------------------------------
Local Machine Information ::
Hostname: localhost
ARU platform id: 226
ARU platform description: Linux x86-64
Installed Top-level Products (1 ):