Skip to main content

🛠️ How to Apply Oracle 19.27 Patch on Enterprise Manager Database 🛠️

🛠️ How to Apply Oracle 19.27 Patch on Enterprise Manager Database 🛠️

🚀 Introduction

Keeping your Enterprise Manager database up-to-date with the latest patches is essential for maintaining security, stability, and performance. In this blog post, I'll guide you through the specific process of applying the Oracle 19.27 patch to your Enterprise Manager database. This detailed walkthrough covers everything you need to know to successfully complete this critical maintenance task with minimal downtime.

The Oracle 19.27 patch includes important security fixes, performance improvements, and bug fixes that are vital for your OEM environment. Following this methodical approach will ensure a smooth patching experience while minimizing risks to your monitoring infrastructure. ✨

📝 Summary

  • ✅ Oracle 19.27 patch provides critical security and performance updates
  • 🛑 Always stop OMS services before patching
  • 💾 Create complete backups before applying any patches
  • 🔄 Run pre-conflict checks to identify potential issues
  • 🔍 Use verbose mode with datapatch for detailed logs
  • ✨ Thorough verification steps ensure patch success
  • 🛡️ Keep your Oracle environment secure and up-to-date

📋 Prerequisites

Before beginning the Oracle 19.27 patching process, ensure you have:

  • 📦 Oracle Database 19c installed and running as your Enterprise Manager repository
  • 📥 Downloaded the Oracle 19.27 patch (p37642901_190000_Linux-x86-64.zip) from My Oracle Support
  • ✔️ Verified the patch is applicable to your specific environment
  • 🔒 Created a backup of your database (RMAN backup recommended)
  • 📅 Scheduled appropriate downtime for OEM services
  • 💽 Verified sufficient disk space for patch files and backups
  • 📝 Reviewed the patch README file for any specific prerequisites

🛑 Step 1: Stop OMS Services

The first step is to gracefully shut down all OMS services to prevent any active operations from interfering with the database patching process.

# Set environment variable for OMS (should be already configured)
$ oms

# Navigate to OMS home
$ cd $ORACLE_HOME
$ pwd
/opt/app/oracle/em13cr5/middleware

# Check current OMS status
$ cd bin
$ ./emctl status oms
Oracle Enterprise Manager Cloud Control 13c Release 5
Copyright (c) 1996, 2021 Oracle Corporation.  All rights reserved.
WebTier is Up
Oracle Management Server is Up
JVMD Engine is Up

# Stop all OMS services
$ ./emctl stop oms -all
Oracle Enterprise Manager Cloud Control 13c Release 5
Copyright (c) 1996, 2021 Oracle Corporation.  All rights reserved.
Stopping Oracle Management Server...
WebTier Successfully Stopped
Oracle Management Server Already Stopped
AdminServer Successfully Stopped
Oracle Management Server is Down
JVMD Engine is Down

# Verify all OMS services are stopped
$ ./emctl status oms
Oracle Enterprise Manager Cloud Control 13c Release 5
Copyright (c) 1996, 2021 Oracle Corporation.  All rights reserved.
WebTier is Down
Oracle Management Server is Down
JVMD Engine is Down

Pro Tip: ✨ Always check the status after stopping services to confirm they're fully down before proceeding.


🤖 Step 2: Stop OEM Agent

Next, we need to stop the OEM agent to ensure no monitoring activities interfere with our patching process.

$ cd /opt/app/oracle/agent/agent13cr5/agent_13.5.0.0.0/bin
$ ./emctl stop agent

Step 3: Shut Down Database Services and Listener

Since we're patching the entire environment, we need to stop the database services and listener.

# Connect to the database as SYSDBA
$ sqlplus / as sysdba
SQL> shut immediate

# Stop the listener
$ lsnrctl stop

Note: The database shutdown is necessary to ensure data consistency during the patching process.


💾 Step 4: Back Up Oracle Home and OMS Home

Never skip backups! Creating a backup of your Oracle home and OMS home directories is essential before applying any patches.

# Create backup directory
$ mkdir /oraback/backup_patch/

# Backup Oracle home
$ cd $ORACLE_HOME
$ cd ..
$ ls
db_1
$ tar -pcvf /oraback/backup_patch/oracle_home_bkup.tar db_1 

# Backup OMS home
$ cd /opt/app/oracle/em13cr5
$ tar -pcvf /oraback/backup_patch/oms_home_bkup.tar middleware

Safety First: These backups are your safety net. In case something goes wrong during the patching process, you can restore these backups to return to a working state.


🔄 Step 5: Apply the Oracle 19.27 Patch

Now we're ready to apply the 19.27 patch. This involves unpacking the patch, running a pre-conflict check, and applying the patch to the Oracle home.

# Unzip the 19.27 patch file
$ cd /oraback/patch/
$ unzip p37642901_190000_Linux-x86-64.zip

# Navigate to the patch directory
$ cd /oraback/patch/37642901

# Perform pre-conflict check to identify potential issues
$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./

# Apply the 19.27 patch
$ opatch apply

Best Practice: 💡 The pre-conflict check is crucial for identifying potential issues before they cause problems. Review any warnings carefully before proceeding with the patch application.

During the patch application, you'll see a series of prompts and progress indicators. Carefully read each prompt and respond appropriately. The patch will modify various database components and update necessary files. This process typically takes 15-30 minutes depending on your system performance.


🏁 Step 6: Start Database Services and Apply Database Patches

After the binary patch is applied, we need to start the database and run datapatch to update the database components with the Oracle 19.27 updates.

# Start the database
$ sqlplus / as sysdba
SQL> startup

# Apply the 19.27 database patches
$ cd /opt/oracle/product/19.3.0/db_1/OPatch
$ ./datapatch -verbose

# Watch for any errors in the output
# Expected output will show successful application of the 19.27 patches

# Start the listener
$ lsnrctl start

Why use -verbose with datapatch? 🔍 The verbose option provides detailed information about each SQL patch being applied to the database. This helps you identify exactly which patches are being applied and any potential issues that might arise during the process. The logs are invaluable for troubleshooting if any issues occur.

The datapatch utility applies SQL changes needed for the 19.27 patch by updating database components like data dictionary objects, PL/SQL packages, and internal database structures. This process ensures that the database is fully aligned with the patched Oracle home.


▶️ Step 7: Start OMS Services and OEM Agent

Finally, we need to bring all services back online.

# Navigate to OMS home
$ oms
$ cd $ORACLE_HOME
$ pwd
/opt/app/oracle/em13cr5/middleware

# Start OMS services
$ cd bin
$ ./emctl start oms

# Start OEM agent
$ cd /opt/app/oracle/agent/agent13cr5/agent_13.5.0.0.0/bin
$ ./emctl start agent

✅ Verification Steps

After completing the Oracle 19.27 patching process, it's important to verify that everything is functioning correctly:

  1. 🔍 Verify patch application in the Oracle home:

    $ opatch lsinventory | grep -i 19.27
    
  2. 📊 Check the database version and patch level:

    $ sqlplus / as sysdba
    SQL> select PATCH_ID, PATCH_UID, STATUS, DESCRIPTION from DBA_REGISTRY_SQLPATCH order by ACTION_TIME;
    SQL> select * from v$version;
    
  3. 🟢 Check OMS status after restart:

    $ ./emctl status oms -details
    
  4. 🤖 Verify agent status:

    $ ./emctl status agent
    
  5. 🖥️ Log into OEM console and verify functionality:

    • Ensure targets are being monitored correctly
    • Check for any error messages or warnings
    • Verify key functionality like notifications and reports
  6. 📝 Review patch logs:

    $ cd $ORACLE_HOME/cfgtoollogs/opatch
    $ ls -ltr
    # Review the latest log file
    

⚠️ Common Issues and Troubleshooting with Oracle 19.27 Patch

When applying the Oracle 19.27 patch to your Enterprise Manager database, you might encounter some common issues:

  1. ❌ OPatch fails with conflicts:

    • Error: "Patch conflicts detected"
    • Solution: Review the conflict details and ensure any conflicting patches are rolled back first using opatch rollback
  2. ⚠️ Datapatch errors:

    • Error: "ORA-04068: existing state of packages has been discarded"
    • Solution: This is often transient. Re-run datapatch after a brief wait
  3. 🔄 Database startup issues after patching:

    • Error: "ORA-32004: obsolete or deprecated parameter(s)"
    • Solution: Check alert log for specific parameter issues and update your parameter file
  4. 🔌 OMS connectivity issues after database patch:

    • Error: "Cannot connect to the OMS. Connection refused"
    • Solution: Verify listener is properly configured and running for the patched database
  5. ⏱️ Performance regression after patch:

    • Symptom: Slower performance of OEM queries
    • Solution: Gather database statistics with DBMS_STATS.GATHER_DICTIONARY_STATS

🔄 Patch Rollback Procedure

If you encounter critical issues with the 19.27 patch, you may need to roll it back:

# Stop all OMS services first
$ ./emctl stop oms -all

# Stop the agent
$ ./emctl stop agent

# Shut down the database
$ sqlplus / as sysdba
SQL> shutdown immediate

# Roll back the patch
$ cd /opt/oracle/product/19.3.0/db_1/OPatch
$ opatch rollback -id 37642901

# Start the database
$ sqlplus / as sysdba
SQL> startup

# Run datapatch to sync database components
$ ./datapatch -verbose

# Start the listener and OMS services
$ lsnrctl start
$ ./emctl start oms
$ ./emctl start agent

🏆 Conclusion

Successfully applying the Oracle 19.27 patch to your Enterprise Manager database requires careful planning and execution, but the benefits are substantial. ✅ This patch delivers important security fixes, performance optimizations, and bug fixes that will keep your OEM environment running smoothly and securely.

By following the step-by-step process outlined in this blog post, you can minimize downtime and ensure a successful patching experience. Remember that proper preparation, including thorough backups and environment verification, is key to a smooth patching process. 🛡️

The Oracle 19.27 patch specifically addresses several known issues in earlier releases and introduces improvements that enhance the stability and security of your Enterprise Manager database. Keeping your database up-to-date with these critical patches is an essential part of your database maintenance strategy. 🚀

Have you encountered any unique challenges while applying the Oracle 19.27 patch to your Enterprise Manager database? Share your experiences in the comments below! 💬


 #Oracle #19.27Patch #DatabasePatching #OEM #EnterpriseManager #Oracle19c #DBMaintenance #OracleDBA #SecurityPatching 🏷️

Comments

Popular posts from this blog

🚀 Automating Oracle Database Patching with Ansible: A Complete Guide

Oracle database patching has long been the bane of DBAs everywhere. It's a critical task that requires precision, expertise, and often results in extended maintenance windows. What if I told you that you could automate this entire process, reducing both risk and downtime while ensuring consistency across your Oracle estate? 💡 In this comprehensive guide, I'll walk you through a production-ready Ansible playbook that completely automates Oracle patch application using OPatch. Whether you're managing a single Oracle instance or hundreds of databases across your enterprise, this solution will transform your patch management strategy! 🎯 🔥 The Challenge: Why Oracle Patching is Complex Before diving into the solution, let's understand why Oracle patching is so challenging: 🔗 Multiple dependencies : OPatch versions, Oracle Home configurations, running processes ⚠️ Risk of corruption : Incorrect patch application can render databases unusable ⏰ Downtime requirements : Da...

Oracle RAC Switchover & Switchback: Step-by-Step Guide

 Ensuring business continuity requires regular Disaster Recovery (DR) drills. This guide covers the Switchover and Switchback process between Primary (DC) and Standby (DR) databases . Pre-checks Before Performing Switchover Before starting the activity, ensure there are no active sessions in the database. If any are found, share the session details with the application team, get their confirmation, and terminate the sessions. Primary Database Name: PRIMARY Standby Database Name: STANDBY  Identify Active Sessions set lines 999 pages 999 col machine for a30 col username for a30 col program for a30 compute sum of count on report break on report select inst_id,username,osuser,machine,program,status,count(1) "count" from gv$session where inst_id=1 and program like 'JDBC%' group by inst_id,username,osuser,machine,program,status order by 1,2; select inst_id,username,osuser,machine,program,status,count(1) "count" from gv$session where inst_id=2 and program lik...

Mastering Oracle RAC with SRVCTL Commands

Oracle Real Application Clusters (RAC) provide high availability, scalability, and manageability for databases. One of the most powerful tools for managing RAC databases is srvctl , a command-line utility that allows administrators to control various database services. This blog explores essential srvctl commands to help you efficiently manage Oracle RAC environments. 1. Checking Database Configuration and Status  List all available databases on the host:                  srvctl config database   Check the status of a specific database and its instances:                    srvctl status database -d <database_name>   Retrieve detailed status information about a database, including its instances and states:                    srvctl status database -d <database_name> -v 2. Stopping and Starting Databases   ...