{"id":5355,"date":"2026-01-31T19:45:36","date_gmt":"2026-01-31T14:15:36","guid":{"rendered":"https:\/\/w3buddy.com\/?p=5355"},"modified":"2026-01-31T19:45:38","modified_gmt":"2026-01-31T14:15:38","slug":"oracle-database-patching-complete-interview-preparation-guide","status":"publish","type":"post","link":"https:\/\/w3buddy.com\/blog\/oracle-database-patching-complete-interview-preparation-guide\/","title":{"rendered":"Oracle Database Patching &#8211; Complete Interview Preparation Guide"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\"><strong>Quick Summary<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Oracle database patching<\/strong> is a <strong>critical DBA responsibility<\/strong> involving applying updates to fix <strong>bugs<\/strong>, <strong>security vulnerabilities<\/strong>, and add <strong>new features<\/strong>.<br>This guide covers <strong>patch types<\/strong>, <strong>strategies<\/strong>, <strong>procedures<\/strong>, and <strong>best practices<\/strong> for <strong>Oracle 19c<\/strong>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>1. PATCHING FUNDAMENTALS<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What is Patching?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Definition:<\/strong><br><strong>Patching<\/strong> is the process of applying <strong>software updates<\/strong> to <strong>Oracle Database<\/strong> to fix <strong>bugs<\/strong>, <strong>security vulnerabilities<\/strong>, or add <strong>minor enhancements<\/strong>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Why Patching is Critical<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Security:<\/strong> Fix critical vulnerabilities<\/li>\n\n\n\n<li><strong>Stability:<\/strong> Resolve known bugs<\/li>\n\n\n\n<li><strong>Performance:<\/strong> Improve database performance<\/li>\n\n\n\n<li><strong>Support:<\/strong> Stay within Oracle support policies<\/li>\n\n\n\n<li><strong>Compliance:<\/strong> Meet regulatory requirements<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Simple Analogy<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Think of <strong>patching<\/strong> like updating your <strong>phone\u2019s operating system<\/strong>.<br>You get <strong>bug fixes<\/strong>, <strong>security updates<\/strong>, and sometimes <strong>new features<\/strong>, <strong>without changing the core version<\/strong>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Patch vs Upgrade<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-table has-small-font-size\"><table><thead><tr><th><strong>Aspect<\/strong><\/th><th><strong>Patch<\/strong><\/th><th><strong>Upgrade<\/strong><\/th><\/tr><\/thead><tbody><tr><td><strong>Scope<\/strong><\/td><td>Minor fixes \/ updates<\/td><td>Major version change<\/td><\/tr><tr><td><strong>Version Change<\/strong><\/td><td>Same version <em>(19.x \u2192 19.y)<\/em><\/td><td>Different version <em>(19c \u2192 21c)<\/em><\/td><\/tr><tr><td><strong>Downtime<\/strong><\/td><td>Usually short<\/td><td>Usually longer<\/td><\/tr><tr><td><strong>Risk<\/strong><\/td><td>Lower<\/td><td>Higher<\/td><\/tr><tr><td><strong>Frequency<\/strong><\/td><td>Quarterly \/ Monthly<\/td><td>Every few years<\/td><\/tr><tr><td><strong>Testing<\/strong><\/td><td>Less extensive<\/td><td>Extensive<\/td><\/tr><tr><td><strong>Example<\/strong><\/td><td>19.3 \u2192 19.21<\/td><td>19c \u2192 21c<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>2. TYPES OF PATCHES (Oracle 19c)<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>A. Release Update (RU)<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><em><strong>Most Common<\/strong><\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What it is<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Cumulative patch<\/strong> including all previous fixes<\/li>\n\n\n\n<li>Released <strong>quarterly<\/strong> <em>(Jan, Apr, Jul, Oct)<\/em><\/li>\n\n\n\n<li>Contains <strong>bug fixes<\/strong> and <strong>security fixes<\/strong><\/li>\n\n\n\n<li>Replaces old <strong>PSU (Patch Set Update)<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Naming Convention<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Database Release Update<\/strong> <code>19.21.0.0.0<\/code><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>        \u2193           \u2193\n   Base Version   RU Number\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Characteristics<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Cumulative<\/strong> <em>(includes all previous RUs)<\/em><\/li>\n\n\n\n<li><strong>Proactive patching strategy<\/strong><\/li>\n\n\n\n<li><strong>Requires database downtime<\/strong><\/li>\n\n\n\n<li><strong>Recommended for most environments<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Release Schedule<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>January RU:<\/strong> 19.22<\/li>\n\n\n\n<li><strong>April RU:<\/strong> 19.23<\/li>\n\n\n\n<li><strong>July RU:<\/strong> 19.24<\/li>\n\n\n\n<li><strong>October RU:<\/strong> 19.25<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Apply Method<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Download from <strong>My Oracle Support (MOS)<\/strong><\/li>\n\n\n\n<li>Apply using <strong>OPatch utility<\/strong><\/li>\n\n\n\n<li><strong>Database restart required<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>B. Release Update Revision (RUR)<\/strong><\/h3>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What it is<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Emergency patch<\/strong> on top of RU<\/li>\n\n\n\n<li>Released <strong>between quarterly RUs<\/strong> if critical issue found<\/li>\n\n\n\n<li>Contains <strong>minimal fixes<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Example<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><code>19.21.0.0.0 (RU)<\/code> \u2192 <code>19.21.0.1.0 (RUR)<\/code><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>When to use<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Critical bug<\/strong> found after RU release<\/li>\n\n\n\n<li>Cannot wait for <strong>next quarterly RU<\/strong><\/li>\n\n\n\n<li><strong>Rare<\/strong>, used only for <strong>urgent fixes<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>C. One-Off Patch (Individual Bug Fix)<\/strong><\/h3>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What it is<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Single patch<\/strong> for a specific bug<\/li>\n\n\n\n<li><strong>Not cumulative<\/strong><\/li>\n\n\n\n<li>Applied <strong>on top of RU\/RUR<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Characteristics<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Targets <strong>one or few related bugs<\/strong><\/li>\n\n\n\n<li><strong>Small size<\/strong> <em>(few MB)<\/em><\/li>\n\n\n\n<li><strong>Quick to apply<\/strong><\/li>\n\n\n\n<li>Can cause <strong>conflicts<\/strong> with other patches<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Use Case<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Issue:<\/strong> Specific bug affecting your application<\/li>\n\n\n\n<li><strong>Solution:<\/strong> Apply <strong>one-off patch<\/strong> for that bug only<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Important Note<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Always apply on top of <strong>latest RU<\/strong><\/li>\n\n\n\n<li><strong>Check for conflicts<\/strong> before applying<\/li>\n\n\n\n<li>May need to <strong>reapply after next RU<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>D. Critical Patch Update (CPU)<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><em><strong>Legacy<\/strong><\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What it is<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Security-only patch<\/strong><\/li>\n\n\n\n<li>Released <strong>quarterly<\/strong> <em>(same schedule as RU)<\/em><\/li>\n\n\n\n<li><strong>Deprecated<\/strong> in favor of RU<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Why Deprecated<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>RU now includes <strong>all security fixes<\/strong><\/li>\n\n\n\n<li><strong>Simpler<\/strong> to maintain a single patch stream<\/li>\n\n\n\n<li>CPU still available but <strong>not recommended<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Migration Path<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Old:<\/strong> CPU <em>(security only)<\/em><\/li>\n\n\n\n<li><strong>New:<\/strong> RU <em>(security + bug fixes)<\/em><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>E. Patch Set Update (PSU)<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><em><strong>Legacy<\/strong><\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What it is<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Old <strong>cumulative patch<\/strong> <em>(before 12.2)<\/em><\/li>\n\n\n\n<li>Replaced by <strong>RU<\/strong> in <strong>18c+<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Historical Context<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>11g \/ 12.1:<\/strong> PSU <em>(old term)<\/em><\/li>\n\n\n\n<li><strong>18c+:<\/strong> RU <em>(new term, same concept)<\/em><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>F. Bundle Patch<\/strong><\/h3>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What it is<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Platform-specific cumulative patch<\/strong><\/li>\n\n\n\n<li>Used for <strong>Exadata, RAC, etc.<\/strong><\/li>\n\n\n\n<li>Includes <strong>multiple components<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Examples<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Grid Infrastructure Release Update (GI RU)<\/strong><\/li>\n\n\n\n<li><strong>Exadata Bundle Patch<\/strong><\/li>\n\n\n\n<li><strong>Database Bundle Patch<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>G. Interim Patch<\/strong><\/h3>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What it is<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Temporary fix<\/strong> before official patch<\/li>\n\n\n\n<li>Provided by <strong>Oracle Support<\/strong> for urgent issues<\/li>\n\n\n\n<li>Should be <strong>replaced by official patch<\/strong> when available<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>3. OPATCH UTILITY<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What is OPatch?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Definition:<\/strong><br><strong>OPatch<\/strong> is Oracle\u2019s utility for <strong>applying and managing patches<\/strong> to <strong>Oracle Home<\/strong>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Location<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>$ORACLE_HOME\/OPatch\/opatch\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Key Features<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Apply patches<\/strong><\/li>\n\n\n\n<li><strong>Rollback patches<\/strong><\/li>\n\n\n\n<li><strong>Query patch information<\/strong><\/li>\n\n\n\n<li><strong>Conflict detection<\/strong><\/li>\n\n\n\n<li><strong>Prerequisite checking<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>OPatch Versions<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Important<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>OPatch version must be compatible with Oracle version<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Check OPatch Version<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>$ORACLE_HOME\/OPatch\/opatch version\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Update OPatch<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># Download latest OPatch from MOS (Patch 6880880)\ncd $ORACLE_HOME\nmv OPatch OPatch.old\nunzip p6880880_190000_Linux-x86-64.zip\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Recommended OPatch Version for 19c<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Minimum:<\/strong> 12.2.0.1.0 or higher<\/li>\n\n\n\n<li><strong>Always use latest available<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Common OPatch Commands<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1. Check OPatch Version<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>opatch version\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2. List Applied Patches<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>opatch lspatches\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>or detailed view<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>opatch lsinventory\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3. Query Specific Patch<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>opatch query -all \/path\/to\/patch\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4. Check for Conflicts<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>opatch prereq CheckConflictAgainstOHWithDetail -ph \/path\/to\/patch\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5. Apply Patch<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>opatch apply \/path\/to\/patch\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>6. Rollback Patch<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>opatch rollback -id &lt;patch_number&gt;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>7. Check Patch Applicable<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>opatch prereq CheckApplicable -ph \/path\/to\/patch\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>8. List Patch Details<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>opatch lspatches -all\nopatch lsinventory -detail<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>9. Validate Oracle Home<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>opatch util cleanup\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>4. PATCHING STRATEGIES<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>A. Out-of-Place Patching<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Recommended for Production<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What it is<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Create <strong>new Oracle Home<\/strong><\/li>\n\n\n\n<li>Apply patches to <strong>new home<\/strong><\/li>\n\n\n\n<li>Switch database to <strong>new home<\/strong><\/li>\n\n\n\n<li>Keep <strong>old home as fallback<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Process<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>Old OH: \/u01\/app\/oracle\/product\/19.0.0\/dbhome_1 (19.3)\n    \u2193\nNew OH: \/u01\/app\/oracle\/product\/19.0.0\/dbhome_2 (19.21)\n    \u2193\nSwitch database from dbhome_1 to dbhome_2\n    \u2193\nOld home available for rollback if needed\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Advantages<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Easy rollback <em>(switch back to old home)<\/em><\/li>\n\n\n\n<li>Zero impact if patch fails<\/li>\n\n\n\n<li>Can test thoroughly before switching<\/li>\n\n\n\n<li>Minimal downtime<\/li>\n\n\n\n<li>Best for production<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Disadvantages<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Requires more disk space<\/li>\n\n\n\n<li>More steps involved<\/li>\n\n\n\n<li>Need to manage multiple homes<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Steps<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># 1. Create new Oracle Home\nmkdir -p \/u01\/app\/oracle\/product\/19.0.0\/dbhome_2\n\n# 2. Install Oracle software to new home\n.\/runInstaller -silent -responseFile \/path\/to\/response.rsp\n\n# 3. Apply patches to new home\nexport ORACLE_HOME=\/u01\/app\/oracle\/product\/19.0.0\/dbhome_2\nopatch apply\n\n# 4. Shutdown database\nsqlplus \/ as sysdba\nSHUTDOWN IMMEDIATE;\n\n# 5. Switch ORACLE_HOME\nexport ORACLE_HOME=\/u01\/app\/oracle\/product\/19.0.0\/dbhome_2\nexport PATH=$ORACLE_HOME\/bin:$PATH\n\n# 6. Startup database and run datapatch\nSTARTUP;\nEXIT;\n$ORACLE_HOME\/OPatch\/datapatch\n\n# 7. Verify\nsqlplus \/ as sysdba\nSELECT * FROM dba_registry_sqlpatch;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>B. In-Place Patching<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><em>(Traditional)<\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What it is<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Apply patches directly to <strong>existing Oracle Home<\/strong><\/li>\n\n\n\n<li>Database uses <strong>same home<\/strong> before and after<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Process<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>Oracle Home: \/u01\/app\/oracle\/product\/19.0.0\/dbhome_1\n    \u2193\nApply patch directly to dbhome_1\n    \u2193\nDatabase continues using dbhome_1\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Advantages<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Less disk space needed<\/li>\n\n\n\n<li>Simpler process<\/li>\n\n\n\n<li>Fewer steps<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Disadvantages<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Difficult rollback <em>(must manually rollback patch)<\/em><\/li>\n\n\n\n<li>Risk if patch fails<\/li>\n\n\n\n<li>No easy fallback<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Steps<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># 1. Shutdown database\nsqlplus \/ as sysdba\nSHUTDOWN IMMEDIATE;\nEXIT;\n\n# 2. Apply patch\ncd \/path\/to\/patch\nopatch apply\n\n# 3. Startup database\nsqlplus \/ as sysdba\nSTARTUP;\nEXIT;\n\n# 4. Run datapatch\n$ORACLE_HOME\/OPatch\/datapatch\n\n# 5. Verify\nsqlplus \/ as sysdba\nSELECT * FROM dba_registry_sqlpatch;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>C. Rolling Patching<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><em>(RAC \/ Data Guard)<\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What it is<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Patch <strong>instances one at a time<\/strong><\/li>\n\n\n\n<li>Minimal or <strong>zero downtime<\/strong><\/li>\n\n\n\n<li>Available for <strong>RAC and Data Guard<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Use Cases<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>RAC:<\/strong> Patch one node at a time, services continue on other nodes<\/li>\n\n\n\n<li><strong>Data Guard:<\/strong> Patch standby first, then switchover, patch old primary<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>RAC Rolling Patch Process<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>Node 1 (Patched) + Node 2 (Running) \u2192 Services continue\n    \u2193\nNode 1 (Running) + Node 2 (Patched) \u2192 Services continue\n    \u2193\nAll nodes patched, minimal downtime\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Data Guard Rolling Patch Process<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>Step 1: Patch standby database\nStep 2: Verify standby\nStep 3: Switchover to standby (now primary)\nStep 4: Patch old primary (now standby)\nStep 5: Switchover back (optional)\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>D. Fleet Patching and Provisioning (FPP)<\/strong><\/h3>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What it is<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Automated patching framework <em>(19c+)<\/em><\/li>\n\n\n\n<li>Centralized patch management<\/li>\n\n\n\n<li>Zero-downtime patching<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Features<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Gold image management<\/li>\n\n\n\n<li>Automated out-of-place patching<\/li>\n\n\n\n<li>Minimal downtime<\/li>\n\n\n\n<li>Centralized control<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Use Case<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Large environments <em>(100+ databases)<\/em><\/li>\n\n\n\n<li>Standardized patching<\/li>\n\n\n\n<li>Enterprise automation<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>5. PATCHING PROCESS (Step-by-Step)<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Pre-Patching Activities<\/strong><\/h3>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1. Review Patch README<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>- Download patch from MOS\n- Read README.html thoroughly\n- Check prerequisites\n- Note known issues\n- Review rollback procedure\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2. Check Compatibility<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Check Oracle version\nSELECT * FROM v$version;\n\n-- Check applied patches\nSELECT * FROM dba_registry_sqlpatch ORDER BY action_time DESC;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3. Check OPatch Version<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>opatch version\n# Update if needed\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4. Backup<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># Full database backup\nRMAN&gt; BACKUP DATABASE PLUS ARCHIVELOG;\n\n# Backup Oracle Home\ntar -czf $ORACLE_HOME_backup.tar.gz $ORACLE_HOME\n\n# Backup inventory\ntar -czf oraInventory_backup.tar.gz $ORACLE_BASE\/oraInventory\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5. Check Space<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># Check disk space\ndf -h $ORACLE_HOME\ndf -h \/tmp\n\n# Patches usually need 5-10 GB free space\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>6. Review Applied Patches<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>opatch lspatches\nopatch lsinventory\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>7. Check for Conflicts<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>opatch prereq CheckConflictAgainstOHWithDetail -ph \/path\/to\/patch\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>8. Schedule Downtime<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>- Inform users\n- Schedule maintenance window\n- Prepare rollback plan\n- Alert monitoring tools\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Applying RU Patch (In-Place)<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 1: Download and Extract Patch<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># Download from MOS\n# Example: Patch 35037840 (19.21 RU)\n\ncd \/staging\nunzip p35037840_190000_Linux-x86-64.zip\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 2: Set Environment<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>export ORACLE_HOME=\/u01\/app\/oracle\/product\/19.0.0\/dbhome_1\nexport ORACLE_SID=ORCL\nexport PATH=$ORACLE_HOME\/bin:$PATH\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 3: Check Prerequisites<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/staging\/35037840\nopatch prereq CheckConflictAgainstOHWithDetail -ph .\/\nopatch prereq CheckSystemSpace\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 4: Shutdown Database<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sqlplus \/ as sysdba\nSHUTDOWN IMMEDIATE;\nEXIT;\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># Stop listener\nlsnrctl stop LISTENER\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 5: Apply Patch<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/staging\/35037840\nopatch apply\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># OPatch will:\n# - Check prerequisites\n# - Backup files\n# - Apply patch\n# - Update inventory\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Output<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>Do you want to proceed? &#91;y|n]\ny\n\nPatching component oracle.rdbms, 19.0.0.0.0...\nVerifying the update...\nPatch 35037840 successfully applied.\nOPatch succeeded.\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 6: Start Database<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># Start listener\nlsnrctl start LISTENER\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># Start database\nsqlplus \/ as sysdba\nSTARTUP;\nEXIT;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 7: Run Datapatch<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>$ORACLE_HOME\/OPatch\/datapatch -verbose\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># This applies SQL changes to database dictionary\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Datapatch Output<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>SQL Patching tool version 19.21.0.0.0\nDatabase 19.21.0.0.0 Release Update 35037840 : installed\n\nSQL Patching tool complete\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 8: Verify Patch<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sqlplus \/ as sysdba\n\n-- Check applied patches\nSELECT patch_id, patch_uid, action, status, description\nFROM dba_registry_sqlpatch\nORDER BY action_time DESC;\n\n-- Check database version\nSELECT * FROM v$version;\n\n-- Check registry components\nSELECT comp_name, version, status FROM dba_registry;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 9: Post-Patch Tasks<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Compile invalid objects\n@?\/rdbms\/admin\/utlrp.sql\n\n-- Check for invalid objects\nSELECT COUNT(*) FROM dba_objects WHERE status = 'INVALID';\n\n-- Gather dictionary stats\nEXEC dbms_stats.gather_dictionary_stats;\n\n-- Check alert log for errors\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 10: Application Testing<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>- Test critical applications\n- Run smoke tests\n- Monitor performance\n- Check for errors\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Rollback Procedure<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>If Patch Fails or Causes Issues<\/strong><\/h3>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Method 1: Using OPatch Rollback<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># Shutdown database\nsqlplus \/ as sysdba\nSHUTDOWN IMMEDIATE;\nEXIT;\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># Rollback patch\ncd $ORACLE_HOME\/OPatch\nopatch rollback -id 35037840\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># Start database\nsqlplus \/ as sysdba\nSTARTUP;\nEXIT;\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># Run datapatch for rollback\n$ORACLE_HOME\/OPatch\/datapatch -rollback 35037840\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># Verify\nSELECT * FROM dba_registry_sqlpatch;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Method 2: Restore from Backup (In-Place)<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># Shutdown database\nsqlplus \/ as sysdba\nSHUTDOWN ABORT;\nEXIT;\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># Restore Oracle Home\nrm -rf $ORACLE_HOME\ntar -xzf $ORACLE_HOME_backup.tar.gz\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># Restore inventory\nrm -rf $ORACLE_BASE\/oraInventory\ntar -xzf oraInventory_backup.tar.gz\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># Start database\nsqlplus \/ as sysdba\nSTARTUP;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Method 3: Switch Back (Out-of-Place)<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># Shutdown database\nSHUTDOWN IMMEDIATE;\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># Switch to old Oracle Home\nexport ORACLE_HOME=\/u01\/app\/oracle\/product\/19.0.0\/dbhome_1\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># Start database\nSTARTUP;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>6. DATAPATCH UTILITY<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What is Datapatch?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Definition:<\/strong><br><strong>Datapatch<\/strong> applies <strong>SQL changes to the database dictionary<\/strong> after the <strong>binary patch<\/strong> is applied.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Why Needed<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>OPatch:   Updates Oracle binaries (executables, libraries)\nDatapatch: Updates database dictionary (SQL, PL\/SQL objects)\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>When to Run<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>After applying <strong>RU \/ RUR<\/strong><\/li>\n\n\n\n<li>After applying <strong>bundle patches<\/strong><\/li>\n\n\n\n<li>After some <strong>one-off patches<\/strong> <em>(if README says so)<\/em><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Datapatch Commands<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Run Datapatch<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>$ORACLE_HOME\/OPatch\/datapatch\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Verbose Mode<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>$ORACLE_HOME\/OPatch\/datapatch -verbose\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Rollback Datapatch<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>$ORACLE_HOME\/OPatch\/datapatch -rollback &lt;patch_id&gt;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Check Status<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>-- View applied SQL patches\nSELECT * FROM dba_registry_sqlpatch\nORDER BY action_time DESC;\n\n-- Check if datapatch needed\nSELECT * FROM dba_registry_sqlpatch\nWHERE status != 'SUCCESS';\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Datapatch Process<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What Datapatch Does<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>1. Analyzes installed binary patches\n2. Identifies required SQL changes\n3. Applies SQL scripts to database\n4. Updates DBA_REGISTRY_SQLPATCH\n5. Validates completion\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Output<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>SQL Patching tool version 19.21.0.0.0 Production on Thu Jan 30 10:15:23 2025\nCopyright (c) 2012, 2024, Oracle.  All rights reserved.\n\nConnecting to database...OK\nDetermining current state...done\n\nCurrently installed SQL Patches:\n  Bundle patch 35037840 (Database Release Update 19.21.0.0.0)\n\nAdding patches to installation queue...\nInstalling patch 35037840 (Database Release Update 19.21.0.0.0)...\n\nPatch installation complete.  Total patches installed: 1\n\nValidating logfiles...done\nSQL Patching tool complete on Thu Jan 30 10:25:45 2025\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Common Datapatch Issues<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Issue 1: Datapatch Hangs<\/strong><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Cause<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Another datapatch session running<\/li>\n\n\n\n<li>Database in restricted mode<\/li>\n\n\n\n<li>Insufficient space<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Solution<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Check for running datapatch\nSELECT * FROM dba_registry_sqlpatch\nWHERE status = 'INSTALLING';\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Kill if stuck (use with caution)\n-- Find and kill the session\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Retry\n$ORACLE_HOME\/OPatch\/datapatch\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Issue 2: Datapatch Fails<\/strong><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Cause<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Invalid objects before patching<\/li>\n\n\n\n<li>Insufficient privileges<\/li>\n\n\n\n<li>Database not in correct state<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Solution<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Compile invalid objects\n@?\/rdbms\/admin\/utlrp.sql\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Check for errors in datapatch log\n-- Location: $ORACLE_BASE\/cfgtoollogs\/sqlpatch\/&lt;timestamp&gt;\/\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Retry datapatch\n$ORACLE_HOME\/OPatch\/datapatch\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Issue 3: Status Shows &#8220;WITH ERRORS&#8221;<\/strong><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Check<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT patch_id, action, status, description\nFROM dba_registry_sqlpatch\nWHERE status != 'SUCCESS';\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>7. PATCHING IN DIFFERENT ENVIRONMENTS<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Single Instance Database<\/strong><\/h3>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Process<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>1. Backup\n2. Shutdown database\n3. Apply patch with OPatch\n4. Start database\n5. Run datapatch\n6. Verify\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Downtime<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>30 minutes \u2013 2 hours<\/strong> <em>(depending on database size)<\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>RAC Environment<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Rolling Patch (Minimal Downtime)<\/strong><\/h3>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Prerequisites<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Patch must support <strong>rolling apply<\/strong><\/li>\n\n\n\n<li>Check <strong>README<\/strong> for rolling instructions<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Process<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>Node 1: Shutdown instance 1\nNode 1: Apply patch\nNode 1: Start instance 1\n    \u2193 (Services continue on Node 2)\nNode 2: Shutdown instance 2\nNode 2: Apply patch\nNode 2: Start instance 2\n    \u2193\nRun datapatch once (any node)\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Commands<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># On Node 1\nsrvctl stop instance -d ORCL -i ORCL1\nopatch apply\nsrvctl start instance -d ORCL -i ORCL1\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># On Node 2\nsrvctl stop instance -d ORCL -i ORCL2\nopatch apply\nsrvctl start instance -d ORCL -i ORCL2\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># On any node (once)\n$ORACLE_HOME\/OPatch\/datapatch\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Downtime<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Near-zero<\/strong> <em>(services relocate to other nodes)<\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Non-Rolling Patch<\/strong><\/h3>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Process<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>1. Shutdown all instances\n2. Apply patch on all nodes\n3. Start all instances\n4. Run datapatch\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Commands<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># Shutdown cluster database\nsrvctl stop database -d ORCL\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># On each node\nopatch apply\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># Start cluster database\nsrvctl start database -d ORCL\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># Run datapatch (once, any node)\n$ORACLE_HOME\/OPatch\/datapatch\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Data Guard Environment<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Rolling Patch Process<\/strong><\/h3>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 1: Patch Standby<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># On Standby\n# Stop MRP\nSQL&gt; ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># Apply patch\nopatch apply\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># Run datapatch\nSQL&gt; STARTUP;\nSQL&gt; EXIT;\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>$ORACLE_HOME\/OPatch\/datapatch\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># Restart MRP\nSQL&gt; ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 2: Verify Standby<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT * FROM dba_registry_sqlpatch;\nSELECT * FROM v$version;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 3: Switchover to Standby<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># Using Broker\nDGMGRL&gt; SWITCHOVER TO standby_db;\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># Or manual switchover\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 4: Patch Old Primary (Now Standby)<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># Stop MRP\nSQL&gt; ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># Apply patch\nopatch apply\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># Run datapatch\n$ORACLE_HOME\/OPatch\/datapatch\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># Restart MRP\nSQL&gt; ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 5: Switchover Back (Optional)<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>DGMGRL&gt; SWITCHOVER TO original_primary;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Total Downtime<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Only during switchover<\/strong> <em>(few minutes)<\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>8. BEST PRACTICES<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1. Always Read README<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Every patch has specific instructions<\/li>\n\n\n\n<li>Note prerequisites and known issues<\/li>\n\n\n\n<li>Follow Oracle&#8217;s recommended steps<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2. Test in Non-Production First<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>Development \u2192 QA \u2192 UAT \u2192 Production\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3. Always Take Backups<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># Full database backup\nRMAN&gt; BACKUP DATABASE PLUS ARCHIVELOG;\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># Oracle Home backup\ntar -czf $ORACLE_HOME_backup.tar.gz $ORACLE_HOME\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4. Use Out-of-Place for Production<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Easy rollback<\/li>\n\n\n\n<li>Zero risk to existing home<\/li>\n\n\n\n<li>Can test thoroughly<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5. Schedule Regular Patching<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>- Quarterly RU application\n- Critical security patches immediately\n- Plan patching calendar\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>6. Maintain Patch Inventory<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>- Document applied patches\n- Track patch levels across environments\n- Use centralized tracking\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>7. Monitor After Patching<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>- Check alert logs\n- Monitor performance\n- Watch for errors\n- Test critical applications\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>8. Keep OPatch Updated<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># Always use latest OPatch version\nopatch version\n\n# Update from MOS Patch 6880880\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>9. Plan Rollback Strategy<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>- Document rollback steps\n- Test rollback in non-prod\n- Keep backups until stable\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>10. Compile Invalid Objects<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>@?\/rdbms\/admin\/utlrp.sql\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>9. COMMON PATCHING ERRORS<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Error 1: OPatch failed with error code 73<\/strong><\/h3>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Cause<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Insufficient space in <strong>ORACLE_HOME<\/strong><\/li>\n\n\n\n<li><strong>\/tmp<\/strong> full<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Solution<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code># Check space\ndf -h $ORACLE_HOME\ndf -h \/tmp\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># Clean up space\nopatch util cleanup\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># Or set different temp directory\nexport TMP=\/path\/to\/large\/tmp\nexport TMPDIR=\/path\/to\/large\/tmp\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Error 2: Prerequisite check failed<\/strong><\/h3>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Cause<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>OPatch version too old<\/li>\n\n\n\n<li>Conflict with existing patch<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Solution<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code># Update OPatch\ncd $ORACLE_HOME\nmv OPatch OPatch.old\nunzip p6880880_190000_Linux-x86-64.zip\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># Check conflicts\nopatch prereq CheckConflictAgainstOHWithDetail -ph \/path\/to\/patch\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Error 3: Database not in correct state<\/strong><\/h3>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Cause<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Database not shutdown<\/li>\n\n\n\n<li>Listener still running<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Solution<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code># Shutdown everything\nsqlplus \/ as sysdba\nSHUTDOWN IMMEDIATE;\nEXIT;\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>lsnrctl stop LISTENER\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># Then apply patch\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Error 4: Datapatch fails<\/strong><\/h3>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Cause<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Invalid objects<\/li>\n\n\n\n<li>Insufficient privileges<\/li>\n\n\n\n<li>Database in restricted mode<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Solution<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Compile invalid objects first\n@?\/rdbms\/admin\/utlrp.sql\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Check database mode\nSELECT logins FROM v$instance;\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>-- If RESTRICTED, allow all\nALTER SYSTEM DISABLE RESTRICTED SESSION;\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Retry datapatch\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Error 5: Inventory corruption<\/strong><\/h3>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Cause<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Multiple patch attempts failed<\/li>\n\n\n\n<li>Inventory not updated correctly<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Solution<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code># Verify inventory\nopatch lsinventory -detail\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># If corrupted, restore from backup\nrm -rf $ORACLE_BASE\/oraInventory\ntar -xzf oraInventory_backup.tar.gz\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># Or run opatch util cleanup\nopatch util cleanup\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>10. INTERVIEW QUESTIONS<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Q1: What is the difference between RU and CPU?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>A:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>RU (Release Update):<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Cumulative patch with <strong>bug fixes + security fixes<\/strong><\/li>\n\n\n\n<li><strong>Recommended for all environments<\/strong><\/li>\n\n\n\n<li><strong>Proactive patching<\/strong><\/li>\n\n\n\n<li><strong>Current standard (18c+)<\/strong><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>CPU (Critical Patch Update):<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Security fixes only<\/strong><\/li>\n\n\n\n<li><strong>Legacy patching model<\/strong><\/li>\n\n\n\n<li><strong>Deprecated in favor of RU<\/strong><\/li>\n\n\n\n<li>Still available but <strong>not recommended<\/strong><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Best Practice:<\/strong><br>Always use <strong>RU<\/strong> as it includes all security fixes plus additional bug fixes.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Q2: What is OPatch and what does it do?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>A:<\/strong><br><strong>OPatch<\/strong> is Oracle\u2019s utility for applying patches to <strong>Oracle Home<\/strong>. It:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Applies <strong>binary patches<\/strong> to Oracle software<\/li>\n\n\n\n<li>Updates <strong>Oracle inventory<\/strong><\/li>\n\n\n\n<li>Checks <strong>prerequisites and conflicts<\/strong><\/li>\n\n\n\n<li>Provides <strong>rollback capability<\/strong><\/li>\n\n\n\n<li>Manages <strong>patch lifecycle<\/strong><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Key Operations:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>opatch apply      # Apply patch\nopatch rollback   # Rollback patch\nopatch lspatches  # List applied patches\nopatch version    # Check OPatch version\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Q3: What is datapatch and when do you run it?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>A:<\/strong><br><strong>Datapatch<\/strong> is a utility that applies <strong>SQL changes<\/strong> to the database dictionary after binary patches are applied.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Why Needed:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>OPatch<\/strong> updates binaries (executables)<\/li>\n\n\n\n<li><strong>Datapatch<\/strong> updates database objects (SQL, PL\/SQL)<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>When to Run:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>After applying <strong>RU \/ RUR<\/strong><\/li>\n\n\n\n<li>After applying <strong>bundle patches<\/strong><\/li>\n\n\n\n<li>After some <strong>one-off patches<\/strong> <em>(check README)<\/em><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Command:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ORACLE_HOME\/OPatch\/datapatch\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Verification:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT * FROM dba_registry_sqlpatch;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Q4: Explain in-place vs out-of-place patching.<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>A:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>In-Place Patching:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Apply patch directly to existing Oracle Home<\/li>\n\n\n\n<li>Simpler but risky<\/li>\n\n\n\n<li>Difficult rollback<\/li>\n\n\n\n<li>Less disk space needed<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Out-of-Place Patching:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Create new Oracle Home with patches<\/li>\n\n\n\n<li>Switch database to new home<\/li>\n\n\n\n<li>Easy rollback <em>(switch back to old home)<\/em><\/li>\n\n\n\n<li>Requires more disk space<\/li>\n\n\n\n<li><strong>Recommended for production<\/strong><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Out-of-Place:\nOld OH: \/dbhome_1 (19.3)\nNew OH: \/dbhome_2 (19.21 patched)\nSwitch database from dbhome_1 to dbhome_2\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Q5: How do you apply patches in a RAC environment?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>A:<\/strong> Two methods:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>1. Rolling Patch (Minimal Downtime):<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>- Patch one node at a time\n- Services continue on other nodes\n- Requires patch to support rolling\n- Near-zero downtime\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Process:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Node 1: Stop instance \u2192 Apply patch \u2192 Start instance\nNode 2: Stop instance \u2192 Apply patch \u2192 Start instance\nAny node: Run datapatch (once)\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>2. Non-Rolling (All Nodes Down):<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>- Stop all instances\n- Apply patch on all nodes\n- Start all instances\n- Run datapatch\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Best Practice:<\/strong><br>Use <strong>rolling patches<\/strong> when supported for minimal downtime.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Q6: What is a one-off patch?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>A:<\/strong><br>A <strong>one-off patch<\/strong> is a single patch for a specific bug.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Characteristics:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Targets one or few related bugs<\/li>\n\n\n\n<li>Not cumulative<\/li>\n\n\n\n<li>Applied on top of RU<\/li>\n\n\n\n<li>Small size<\/li>\n\n\n\n<li>Can cause conflicts<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Use Case:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>You encounter Bug 12345678\nOracle provides one-off patch for that bug\nApply on top of latest RU\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Important:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Always apply on <strong>current RU<\/strong><\/li>\n\n\n\n<li>May need to reapply after next RU<\/li>\n\n\n\n<li>Check for conflicts before applying<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Q7: How do you rollback a patch?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>A:<\/strong> Three methods:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Method 1: OPatch Rollback (In-Place)<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Shutdown database\nSHUTDOWN IMMEDIATE;\n\n# Rollback patch\nopatch rollback -id &lt;patch_number&gt;\n\n# Start database\nSTARTUP;\n\n# Rollback datapatch\n$ORACLE_HOME\/OPatch\/datapatch -rollback &lt;patch_id&gt;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Method 2: Restore from Backup (In-Place)<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Shutdown database\n# Restore Oracle Home from backup\n# Restore inventory from backup\n# Start database\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Method 3: Switch to Old Home (Out-of-Place)<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Shutdown database\n# Switch ORACLE_HOME to old home\n# Start database\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Easiest:<\/strong><br>Out-of-place patching with switch back to old home.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Q8: What prerequisites should you check before patching?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>A:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>1. OPatch Version:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>opatch version\n# Update if needed\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>2. Conflicts:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>opatch prereq CheckConflictAgainstOHWithDetail -ph .\/\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>3. Disk Space:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>df -h $ORACLE_HOME\ndf -h \/tmp\n# Need 5-10 GB free\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>4. Backups:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Full database backup\n# Oracle Home backup\n# Inventory backup\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>5. Applied Patches:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>opatch lspatches\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>6. Database Version:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT * FROM v$version;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>7. Read README:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Prerequisites<\/li>\n\n\n\n<li>Known issues<\/li>\n\n\n\n<li>Special instructions<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Q9: How do you verify a patch was applied successfully?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>A:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>1. Check OPatch Inventory:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>opatch lspatches\nopatch lsinventory | grep &lt;patch_number&gt;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>2. Check Database Registry:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT * FROM dba_registry_sqlpatch ORDER BY action_time DESC;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>3. Check Version:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT * FROM v$version;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>4. Check Component Status:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT comp_name, version, status FROM dba_registry;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>5. Check for Invalid Objects:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT COUNT(*) FROM dba_objects WHERE status = 'INVALID';\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>6. Check Alert Log:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>tail -100 alert_&lt;SID&gt;.log\n# Look for errors\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>7. Application Testing:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Test critical applications<\/li>\n\n\n\n<li>Run smoke tests<\/li>\n\n\n\n<li>Monitor for errors<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Q10: What is the Oracle patching schedule?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>A:<\/strong> Oracle releases patches on a <strong>quarterly schedule<\/strong>:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Release Update (RU) Schedule:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>January   - 3rd Tuesday\nApril     - 3rd Tuesday\nJuly      - 3rd Tuesday\nOctober   - 3rd Tuesday\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Jan 2025: 19.22 RU\nApr 2025: 19.23 RU\nJul 2025: 19.24 RU\nOct 2025: 19.25 RU\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Critical Patch Updates (CPU):<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Same schedule as RU <em>(deprecated)<\/em><\/li>\n\n\n\n<li>Security-only patches<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Best Practice:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Apply quarterly RUs within <strong>1\u20132 months<\/strong><\/li>\n\n\n\n<li>Test in non-prod first<\/li>\n\n\n\n<li>Critical security patches: <strong>Immediate<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Q11: How do you patch a Data Guard environment?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>A:<\/strong> Rolling patch process:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 1: Patch Standby Database<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;\nopatch apply\ndatapatch\nALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 2: Switchover to Standby<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>DGMGRL&gt; SWITCHOVER TO standby_db;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 3: Patch Old Primary (Now Standby)<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 4: Switchover Back (Optional)<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>DGMGRL&gt; SWITCHOVER TO original_primary;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Benefits:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Minimal downtime<\/li>\n\n\n\n<li>Test patch on standby first<\/li>\n\n\n\n<li>Easy rollback<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Total Downtime:<\/strong> <strong>2\u20135 minutes<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Q12: What is the difference between opatch apply and opatch napply?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>A:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>opatch apply:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Apply single patch<\/li>\n\n\n\n<li>Interactive mode<\/li>\n\n\n\n<li>Standard method<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>opatch napply:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Apply multiple patches<\/li>\n\n\n\n<li>Non-interactive<\/li>\n\n\n\n<li>Faster for bundles<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Usage:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>opatch apply\nopatch napply \/path\/to\/patches\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Q13: What should you do if datapatch fails?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>A:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 1: Check Logs<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ORACLE_BASE\/cfgtoollogs\/sqlpatch\/&lt;timestamp&gt;\/\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 2: Common Fixes<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@?\/rdbms\/admin\/utlrp.sql\nALTER SYSTEM DISABLE RESTRICTED SESSION;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 3: Retry<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ORACLE_HOME\/OPatch\/datapatch -verbose\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 4: Manual Fix \/ Oracle Support<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Q14: How do you check if a patch is already applied?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>A:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>opatch lspatches | grep &lt;patch_number&gt;\nopatch lsinventory | grep &lt;patch_number&gt;\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT patch_id, status FROM dba_registry_sqlpatch;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Q15: What is the impact of not patching regularly?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>A:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Security risks<\/strong><\/li>\n\n\n\n<li><strong>Stability issues<\/strong><\/li>\n\n\n\n<li><strong>Performance degradation<\/strong><\/li>\n\n\n\n<li><strong>Oracle Support limitations<\/strong><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Balance:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Don\u2019t patch blindly<\/li>\n\n\n\n<li>Don\u2019t delay excessively<\/li>\n\n\n\n<li>Plan, test, and document<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>11. QUICK REFERENCE<\/strong><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Common Patch Types<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>RU \u2013 Quarterly, cumulative<\/li>\n\n\n\n<li>RUR \u2013 Emergency fix<\/li>\n\n\n\n<li>One-Off \u2013 Single bug fix<\/li>\n\n\n\n<li>CPU \u2013 Security only <em>(legacy)<\/em><\/li>\n\n\n\n<li>PSU \u2013 Old term <em>(legacy)<\/em><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Essential Commands<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>opatch version\nopatch lspatches\nopatch apply\nopatch rollback -id &lt;patch_id&gt;\n$ORACLE_HOME\/OPatch\/datapatch\nSELECT * FROM dba_registry_sqlpatch;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Patching Checklist<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>\u2610 Read README\n\u2610 Check OPatch version\n\u2610 Check conflicts\n\u2610 Take full backup\n\u2610 Check disk space\n\u2610 Schedule downtime\n\u2610 Shutdown database\n\u2610 Apply patch\n\u2610 Start database\n\u2610 Run datapatch\n\u2610 Verify patch\n\u2610 Compile invalid objects\n\u2610 Test applications\n\u2610 Monitor alert logs<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You&#8217;re now ready for patching questions in your interview! <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Focus on:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>RU vs CPU difference<\/li>\n\n\n\n<li>OPatch and datapatch usage <\/li>\n\n\n\n<li>In-place vs out-of-place patching<\/li>\n\n\n\n<li>RAC\/Data Guard rolling patches<\/li>\n\n\n\n<li>Common errors and troubleshooting <\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Good luck with your interview! \ud83d\ude80<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Quick Summary Oracle database patching is a critical DBA responsibility involving applying updates to fix bugs, security vulnerabilities, and add new features.This guide covers patch types, strategies, procedures, and best practices for Oracle 19c. 1. PATCHING FUNDAMENTALS What is Patching? Definition:Patching is the process of applying software updates to Oracle Database to fix bugs, security [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5357,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"googlesitekit_rrm_CAowu461DA:productID":"","footnotes":""},"categories":[1225],"tags":[],"class_list":["post-5355","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts\/5355","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/comments?post=5355"}],"version-history":[{"count":1,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts\/5355\/revisions"}],"predecessor-version":[{"id":5356,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts\/5355\/revisions\/5356"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/media\/5357"}],"wp:attachment":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/media?parent=5355"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/categories?post=5355"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/tags?post=5355"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}