Patching in Oracle DB – I

Patching is in-place NOT Upgrade.
Oracle release Quarterly Patches

Base software’s( GI Software’s & Oracle Software’s ) can be downloaded in Oracle Site.
Patches can be downloaded from Support Site and also it needs a license.
Patches are app…


This content originally appeared on DEV Community and was authored by technonotes-hacker

  • Patching is in-place NOT Upgrade.
  • Oracle release Quarterly Patches

Image description

  • Base software's( GI Software's & Oracle Software's ) can be downloaded in Oracle Site.
  • Patches can be downloaded from Support Site and also it needs a license.
  • Patches are applied on top of GI Home & Oracle Home.
  • What these Patches contains ?

Image description

  • Where to check what patches are applied ?
    /u01/app/oracle/product/19.0.0.0/dbhome_1/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.

  • ASM Home

/u01/app/19.0.0.0/grid/OPatch/opatch lspatches
29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)
29517247;ACFS RELEASE UPDATE 19.3.0.0.0 (29517247)
29517242;Database Release Update : 19.3.0.0.190416 (29517242)
29401763;TOMCAT RELEASE UPDATE 19.0.0.0.0 (29401763)
  • DB Home
/u01/app/oracle/product/19.0.0.0/dbhome_1/OPatch/opatch lspatches
29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)
29517242;Database Release Update : 19.3.0.0.190416 (29517242)
  • 19.3.0.0.190416 --> 190416 --> 2019 - April - Date.
  • Second digit is RU. i.e 19.3
  • RU will be increasing 19.2,19.4 etc
  • Here : 19.3 is the base release. --> GI Home and ASM Home.
  • These are cumulative patches --> all patches are not to be applied one by one , you can jump to any patches.

Overview plan

Image description

How to download & Patch details ?

  • Search like below, Critical Patch Update (CPU) Program Jan/Apr/Jul/Oct 2023 Patch Availability Document (DB-only)
  • Section 3 which is for Oracle Database.
  • 3.1.7 --> 3.1.7.3 which is 19c
  • GI Patch will contain DB patch also.
  • Now go to the READ ME file and check the table 1-2 which will say how many sub patches need to be applied.

OPatch Tool

  • We need to patch 3 home ,
  • GI Home
  • DB Home
  • Database Home

  • All these home will be patched via OPatch Tool.

Best Practice

  • SDLC ( DEV --> UAT --> PROD )
  • Don't rollback of any previous patches.
  • Check the conflict check for all the patches using below command, ( repeat for all 5 patches or sub patches )
/u01/app/19.0.0.0/grid/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patches/19.17/34416665/33575402 -oh /u01/app/19.0.0.0/grid
/u01/app/oracle/product/19.0.0.0/dbhome_1/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patches/19.17/34416665/34419443 -oh /u01/app/oracle/product/19.0.0.0/dbhome_1

Image description

OPatch Patch

  • 6880880 version.
  • Upgrade can be done by downloading.

Steps to apply patch

DB Home patching steps

1) Stop DB Home as root user
2) grant permission on patch directory as root user
3) As oracle user do prechks 
Do OPatch version and current lspatches checks
Conflict pre checks:    
System space prechk:
4) Apply Patch:
5) Post verification
6) Start ORACLE_HOME as root user

GI Home patching steps

  • Stop the GI home as root user, which means its a HAS --> Standalone.
1) Stop GI Home as root user
2) Unlock the GI Home as root user
3) grant permission patch directory as root user
4) As grid/oracle user do prechks 
Do OPatch version and current lspatches checks
Conflict pre checks:    
System space prechk:
5) Apply Patch:
6) Post verification
7) Lock and start GI 

Prechecks

- backup GI Home --> tar -cvzf grid.tar.gz grid ( cd /u01/app/19.0.0.0/ )
- backup Oracle Home --> tar -cvzf dbhome_1.tar.gz dbhome_1 ( cd /u01/app/oracle/product/19.0.0.0 )
  • System space check
/u01/app/19.0.0.0/grid/OPatch/opatch prereq CheckSystemSpace -phBaseDir /u01/patches/19.17/34416665/33575402 -oh /u01/app/19.0.0.0/grid

/u01/app/oracle/product/19.0.0.0/dbhome_1/OPatch/opatch prereq CheckSystemSpace -phBaseDir /u01/patches/19.17/34416665/34419443 -oh /u01/app/oracle/product/19.0.0.0/dbhome_1
  • df -h /u01/app/oracle/product/19.0.0.0/dbhome_1/

Image description

Patching

/u01/app/19.0.0.0/grid/OPatch/opatch apply -oh /u01/app/19.0.0.0/grid -local -silent /u01/patches/19.17/34416665/34419443

/u01/app/oracle/product/19.0.0.0/dbhome_1/OPatch/opatch apply -oh /u01/app/oracle/product/19.0.0.0/dbhome_1 -local -silent /u01/patches/19.17/34416665/34419443
  • silent --> default is YES , don't wait for command.

Important Notes

  • Don't download patches until you have license , it may be fine as they are unauthorised to download.
  • List of patches terms used in Oracle :

https://docs.oracle.com/cd/E24628_01/doc.121/e39376/glossary.htm#BGBCGDDF

Image description


This content originally appeared on DEV Community and was authored by technonotes-hacker


Print Share Comment Cite Upload Translate Updates
APA

technonotes-hacker | Sciencx (2024-07-28T10:59:08+00:00) Patching in Oracle DB – I. Retrieved from https://www.scien.cx/2024/07/28/patching-in-oracle-db-i/

MLA
" » Patching in Oracle DB – I." technonotes-hacker | Sciencx - Sunday July 28, 2024, https://www.scien.cx/2024/07/28/patching-in-oracle-db-i/
HARVARD
technonotes-hacker | Sciencx Sunday July 28, 2024 » Patching in Oracle DB – I., viewed ,<https://www.scien.cx/2024/07/28/patching-in-oracle-db-i/>
VANCOUVER
technonotes-hacker | Sciencx - » Patching in Oracle DB – I. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/07/28/patching-in-oracle-db-i/
CHICAGO
" » Patching in Oracle DB – I." technonotes-hacker | Sciencx - Accessed . https://www.scien.cx/2024/07/28/patching-in-oracle-db-i/
IEEE
" » Patching in Oracle DB – I." technonotes-hacker | Sciencx [Online]. Available: https://www.scien.cx/2024/07/28/patching-in-oracle-db-i/. [Accessed: ]
rf:citation
» Patching in Oracle DB – I | technonotes-hacker | Sciencx | https://www.scien.cx/2024/07/28/patching-in-oracle-db-i/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.