Hands-On Guide to Migrating Databases with AWS Schema Conversion Tool (SCT)

Welcome to our AWS Certified Solutions Architect Professional tutorial series. In this tutorial, I will demo on AWS Schema Conversion Tool.

Migrating your on-premises databases to the AWS cloud can be a daunting task. However, with the help of the AWS Schema Conversion Tool (SCT), this process becomes more manageable. AWS SCT automates the conversion of your source database schema and code objects into a format compatible with your target database. This article will provide a hands-on guide to using AWS SCT in offline mode, step by step.

Prerequisites

Before we get started, make sure you have the AWS SCT software installed on your machine. You will also need access to your source database and your AWS account credentials.

1. Creating a New AWS SCT Project

  1. Launch AWS SCT and create a new project. This project will serve as a container for your migration tasks.
  2. Once the project is created, you’ll be prompted to add a source database. In this example, we’ll use an Oracle database.
  3. Enter the connection details for your source database, including the hostname, port, username, and password. Click “Connect” to establish a connection.

2. Selecting Database Schemas

  1. In the main view of your project, select the database schemas that you want to migrate to the AWS cloud. Be selective, as loading metadata for all schemas can take a long time.
  2. To load metadata for the selected schemas, navigate to the Source Metadata Tree, select the Schemas node, and choose “Load Metadata.” Make sure you selected all schemas you want to migrate.

3. Working in Offline Mode

  1. Save your AWS SCT project and disconnect from the source database. You are now working in offline mode.
  2. In offline mode, you can perform various operations, including adding mapping rules, creating database migration assessment reports, converting database schemas and code, and editing your source and converted code.

4. Adding Mapping Rules

  1. Mapping rules define the target database platform for each source database schema. For example, you can choose Amazon Aurora PostgreSQL-Compatible Edition for the Chinook schema and Amazon Redshift for the LargeDB schema.

5. Creating a Database Migration Assessment Report

  1. Switch to the main view and create a database migration assessment report. This report provides a summary of your schema conversion tasks and details any items that AWS SCT can’t automatically convert.
  2. The assessment report uses the loaded metadata of the Chinook and LargeDB schemas stored in the project to provide insights.

6. Converting Database Schemas

  1. Now that you have your assessment report, proceed to convert the selected database schemas to their respective target database platforms.
  2. The target metadata tree will now include the converted code for these schemas.

7. Editing Code

  1. You can edit the database code stored in the AWS SCT project. For instance, if AWS SCT can’t convert a particular procedure due to compatibility issues, you can make changes manually.
  2. In our example, we changed the SYSDATE function to CURRENT_DATE, allowing AWS SCT to convert the procedure without issues.

8. Saving Converted Code

  1. After successful conversion, save the converted code to a text file. This code can be reviewed, edited further, and then applied to the target database.

Conclusion

Migrating your on-premises databases to the AWS cloud is a complex process, but AWS Schema Conversion Tool simplifies it significantly. By following this hands-on guide, you can efficiently use AWS SCT in offline mode to assess, convert, and edit your database schemas and code for seamless migration to the AWS cloud. Happy migrating!

Leave a Comment

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

Scroll to Top