chris - Fotolia

Tip

Follow these steps for an Oracle-to-AWS migration

AWS represents the first viable alternative to Oracle for many organizations. Review your options, and follow these steps for a successful database move to the cloud.

Oracle and AWS executives have often sparred over Amazon's use, and eventual abandonment, of Oracle databases in its internal operations. But this public spat is merely a high-profile demonstration of the dilemma that many organizations face.

Oracle databases are a ubiquitous part of IT infrastructure, used by nearly all of the world's largest companies. They are also one of the most expensive, complicated and sticky elements, which makes them hard to optimize or replace. While SQL Server has worked for Windows shops, AWS and cloud computing represent the first truly viable path for many users that have long desired an alternative to Oracle on premises.

AWS provides many ways to operate Oracle databases more efficiently -- which reduces payouts to Oracle -- or replace them entirely with native Amazon services. But organizations that opt for an Oracle-to-AWS migration will need to figure out how to move their data and to which service. Let's review the options to determine the right fit for your IT architecture.

AWS services for Oracle users

Oracle users on AWS have three integration options:

  1. EC2: Use EC2 compute instances and Elastic Block Store (EBS) storage to run self-managed Oracle databases and replace on-premises servers and storage with AWS infrastructure.
  2. RDS: Shift to Amazon Relational Database Service, a managed database service for Oracle and other widely used databases, which insulates the user from many management tasks but still uses AWS infrastructure.
  3. Aurora: Move to Amazon Aurora, a database platform designed and optimized by AWS for its cloud infrastructure. Although part of RDS, Aurora uses a new ACID-compliant relational database engine that's compatible with MySQL and PostgreSQL. As such, Aurora is not a drop-in replacement for Oracle but includes most of its key features and is the platform to which Amazon itself is migrating.

Oracle-to-AWS migrations will vary in complexity, depending on which of these service options an organization chooses. Self-managed EC2 servers is the easiest path, while a switch to Aurora is the most involved method to replace an Oracle database.

In addition, each service has its own advantages and drawbacks. Organizations retain the most control and customization with EC2, though it carries additional management and overhead for database administrators (DBAs). RDS, outfitted with either the Oracle or Aurora engines, insulates users from many operational tasks and provides for automatic replication across availability zones, though it lacks some Oracle features and customization options.

How to migrate Oracle to hosted AWS environments

A DBA can use EC2 to support any Oracle edition, i.e., Express, Standard or Enterprise. AWS provides documentation for several design options, but each entails the selection of the best-sized instance for your application, attachment of EBS volumes and deployment into an Amazon Virtual Private Cloud.

Next, you have to migrate the data, either with a single-step process that requires extended downtime or a more complicated two-step approach that minimizes downtime. Either technique will work, whether you migrate to EC2 or RDS. The former requires you stop the original database, clone it to AWS, validate the cloned data and then restart. The downtime here will be a function of how long it takes to copy the data.

The two-step process requires you to copy the database while it runs -- ideally, during periods of light usage. Then, you'll validate and start the new database and replicate any database changes that occurred after original copy.

A DBA also can use software tools to accomplish data migrations, including:

  • AWS Database Migration Service (DMS) is a managed tool that supports migrations between like database engines -- i.e., Oracle-to-Oracle -- or heterogeneous ones, such as Oracle-to-MySQL.
  • Oracle Recovery Manager (RMAN) provides database backup, restoration and recovery for disaster recovery or migrations via highly reliable data transport and verification techniques. RMAN can clone active databases and also handles required procedures to free a database of OS dependencies.
  • Oracle GoldenGate, available as an installed application or cloud service, provides real-time data replication to Oracle and other heterogeneous environment databases. The product is flexible, able to migrate particular tables or data subsets, fast and supports many different replication topologies. GoldenGate is an optional software product, not part of an Oracle distribution.
  • Oracle Data Pump Export is a tool that copies Oracle data and metadata into a set of OS files that can be copied and imported to another system with a complementary Import utility. It also supports subsets of data and metadata using export filters.
  • Oracle Streams Replication is another data replication utility that is free and highly customizable but only works with Oracle databases. Streams is also a deprecated feature in Oracle 12c that might be unsupported or unavailable in future releases.

DMS is the easiest approach to the Oracle-to-AWS migration for many organizations, particularly those with relatively straightforward needs. However, IT shops with complex and highly customized environments will likely want to use one of the more flexible Oracle tools, such as GoldenGate, RMAN or Streams.

How to migrate Oracle databases to Aurora

Organizations typically migrate their on-premises Oracle database to AWS in two steps. First, they'll move the databases to an Oracle instance, either EC2 or RDS, as we've detailed. Then, they'll consider Aurora. Indeed, this appears to be what Amazon itself did.

The actual Oracle-to-Aurora conversion also involves two steps and requires three AWS tools to complete it. You'll plan and track the project with the AWS Database Migration Playbook, a guide of process steps, configuration checks and best practices to streamline a successful heterogeneous database migration. The first edition of the playbook covers Oracle-to-Aurora migrations.

The first step is to convert the database schema with the AWS Schema Conversion Tool (SCT). Then, the data is copied via DMS.

database migration process
Tackle database migration with these initial steps.

The SCT will generate a conversion report that identifies the issues, limitations and actions required for the schema conversion, along with a set of schema conversion scripts to be applied before running DMS. These will do any necessary code conversion for objects like procedures and views. SCT will also identify issues like unsupported object types that must be manually fixed.

After the schema is converted and updated for Aurora, the DMS can load data into the target database. It also requires some post-migration cleanup, such as the creation of additional indexes, enablement of foreign keys and application modifications to point to the new database.

Users will find many benefits to an Aurora conversion. These include performance improvements of 2x to 5x over hosted MySQL and PostgreSQL. Oracle users that make the switch will also eliminate their licensing costs, which is undoubtedly a key factor in Amazon's migration.

Dig Deeper on AWS database and analytics strategy