Applying Patch RU (Release Update) on Oracle Database 19c
Platform : Linuxx86_64 Server IP : 192.168.2.101 DB Version : Oracle 19c, File system: Normal, RAC: Non-RAC DB Name : dell Oracle Home: /u01/app/oracle/product/19.0.0/dbhome_1
What is an RU? Release Update (formerly known as Proactive Bundle Patches). RU are actually the second number, eg. 19.4.0.0.0 Each release update can also be updated with PSUs, still the last number, for example 19.4.0.0.190716 You must use the OPatch utility version 12.2.0.1.17 or later
3. Download the patch from MOS (My Oracle Support)
-- Copy the patch to server from local machine using WinSCP or FTP [oracle@rac1 ~]$ cd /u01/app/backup/ [oracle@rac1 backup]$ ls -ltr total 738064 -rw-r--r--. 1 oracle oinstall Jan 26 18:25 p_190000_Linux-x86-64.zip [oracle@rac1 backup]$ unzip p_190000_Linux-x86-64.zip [oracle@rac1 backup]$ ls -ltr total 738204 drwxr-xr-x. 4 oracle oinstall 67 Jul 10 2019 -rw-rw-r--. 1 oracle oinstall 142160 Jul 16 2019 PatchSearch.xml -rw-r--r--. 1 oracle oinstall Jan 26 18:25 p_190000_Linux-x86-64.zip [oracle@rac1 backup]$
5. List patches which were applied
[oracle@rac1 ~]$ /u01/app/oracle/product/19.0.0/dbhome_1/OPatch/opatch lsinv -oh /u01/app/oracle/product/19.0.0/dbhome_1 Oracle Interim Patch Installer version 12.2.0.1.17 Copyright (c) 2020, Oracle Corporation. All rights reserved. Oracle Home : /u01/app/oracle/product/19.0.0/dbhome_1 Central Inventory : /u01/app/oraInventory from : /u01/app/oracle/product/19.0.0/dbhome_1/oraInst.loc OPatch version : 12.2.0.1.17 OUI version : 12.2.0.7.0 Log file location : /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2020-01-26_21-32-18PM_1.log Lsinventory Output file location : /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/lsinv/lsinventory2020-01-26_21-32-18PM.txt -------------------------------------------------------------------------------- Local Machine Information:: Hostname: rac1.DBA Learning Hub.com ARU platform id: 226 ARU platform description:: Linux x86-64 Installed Top-level Products (1): Oracle Database 19c 19.0.0.0.0 There are 1 products installed in this Oracle Home. Interim patches (2) : Patch : applied on Thu Apr 18 15:21:33 SGT 2019 Unique Patch ID: Patch description: "OCW RELEASE UPDATE 19.3.0.0.)" Created on 9 Apr 2019, 19:12:47 hrs PST8PDT Bugs fixed: , , , , , , , , , , , , , , , , , , , , , , , , , , , 3, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Patch : applied on Thu Apr 18 15:21:17 SGT 2019 Unique Patch ID: Patch description: "Database Release Update : 19.3. ()" Created on 17 Apr 2019, 23:27:10 hrs PST8PDT Bugs fixed: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , -------------------------------------------------------------------------------- OPatch succeeded. [oracle@rac1 ~]$
[oracle@rac1 ~]$ /u01/app/oracle/product/19.0.0/dbhome_1/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph /u01/app/backup/ Oracle Interim Patch Installer version 12.2.0.1.17 Copyright (c) 2020, Oracle Corporation. All rights reserved. PREREQ session Oracle Home : /u01/app/oracle/product/19.0.0/dbhome_1 Central Inventory : /u01/app/oraInventory from : /u01/app/oracle/product/19.0.0/dbhome_1/oraInst.loc OPatch version : 12.2.0.1.17 OUI version : 12.2.0.7.0 Log file location : /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2020-01-26_21-37-49PM_1.log Invoking prereq "checkconflictagainstohwithdetail" Prereq "checkConflictAgainstOHWithDetail" passed. <---- OPatch succeeded. [oracle@rac1 ~]$
SQL> SHUT IMMEDIATE;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL>
[oracle@rac1 ~]$ ps -ef | grep tns root 15 2 0 12:28 ? 00:00:00 [netns] oracle 25615 1 0 21:41 ? 00:00:00 /u01/app/oracle/product/19.0.0/dbhome_1/bin/tnslsnr LISTENER_DELL -inherit oracle 3 0 21:43 pts/1 00:00:00 grep --color=auto tns [oracle@rac1 ~]$ [oracle@rac1 ~]$ lsnrctl stop LISTENER_DELL LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 26-JAN-2020 21:43:08 Copyright (c) 1991, 2019, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rac1.DBA Learning Hub.com)(PORT=1522))) The command completed successfully [oracle@rac1 ~]$ [oracle@rac1 ~]$ ps -ef | grep tns root 15 2 0 12:28 ? 00:00:00 [netns] oracle 3 0 21:43 pts/1 00:00:00 grep --color=auto tns [oracle@rac1 ~]$
9. Backup Oracle Home / Inventory
[oracle@rac1 backup]$ cd / [oracle@rac]$ pwd /u01/app/backup/ [oracle@rac]$ /u01/app/oracle/product/19.0.0/dbhome_1/OPatch/opatch apply -oh /u01/app/oracle/product/19.0.0/dbhome_1 -local Oracle Interim Patch Installer version 12.2.0.1.17 Copyright (c) 2020, Oracle Corporation. All rights reserved. Oracle Home : /u01/app/oracle/product/19.0.0/dbhome_1 Central Inventory : /u01/app/oraInventory from : /u01/app/oracle/product/19.0.0/dbhome_1/oraInst.loc OPatch version : 12.2.0.1.17 OUI version : 12.2.0.7.0 Log file location : /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2020-01-26_21-45-10PM_1.log Verifying environment and performing prerequisite checks... OPatch continues with these patches: 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/19.0.0/dbhome_1') Is the local system ready for patching? [y|n] y <----- User Responded with: Y Backing up files... Applying interim patch '' to OH '/u01/app/oracle/product/19.0.0/dbhome_1' ApplySession: Optional component(s) [ oracle.network.gsm, 19.0.0.0.0 ] , [ oracle.rdbms.ic, 19.0.0.0.0 ] , [ oracle.tfa, 19.0.0.0.0 ] , [ oracle.options.olap.awm, 19.0.0.0.0 ] , [ oracle.net.cman, 19.0.0.0.0 ] , [ oracle.nlsrtl.companion, 19.0.0.0.0 ] , [ oracle.assistants.asm, 19.0.0.0.0 ] , [ oracle.network.cman, 19.0.0.0.0 ] , [ oracle.assistants.usm, 19.0.0.0.0 ] , [ oracle.oraolap.mgmt, 19.0.0.0.0 ] not present in the Oracle Home or a higher version is found. Patching component oracle.rdbms.rsf, 19.0.0.0.0... Patching component oracle.rdbms, 19.0.0.0.0... Patching component oracle.assistants.acf, 19.0.0.0.0... Patching component oracle.assistants.deconfig, 19.0.0.0.0... Patching component oracle.assistants.server, 19.0.0.0.0... Patching component oracle.buildtools.rsf, 19.0.0.0.0... Patching component oracle.ctx, 19.0.0.0.0... Patching component oracle.ldap.rsf, 19.0.0.0.0... Patching component oracle.network.rsf, 19.0.0.0.0... Patching component oracle.rdbms.dbscripts, 19.0.0.0.0... Patching component oracle.sdo, 19.0.0.0.0... Patching component oracle.sqlplus, 19.0.0.0.0... Patching component oracle.ctx.rsf, 19.0.0.0.0... Patching component oracle.dbdev, 19.0.0.0.0... Patching component oracle.ons, 19.0.0.0.0... Patching component oracle.rdbms.util, 19.0.0.0.0... Patching component oracle.rdbms.deconfig, 19.0.0.0.0... Patching component oracle.rdbms.rman, 19.0.0.0.0... Patching component oracle.odbc, 19.0.0.0.0... Patching component oracle.network.client, 19.0.0.0.0... Patching component oracle.oracore.rsf, 19.0.0.0.0... Patching component oracle.xdk.parser.java, 19.0.0.0.0... Patching component oracle.nlsrtl.rsf, 19.0.0.0.0... Patching component oracle.dbjava.ucp, 19.0.0.0.0... Patching component oracle.dbjava.jdbc, 19.0.0.0.0... Patching component oracle.dbjava.ic, 19.0.0.0.0... Patching component oracle.oraolap.dbscripts, 19.0.0.0.0... Patching component oracle.ldap.security.osdt, 19.0.0.0.0... Patching component oracle.ldap.rsf.ic, 19.0.0.0.0... Patching component oracle.xdk.rsf, 19.0.0.0.0... Patching component oracle.network.listener, 19.0.0.0.0... Patching component oracle.ovm, 19.0.0.0.0... Patching component oracle.ctx.atg, 19.0.0.0.0... Patching component oracle.install.deinstalltool, 19.0.0.0.0... Patching component oracle.duma, 19.0.0.0.0... Patching component oracle.sdo.locator, 19.0.0.0.0... Patching component oracle.sdo.locator.jrf, 19.0.0.0.0... Patching component oracle.rdbms.oci, 19.0.0.0.0... Patching component oracle.ldap.owm, 19.0.0.0.0... Patching component oracle.xdk, 19.0.0.0.0... Patching component oracle.rdbms.install.plugins, 19.0.0.0.0... Patching component oracle.rdbms.dv, 19.0.0.0.0... Patching component oracle.sqlplus.ic, 19.0.0.0.0... Patching component oracle.rdbms.rsf.ic, 19.0.0.0.0... Patching component oracle.precomp.lang, 19.0.0.0.0... Patching component oracle.precomp.common, 19.0.0.0.0... Patch successfully applied. Sub-set patch [] has become inactive due to the application of a super-set patch []. Please refer to Doc ID 2161861.1 for any possible further required actions. Log file location: /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2020-01-26_21-45-10PM_1.log OPatch succeeded. [oracle@rac]$
[oracle@rac1 ~]$ /u01/app/oracle/product/19.0.0/dbhome_1/OPatch/opatch lsinv -oh /u01/app/oracle/product/19.0.0/dbhome_1 Oracle Interim Patch Installer version 12.2.0.1.17 Copyright (c) 2020, Oracle Corporation. All rights reserved. Oracle Home : /u01/app/oracle/product/19.0.0/dbhome_1 Central Inventory : /u01/app/oraInventory from : /u01/app/oracle/product/19.0.0/dbhome_1/oraInst.loc OPatch version : 12.2.0.1.17 OUI version : 12.2.0.7.0 Log file location : /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2020-01-26_21-52-57PM_1.log Lsinventory Output file location : /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/lsinv/lsinventory2020-01-26_21-52-57PM.txt -------------------------------------------------------------------------------- Local Machine Information:: Hostname: rac1.DBA Learning Hub.com ARU platform id: 226 ARU platform description:: Linux x86-64 Installed Top-level Products (1): Oracle Database 19c 19.0.0.0.0 There are 1 products installed in this Oracle Home. Interim patches (2) : Patch : applied on Sun Jan 26 21:46:03 SGT 2020 Unique Patch ID: Patch description: "Database Release Update : 19.4.0.0.190716 ()" Created on 10 Jul 2019, 02:09:26 hrs PST8PDT Bugs fixed: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Patch : applied on Thu Apr 18 15:21:33 SGT 2019 Unique Patch ID: Patch description: "OCW RELEASE UPDATE 19.3.0.0.)" Created on 9 Apr 2019, 19:12:47 hrs PST8PDT Bugs fixed: , , , , , , , , , , , , , , , , , , , , , , , , , , , 3, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , -------------------------------------------------------------------------------- OPatch succeeded. [oracle@rac1 ~]$
[oracle@rac1 ~]$ . oraenv ORACLE_SID = [dell] ? The Oracle base remains unchanged with value /u01/app/oracle [oracle@rac1 ~]$ sqlplus / as sysdba SQL*Plus: Release 19.0.0.0.0 - Production on Sun Jan 26 21:54:39 2020 Version 19.4.0.0.0 Copyright (c) 1982, 2019, Oracle. All rights reserved. Connected to an idle instance. SQL> startup; ORACLE instance started. Total System Global Area bytes Fixed Size 8896928 bytes Variable Size bytes Database Buffers bytes Redo Buffers 7876608 bytes Database mounted. Database opened. SQL> SQL> SELECT NAME,OPEN_MODE FROM V$DATABASE; NAME OPEN_MODE --------- -------------------- DELL READ WRITE SQL> exit Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.4.0.0.0 [oracle@rac1 ~]$
13. Apply SQL changes (datapatch)
[oracle@rac1 ~]$ /u01/app/oracle/product/19.0.0/dbhome_1/OPatch/datapatch -verbose SQL Patching tool version 19.4.0.0.0 Production on Sun Jan 26 21:58:27 2020 Copyright (c) 2012, 2019, Oracle. All rights reserved. Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_31031_2020_01_26_21_58_27/sqlpatch_invocation.log Connecting to database...OK Gathering database info...done Bootstrapping registry and package to current versions...done Determining current state...done Current state of interim SQL patches: No interim patches found Current state of release update SQL patches: Binary registry: 19.4.0.0.0 Release_Update : Installed SQL registry: Applied 19.3.0.0.0 Release_Update successfully on 26-JAN-20 06. PM Adding patches to installation queue and performing prereq checks...done Installation queue: No interim patches need to be rolled back Patch (Database Release Update : 19.4. ()): Apply from 19.3.0.0.0 Release_Update to 19.4.0.0.0 Release_Update No interim patches need to be applied Installing patches... Patch installation complete. Total patches installed: 1 Validating logfiles...done Patch apply: SUCCESS logfile: /u01/app/oracle/cfgtoollogs/sqlpatch///_apply_DELL_2020Jan26_21_58_59.log (no errors) SQL Patching tool complete on Sun Jan 26 22:03:33 2020 [oracle@rac1 ~]$
14. Verify from dba_registry_sqlpatch
SET LINESIZE 500 SET PAGESIZE 1000 SET SERVEROUT ON SET LONG 2000000 COLUMN action_time FORMAT A12 COLUMN action FORMAT A10 COLUMN comments FORMAT A30 COLUMN description FORMAT A60 COLUMN namespace FORMAT A20 COLUMN status FORMAT A10 SELECT TO_CHAR(action_time, 'YYYY-MM-DD') AS action_time, action, status, description, patch_id FROM sys.dba_registry_sqlpatch ORDER by action_time; ACTION_TIME ACTION STATUS DESCRIPTION PATCH_ID ------------ ---------- ---------- ------------------------------------------------------------ ---------- 2020-01-26 APPLY SUCCESS Database Release Update : 19.4. () 2020-01-26 APPLY SUCCESS Database Release Update : 19.3. ()
[oracle@rac1 ~]$ ps -ef | grep tns root 15 2 0 12:28 ? 00:00:00 [netns] oracle 1800 2552 0 22:12 pts/0 00:00:00 grep --color=auto tns [oracle@rac1 ~]$ [oracle@rac1 ~]$ lsnrctl start LISTENER_DELL [oracle@rac1 ~]$ ps -ef | grep tns root 15 2 0 12:28 ? 00:00:00 [netns] oracle 1816 1 0 22:12 ? 00:00:00 /u01/app/oracle/product/19.0.0/dbhome_1/bin/tnslsnr LISTENER_DELL -inherit oracle 6865 2552 0 22:38 pts/0 00:00:00 grep --color=auto tns [oracle@rac1 ~]$
SQL> select count(*) from dba_objects where status='INVALID'; COUNT(*) ---------- 0 <------ SQL>
Caution: Your use of any information or materials on this website is entirely at your own risk. It is provided for educational purposes only. It has been tested internally, however, we do not guarantee that it will work for you. Ensure that you run it in your test environment before using.