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 19c Database Deployment with Docker

Oracle 19c Database Deployment with Docker 🐳 Oracle 19c Database Deployment with Docker Welcome to this comprehensive guide on deploying, configuring, and managing Oracle 19c Database using Docker containers. This blog will walk you through the entire process from setup to production best practices with practical code examples. Docker provides an excellent way to run Oracle databases in isolated, portable containers, making it easy to deploy and manage Oracle 19c instances for development, testing, and production environments. This approach offers numerous benefits: πŸ”’ Isolation : Run Oracle in a containerized environment without affecting your host system 🚚 Portability : Easily move your database between different environments πŸ”„ Reproducibility : Quickly spin up identical database instances ⚡ Resource Efficiency : Use Docker's resource management capabilities to control CPU, memory, and stor...

Mastering Oracle RAC with CRSCTL commands

Mastering Oracle Clusterware Administration: Essential Commands & Best Practices Oracle Clusterware is a key component for managing cluster environments, ensuring high availability and resource management for Oracle databases. Below are essential commands for managing Oracle Clusterware effectively. What is crsctl? crsctl (Cluster Ready Services Control) is a command-line utility provided by Oracle to manage Oracle Clusterware. It allows administrators to start, stop, check, and configure various aspects of cluster services. With crsctl , DBAs can control cluster resources, manage voting disks, check the status of Oracle High Availability Services, and ensure the proper functioning of Oracle RAC environments. Starting and Stopping Oracle Clusterware On Local Node Stop Clusterware: crsctl stop cluster Start Clusterware: crsctl start cluster On RAC Standalone/Oracle Restart Stop Cluster: crsctl stop has Start Cluster: crsctl start has On All Nodes or All Hub Nodes Start Clusterware:...