Best Practices for Maintenance Activities in Amazon RDS for Oracle

Best Practices for Maintenance Activities in Amazon RDS for OracleMore Info

Published on December 10, 2024

Category: Advanced (300), Amazon RDS, Best Practices, RDS for Oracle

Many customers choose to run their Oracle database workloads using managed services like Amazon Relational Database Service (Amazon RDS) for Oracle due to the numerous benefits they offer. A key advantage of Amazon RDS for Oracle is the simplified management of maintenance tasks. The service automates many of these activities, including operating system updates, database upgrades, storage scaling, time zone file upgrades, and more. This automation significantly reduces the time and resources spent on tasks that do not directly contribute to business value.

Similar to maintenance for on-premises Oracle databases, effective planning and testing are essential for maintenance activities in Amazon RDS to ensure seamless business operations. While the Amazon RDS for Oracle User Guide provides thorough information about these tasks, it may be challenging to quickly absorb the best practices regarding various maintenance activities. In this article, we outline the crucial maintenance tasks and the best practices associated with each.

Maintenance Windows

Amazon RDS performs maintenance on its resources to address security and instance reliability issues. The maintenance window allows you to control when modifications to the DB instance, database engine upgrades, and software patching occur, whether they are scheduled or required. During this time, Amazon RDS applies updates related to hardware, the underlying OS, or minor database engine versions. Some operations, like OS updates and database patching, may result in downtime for your RDS instance. It is advisable to set your RDS maintenance windows during quieter periods for your business to minimize the impact on applications. Customers receive notifications for scheduled maintenance through various AWS channels, promoting proactive planning and reducing surprises. The necessity of timely OS updates, particularly for security, highlights the importance of keeping systems current.

If a maintenance event is planned for a given week, it will initiate within the 30-minute maintenance window you specify. Most maintenance events conclude within this period; however, larger operations may require additional time. You may need to adjust the current maintenance window or postpone maintenance actions to lessen their impact on your application. Changing the maintenance window does not necessitate downtime, but if there are pending actions requiring downtime and you change the window to include the current time, those actions will be enacted immediately, causing downtime. You cannot delay a maintenance action that has already started, but you can defer one scheduled for the next maintenance window.

It’s also crucial to differentiate between pending modifications and pending maintenance. Pending modifications refer to changes deferred to the next maintenance window, either requested manually via the modify-db-instance API or through the console without the –apply-immediately option. In contrast, pending maintenance refers to actions suggested by RDS automation that are not manually initiated. For details about pending maintenance events for your RDS DB instances, visit the Events page on the Amazon RDS console. Also, you can utilize the AWS Command Line Interface (AWS CLI) to execute the describe-pending-maintenance-actions command or use the Amazon RDS API for DescribeDBInstances. For more information, see Viewing pending maintenance updates.

Infrastructure Maintenance

AWS routinely conducts maintenance with minimal disruption to RDS instances. Scheduled events may involve stops and reboots for planned maintenance or hardware degradation detection. Occasionally, hardware retirement necessitates scheduled events. Rarely, you may encounter a network maintenance event. Prior to any maintenance, you will receive email notifications detailing the scheduled windows, including the time and affected availability zones (AZs). If notified about hardware maintenance, it is advisable to restart the instance promptly during the maintenance window to prevent a planned maintenance event from turning into unplanned downtime. During hardware maintenance, Single-AZ deployments may be unavailable for several minutes. Conversely, for Multi-AZ deployments, your instance may experience downtime only long enough to fail over to the secondary AZ, typically taking 60–120 seconds. If only the secondary AZ requires maintenance, there will be no failover or downtime.

In cases where maintenance is scheduled for the primary instance in a multi-AZ setup, you can execute a manual failover. This turns the primary instance into a standby, allowing it to undergo maintenance on the scheduled date, thus avoiding downtime. To check which RDS DB instances are set for hardware maintenance during your maintenance window, review the DB instances listed on the Open and recent issues tab of your AWS Health Dashboard. For further details, consult the maintenance notification email sent to your account.

Scaling the Instance Class

You can adjust the RDS instance to modify its class or size to meet the dynamic resource demands of your workload. Most changes to a DB instance can be applied immediately or deferred until the next maintenance window. Altering the DB instance class does incur downtime, though this is minimal in a Multi-AZ environment since the standby instance is scaled first, followed by a failover to the newly sized database, with the former primary instance being resized afterward. Failover typically takes about 60–120 seconds. It’s important to note that a multi-AZ instance will operate in a different AZ at the end of the scaling process. If your workload has specific AZ requirements, a manual failover may be necessary post-scaling.

For Single-AZ RDS instances, downtime during the scaling operation lasts approximately 10 minutes. Amazon RDS automatically manages default Oracle memory-related parameters during scaling; however, you should review any custom-defined memory settings after the scaling operation. For example, if you have a parameter setting (like db_16k_cache_size) that conflicts with the resources available in the target instance class, the instance may enter an incompatible-parameters status during scaling.

Amazon RDS read replicas enhance performance and durability for RDS DB instances. They allow you to easily scale beyond the limits of a single DB instance for read-heavy workloads. Read replicas can be scaled independently of the primary RDS instance. For further insights, refer to this informative blog post here, and for additional authority on this topic, check out this link.

Furthermore, if you’re seeking an excellent resource for navigating your first day at Amazon, consider visiting this Reddit thread.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *