AWS Database Blog

Working with OEM Agent software for HAQM RDS for Oracle

HAQM Relational Database Service (HAQM RDS) for Oracle is a fully managed database service that simplifies the setup, operation, and scaling of Oracle databases in the cloud. It alleviates the need for time-consuming database administration tasks by handling provisioning, backups, software patching, monitoring, and hardware scaling. With HAQM RDS for Oracle, you can focus on application development and innovation while HAQM Web Services (AWS) manages the underlying infrastructure. The service offers multiple Oracle Database versions, flexible licensing options, and features such as automated backups, Multi-AZ deployments for high availability, and read replicas for improved performance. Whether you’re migrating existing Oracle workloads or starting new projects, HAQM RDS for Oracle provides a reliable, secure, and scalable service for your database needs.

Oracle Enterprise Manager (OEM) is a comprehensive management tool designed to monitor and manage Oracle databases and applications. It provides a unified interface for system administrators and database professionals, allowing them to streamline operations, optimize performance, and monitor the health of their IT environments. With features such as real-time monitoring, automated diagnostics, and performance tuning, OEM empowers organizations to enhance productivity and reduce downtime, making it an essential component for efficient enterprise resource management.

Oracle Management Agent (OEM Agent) in HAQM RDS for Oracle is a component that enables monitoring and management of Oracle databases running on RDS instances. OEM Agent is a lightweight process that runs on the HAQM RDS for Oracle instance and communicates with Oracle Enterprise Manager Cloud Control, which is a centralized management console provided by Oracle.

HAQM RDS for Oracle supports specific versions of the OEM Agent. For a full list, refer to Oracle Management Agent for Enterprise Manager Cloud Control. HAQM recently released OEM Management Agent version 13.5.0.0.v2 for HAQM RDS for Oracle databases. OEM Agent version 13.5.0.0.v2 requires Oracle Management Server (OMS) version 13.5.0.23 at the minimum.

In this post we explore critical scenarios affecting OEM Agents on HAQM RDS for Oracle Database instances and outline essential considerations for users.

Configuration of OEM Management Agent on HAQM RDS for Oracle instance

OEM consists of several key components: the Management Server, which processes data and provides a user interface; the Management Repository, where configuration and performance data are stored; and the OEM Agents installed on target databases, which collect metrics and send them back to the Management Server. This architecture enables real-time monitoring, alerting, and reporting on database performance, resource usage, and security. By using this structure, administrators can proactively manage their Oracle environments, optimizing performance and reliability. The following diagram is the high-level architecture for the solution.

With HAQM RDS for Oracle, you need to enable the OEM Agent option in a custom options group to include the OEM Agent. Create a custom options group if it doesn’t exist and associate it with your HAQM RDS for Oracle instance. Remember to also properly configure the OMS details, including the hostname, port, and security group settings. Having proper network connectivity between your OMS and the RDS instance is also crucial for the OEM Agent to function correctly. After you’ve enabled the OEM Agent option, your RDS instance will enter a modifying state during the agent installation process. After the installation is complete and the instance returns to an available state, the OEM Agent will be enabled and ready for use with your Oracle Enterprise Manager setup. For detailed steps, refer to Monitor HAQM RDS for Oracle instances using Oracle Enterprise Manager.

The following table shows various scenarios and their impact on OEM Agent for HAQM RDS for Oracle. The behavior is similar for OEM Agents on both non-multitenant and multitenant HAQM RDS for Oracle databases.

Scenario ==>> RDS minor version upgrade OEM Management agent version upgrade Multi-AZ failure Rename of RDS instance Restore of RDS instance using PITR or snapshots
OEM Agent version with OMS Version
OEM Agent version 13.4.0.9.v1 with OMS version 13.4.0.19 No impact

To 13.5.0.0.v1 – Historical metrics data is lost

To 13.5.0.0.v2 – Historical metrics data is lost

(There is no historical metrics data loss if you change the agent version back to 13.4.0.9.v1)

No impact Add the RDS instance as a new agent (There is no historical metrics data loss if you change the name back to original value) No impact
OEM Agent version 13.4.0.9.v1 with OMS version 13.5.0.23 No impact

To 13.5.0.0.v1 – Historical metrics data is lost

To 13.5.0.0.v2 – Historical metrics data is lost

No impact Add the RDS instance as a new agent (There is no historical metrics data loss if you change the name back to original value) Historical metrics data is lost
OEM Agent version 13.5.0.0.v1 with OMS version 13.5.0.23 No impact To 13.5.0.0.v2 – No impact No impact Add the RDS instance as a new agent (There is no historical metrics data loss if you change the name back to original value) Historical metrics data is lost
OEM Agent version 13.5.0.0.v2 with OMS version 13.5.0.23 No impact Not Applicable No impact Add the RDS instance as a new agent (There is no historical metrics data loss if you change the name back to original value) No impact

HAQM RDS for Oracle minor version upgrade

A minor version upgrade applies an Oracle Database patch set update (PSU) or Release Update (RU) to a major engine version. The upgrade includes upgrading both the database binaries and the database dictionary. Minor version upgrades don’t impact the binaries or configuration files of OEM Management Agent, and the agent functionality won’t be impacted by these upgrades.

Oracle Management Agent upgrade

Depending on your current and target OEM Agent version on HAQM RDS for Oracle, you might observe different behavior while performing an upgrade.

  • OEM Agent upgrade from version 13.4.0.9.v1 to 13.5.0.0.v1 or 13.5.0.0.v2 – When upgrading the OEM Agent version from 13.4.0.9.v1 to 13.5.0.0.x, HAQM RDS for Oracle will remove the old 13.4.0.9.v1 OEM Agent from the custom options group associated with the RDS instance and add the new 13.5.0.0.x OEM Agent. However, this will result in a plugin version mismatch for the database targets because the new 13.5 OEM Agent has a different plugin than the old 13.4 OEM agent. Trying to install the 13.4 plugin on the 13.5 OEM Agent will also fail and you would need to re-add your database targets to the new 13.5 OEM Agent. This might lead to you losing historical performance metrics associated with those targets. To preserve the historical performance data, you can choose to install a new OMS instance and configure all your targets with the new 13.5 OEM Agents while keeping the old OMS running as a standalone historical data repository. To optimize costs, you can also consider scaling down the HAQM Elastic Compute Cloud (HAQM EC2) instance types for both the old OMS and Oracle Management Repository (OMR).
  • OEM Agent upgrade from version 13.5.0.0.v1 to 13.5.0.0.v2 –To upgrade the OEM Agent version 13.5.0.0.v1 to 13.5.0.0.v2, you need to remove the OEM Agent option 13.5.0.0.v1 from the custom options group associated with the RDS instance and add the 13.5.0.0.v2 OEM Agent option instead. After the OEM Agent option has been changed for HAQM RDS for Oracle instance, OMS will continue to communicate with the new OEM Agent and historical performance data will still be available for HAQM for Oracle instance and the target database.

HAQM RDS for Oracle multi-AZ failure

In a Multi-AZ deployment, RDS automatically creates a primary database (DB) instance and synchronously replicates the data to an instance in a different Availability Zone (AZ). When it detects a failure, RDS automatically fails over to a standby instance without manual intervention. When you provision an OEM Agent on your primary instance in a Multi-AZ deployment, both the binaries and the configuration files will be written to the storage of the secondary instance as part of the continuous data replication that happens between the two instances. HAQM RDS for Oracle uses the RDS instance endpoint to configure the host name of the OEM Agent, and this end point won’t change in case of the failover to the secondary instance. As a result, the OEM Agent will continue to run after Muti-AZ failover without needing to be reconfigured it. This scenario can be tested by rebooting the RDS instance with choosing the failover option.

Renaming HAQM RDS for Oracle instance

Sometimes you might need to rename your HAQM RDS for Oracle instances. There might be a situation where you are trying to clone lower environment databases from production. Renaming the RDS instance will interrupt communication between the instance and OMS. This is because renaming the instance changes the hostname, so the OMS can’t reestablish contact with the OEM Agent.

To resolve this, you need to modify the instance to associate it with the default options group, then modify it again to associate it with the custom options group. This triggers the creation of a new OEM Agent in OMS matching the changed instance name.

At this point, you must manually add the database target to this newly created OEM Agent.

Renaming the RDS instance disrupts the OMS-OEM Agent communication, necessitating a new OEM Agent registration. This process results in the loss of historical performance metrics associated with the previous OEM Agent. You should factor this in because it might impact their ability to access previously collected data.

It’s worth noting that after renaming the instance, if you change it back to the original name, OMS can reestablish the communication with the OEM Agent and historical performance metrics aren’t lost.

Restore of HAQM RDS for Oracle instance from automated backups and snapshots

Sometimes you might need to restore an HAQM RDS for Oracle instance to a previous point in time or from a manual snapshot. In these scenarios, you need to delete or rename the original instance before proceeding with the restore.

Deleting or renaming the original instance breaks the communication between that instance and its associated OEM Agent target in OMS, rendering the OEM Agent unreachable.

After the restore is complete, the OEM Agent will automatically be enabled on the new instance, as long as you have used the same options group that was configured for the original instance.

However, the behavior from this point forward depends on the OEM Agent version:

  • With OEM Agent version 13.4.0.9.v1 running on OMS version 13.4.0.19, a resynchronization from OMS will allow the new OEM Agent on the restored instance to reestablish communication with the already registered OEM Agent in OMS.
  • With OEM Agent version 13.4.0.9.v1 running on OMS version 13.5.0.23, the communication won’t reestablish even after resynchronization.
  • With OEM Agent version 13.5.0.0.v1, the communication won’t reestablish even after resynchronization.
  • With OEM Agent version 13.5.0.0.v2, a resynchronization from OMS will allow the new OEM Agent on the restored instance to reestablish communication with the already registered OEM Agent in OMS.

The key challenge here is that restoring the RDS instance requires deleting the original, which breaks the OMS integration. You need to be aware of the differing behaviors between OEM Agent versions when it comes to reestablishing that connection after the restore is complete.

Other monitoring options

In addition to OEM, AWS provides other monitoring mechanisms for HAQM RDS for Oracle databases.

  1. HAQM CloudWatch – HAQM CloudWatch provides several built-in metrics for RDS instances, such as CPU utilization, database connections, and free storage space. You can set up HAQM CloudWatch alarms to notify you when specific metrics exceed defined thresholds. CloudWatch Logs can be used to collect and analyze database logs, including error logs, audit logs, and slow query logs.
  2. Enhanced monitoring – Enhanced monitoring provides additional metrics for your RDS instances, including disk I/O, CPU, and memory utilization at the operating system level. These metrics can help identify performance bottlenecks and potential issues.
  3. HAQM RDS Performance Insights – Performance Insights is a database performance tuning and monitoring feature that provides a detailed view of the load on your database instances. It captures metrics such as SQL statements, wait events, and OS processes, and presents them in a straightforward format. Performance Insights offers a rolling 7 days of performance data history at no charge. This is enough time to troubleshoot a wide variety of issues. For pricing details around retention of performance data for more than 7 days in Performance Insights, refer to Performance Insights pricing.

Conclusion

In this post we explored critical scenarios affecting OEM Agents on HAQM RDS for Oracle Database instances. Oracle Enterprise Manager offers a robust mechanism for monitoring Oracle Databases and other applications. However, if you anticipate frequent changes in your environment, such as renaming the RDS instance or restoring the RDS instance, this may render the OEM Agent unreachable and require the you to reregister the OEM Agent as new in OMS. To avoid such a scenario, you can opt for alternative options such as Performance Insights available with the RDS instance as their primary mechanism to monitor Oracle databases. This can provide a more stable and reliable monitoring solution, particularly in environments prone to frequent infrastructure changes. Get started with learning about Performance Insights and let us know your questions and feedback in the comments section.


About the authors

Nipun Ravi is a Database Specialist Solutions Architect with HAQM Web Services. He works with the customers in the Canadian Public Sector, helping them architect, design, and optimize Data solutions in AWS.

Ibrahim Emara is a Database Specialist Solution Architect at HAQM Web Services, specializing in designing and implementing database solutions for AWS customers. With a focus on Oracle, PostgreSQL, HAQM Aurora, and AWS Database Migration Services, he drives cloud migrations and enhances database performance.