AWS Database Blog

Oracle Database zero downtime migration with AWS Database Migration Service and Accelario

This is a guest post by Michael Litner, Co-founder and VP R&D of Accelario.

Accelario is database migration software that provides a fast and easy way to load an Oracle database to Amazon Web Services (AWS). At the end of the initial load, database synchronization starts immediately using AWS Database Migration Service (AWS DMS), and the result is a zero downtime migration of your database.

Businesses that require 24/7 operation face a significant issue when moving databases into the cloud: Up until now, few if any cost-effective options existed to minimize the resulting downtime. With its recent integration with AWS DMS, Accelario provides a ready-to-use, zero downtime, full database migration solution—meaning that the whole database is migrated, including users, procedures, views, etc. When the process is done, you can access your database and start using it with your application immediately.

Another significant issue affecting such businesses is ensuring that sensitive information is not exposed as part of the process, which is critical for complying with data protection policies and regulations. You can achieve encryption of data in transit by using Oracle’s built-in features (including network data encryption)—also supported in Amazon Relational Database Service (Amazon RDS).

In this post, I go over how to use this combined solution to migrate a database to either Amazon EC2 or Amazon RDS (also using data masking). I also show you how to easily refresh a database after it’s in the cloud.

How it works

Accelario performs a logical migration. It reads the source database, parses its contents, and copies it to the destination. The engine orchestrates the migration process, with the data itself flowing directly from the source to the destination. Accelario takes care of all object types in the database: tables, indexes, packages, sequences, grants, table spaces, etc.

At the end of this initial load, Accelario automatically builds an AWS DMS environment that replicates ongoing changes between your source to the new target on AWS. After the replication is synced, you can request cutover at any time.

Best cases for using this solution with large databases

The following are some common scenarios in which you might use Accelario for your large database migrations:

  • Your databases are complex with many special objects and configuration (tablespace layout, table properties, or PL/SQL objects).
  • You have business requirements to shorten the initial load.
  • You want to eliminate some of the manual intervention and work (for scripting, fault tolerance, and so on).

Accelario Oracle Database Migration engine is available on AWS Marketplace. The migration process consists of only two parts:

  1. Initial load
  2. Ongoing data capture

Deploying and using the solution

To help you familiarize yourself with Accelario, we created an AWS CloudFormation template that includes the following:

  • A source Oracle database running on Amazon RDS.
  • A destination Oracle database running Amazon RDS.
  • An Accelario server directly deployed from AWS Marketplace.

You can download the template from this GitHub repository. After downloading the template file, open the AWS CloudFormation console and create the stack. The required parameters are Stack name, VPC ID, Key pair, Master RDS username, and password. Keep the default settings in all other fields.

In the end, you can find the Accelario link on the Outputs tab. Use the link to connect to the newly created Accelario server, and use AccelarioUser and AccelarioPassword as credentials to log in.

For the sake of this demo, let’s create some sample data in the source database:

CREATE USER sample3 IDENTIFIED BY mypassword;
grant unlimited tablespace to sample3;
create table sample3.emp1(id number, name varchar2(100), birth date);
alter table sample3.emp1 add constraint emp1_pk primary key(id) using index;

You will use this table in the next steps of the demo.

Configuring your migration in Accelario

You configure Accelario using a straightforward wizard, in which you choose the schemas and tables for migration. (For detailed instructions, download the Accelario User Guide.) You can also choose additional advanced features like remapping and data masking, as shown following.

The wizard also helps you set up the ensuing ongoing replication.

Executing the migration

Now that everything is configured, you can run the initial load of the migration and monitor its progress.

After the initial load is done, Accelario automatically sets up the AWS DMS configuration for applying the ongoing changes, replication instance, endpoints, and task. The starting point for replication is set up precisely according to the source database system change number (SCN). When the configuration is set, you can manage it from both the Accelario UI (shown following) and the AWS DMS console.

On the AWS DMS console, you can work with replication instances.

You can also manage your source and target endpoints.

And you can perform actions with AWS DMS tasks:

All done! The database is ready to use. All data, objects, users, and security components migrate, and all ongoing changes are contiguously applied. The only thing that’s left to do is to choose the suitable cutover time.

(Optional) Verifying replication

You can also verify the ongoing replication. Begin with a source database. The table is empty initially.

SOURCE> select * from emp1;
no rows selected

The destination table is also empty.

Then, insert a row into this table:

SOURCE> insert into emp1 values (1, 'John', '01-JAN-2018');
1 row created.
SOURCE> commit;
Commit complete.

You can see that the row was also automatically added to the destination database.

TARGET> select * from emp1;
        ID NAME			BIRTH
---------- ------------ ---------		
         1 John         01-JAN-18

Conclusion

Using the combined Accelario-AWS DMS solution, we were able to get up and running quickly with little effort, and we did not incur any downtime whatsoever. This solution is suitable for databases of any size, migrating hundreds of gigabytes per hour.

When you want to try it for yourself, Accelario is available on AWS Marketplace. Both Accelario and AWS DMS are priced by the hour. For pricing information, see Accelario Oracle Database Migration and AWS Database Migration Service pricing.

To learn more about Accelario features, contact us at info@accelario.com.


About the author

Michael Litner is VP R&D at Accelario Software ltd., with many years under his belt as a senior database engineer with several large enterprises. He is an expert in DB migrations, performance, synchronization, security, and problem solving.