BEFORE WE HAVE CHECK THE OPATCH VERISON AND LAST UPDATE

CHECK OPATCH VERSION

[oracle@kaamesh OPatch]$ pwd

/u01/app/oracle/product/19.0.0/dbhome_1/OPatch

[oracle@kaamesh OPatch]$

[oracle@kaamesh OPatch]$ opatch version

OPatch Version: 12.2.0.1.33

OPatch succeeded.

CHECK LAST UPDATE VERISON OF PATCH(DB)

[oracle@kaamesh ~]$ $ORACLE_HOME/OPatch/opatch lspatches

29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)

29517242;Database Release Update : 19.3.0.0.190416 (29517242)

OPatch succeeded.

IF OPATCH VERSION IS NOT LISTED(VIEW IN READ ME) IN NEW PATCH WE HAVE TO DOWNLOAD THE OPATCH VERISON

 BEFORE PATCH APPLY 

  • Take backup of ORACLE_HOME
  • Take backup of ORA INVENTORY

Set export PATH=$ORACLE_HOME/OPatch:$PATH

Go to directory of download zip file of OPATCH

unzip <opatch zip file> -d $ORACLE_HOME

Check the version

$ORACLE_HOME/OPatch/opatch version

HOW TO DOWNLOAD THE PATCH 

  • GO TO ORACLE SUPPORT AND LOG IN
  • SELECT PATCHES AND UPDATES
  • SELECT PRODUCT OR FAMILY
  • ENTER DETAIL OF DB AND OS VERSION
  • CLICK SEARCH
  • DOWNLOAD DATABASE PATCH
  • IF OPATCH VERSION IS NOT MATCHED GIVEN IN READ ME
  • DOWNLOAD OPTACH

DETAIL OF PATCH TO DOWNLOAD

SERVER COPY THE ZIP FILE FROM LOCAL TO SERVER

[oracle@kaamesh Desktop]$ pwd

/home/oracle/Desktop

[oracle@kaamesh Desktop]$ ls

p34419443_190000_Linux-x86-64.zip  vmware-tools-distrib

UNZIP THE PATCH ZIP FILE

[oracle@kaamesh Desktop]$ unzip p34419443_190000_Linux-x86-64.zip

Archive:  p34419443_190000_Linux-x86-64.zip

creating: 34419443/

extracting: 34419443/README.txt

inflating: 34419443/README.html

creating: 34419443/custom/

creating: 34419443/custom/scripts/

inflating: 34419443/custom/scripts/prepatch.sh

inflating: 34419443/custom/scripts/init

creating: 34419443/files/

AFTER UNZIP FILE <PATCH FOLDER> WAS CREATED

CHECK CONFLICT IF ITS SUCCESS THEN WE HAVE TO APPLY PATCH

[oracle@kaamesh Desktop]$ cd 34419443/

[oracle@kaamesh 34419443]$ ls

custom  etc  files  README.html  README.txt

[oracle@kaamesh 34419443]$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./

Oracle Interim Patch Installer version 12.2.0.1.33

Copyright (c) 2022, 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.33

OUI version            : 12.2.0.7.0

Log file location : /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2022-10-21_02-28-37AM_1.log

Invoking prereq “checkconflictagainstohwithdetail”

Prereq “checkConflictAgainstOHWithDetail” passed.

OPatch succeeded.

 

SPACE CHECK FOR OPATCH APPLY

[oracle@kaamesh~]$opatcprereqCheckSystemSpace -phBaseDir /home/oracle/Desktop/34419443

Oracle Interim Patch Installer version 12.2.0.1.33

Copyright (c) 2022, 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.33

OUI version       : 12.2.0.7.0

Log file location : /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2022-10-21_22-24-46PM_1.log

Invoking prereq “checksystemspace”

Prereq “checkSystemSpace” passed.

OPatch succeeded.

BEFORE APPLY PATCH 

  • STOP LISTENER
  • STOP INSTANCE
[oracle@kaamesh ~]$ lsnrctl stop list_k

LSNRCTL for Linux: Version 19.0.0.0.0 – Production on 21-OCT-2022 22:32:25

Copyright (c) 1991, 2019, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=kaamesh.localdomain)(PORT=1521)))

The command completed successfully

[oracle@kaamesh ~]$ db

SQL*Plus: Release 19.0.0.0.0 – Production on Fri Oct 21 22:32:35 2022

Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.

Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production

Version 19.3.0.0.0

SQL> shut immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

APPLY PATCH

[oracle@kaamesh ~]$ cd /home/oracle/Desktop/34419443

[oracle@kaamesh 34419443]$

[oracle@kaamesh 34419443]$ opatch apply

Oracle Interim Patch Installer version 12.2.0.1.33

Copyright (c) 2022, 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.33

OUI version       : 12.2.0.7.0

Log file location : /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2022-10-21_22-35-49PM_1.log

Verifying environment and performing prerequisite checks…

——————————————————————————–

Start OOP by Prereq process.

Launch OOP…

Oracle Interim Patch Installer version 12.2.0.1.33

Copyright (c) 2022, 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.33

OUI version       : 12.2.0.7.0

Log file location : /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2022-10-21_22-37-29PM_1.log

Verifying environment and performing prerequisite checks…

OPatch continues with these patches:   34419443

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… >>>> IT WILL BACKUP ON /u01/app/oracle/product/19.0.0/dbhome_1/.patch_storage

Patching component oracle.precomp.common, 19.0.0.0.0…

Patching component oracle.precomp.lang, 19.0.0.0.0…

Patching component oracle.jdk, 1.8.0.201.0…

Patch 34419443 successfully applied.

Sub-set patch [29517242] has become inactive due to the application of a super-set patch [34419443].

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/opatch2022-10-21_22-37-29PM_1.log

OPatch succeeded.

POST CHECK

  • $ORACLE_HOME/OPatch/opatch lspatches
  • $ORACLE_HOME/OPatch/opatch lsinv |grep applied

 TO REFLECT PATCH TO EACH INSTANCE 

  • SELECT ENV FILE
  • GO TO OPATCH DIRECTORY
  • APPLY ./datapatch -verbose
  • AND SELECT NEXT INSTANCE ENV FILE AND DO SAME
[oracle@kaamesh ~]$ . oraenv

ORACLE_SID = [test1] ?

[oracle@kaamesh ~]$ cd $ORACLE_HOME/OPatch

[oracle@kaamesh OPatch]$ ./datapatch -verbose

SQL Patching tool version 19.17.0.0.0 Production on Fri Oct 21 23:14:59 2022

Copyright (c) 2012, 2022, Oracle.  All rights reserved.

Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_45795_2022_10_21_23_14_59/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.17.0.0.0 Release_Update 220924224051: Installed

SQL registry:

Rolled back to 19.3.0.0.0 Release_Update 190410122720 successfully on 19-OCT-22 04.30.02.657776 AM

Adding patches to installation queue and performing prereq checks…done

Installation queue:

No interim patches need to be rolled back

Patch 34419443 (Database Release Update : 19.17.0.0.221018 (34419443)):

Apply from 19.3.0.0.0 Release_Update 190410122720 to 19.17.0.0.0 Release_Update 220924224051

No interim patches need to be applied

Installing patches…

Patch installation complete.  Total patches installed: 1

Validating logfiles…done

Patch 34419443 apply: SUCCESS

logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/34419443/24972075/34419443_apply_TEST1_2022Oct21_23_15_36.log (no errors)

SQL Patching tool complete on Fri Oct 21 23:32:35 2022

[oracle@kaamesh ~]$ . oraenv

ORACLE_SID = [test1] ?

The Oracle base remains unchanged with value /u01/app/oracle

[oracle@kaamesh ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 – Production on Sat Oct 22 00:06:11 2022

Version 19.17.0.0.0

Copyright (c) 1982, 2022, Oracle.  All rights reserved.

Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production

Version 19.17.0.0.0

CHECK THE PATCH DETAILS

SET LINESIZE 400

COLUMN action FORMAT A10

COLUMN status FORMAT A10

COLUMN description FORMAT A40

SELECT TO_CHAR(action_time, ‘DD-MON-YYYY HH24:MI:SS’) AS action_time,

 action,status,description,patch_id FROM sys.dba_registry_sqlpatch ;

Recent Posts

Start typing and press Enter to search