Menu
AWS Database Migration Service
Step-by-Step Migration Guide (API Version 2016-01-01)

Step 4: Use AWS SCT to Convert the SQL Server Schema to Aurora MySQL

Before you migrate data to Amazon Aurora MySQL, convert the Microsoft SQL Server schema to an Aurora MySQL schema using the AWS Schema Conversion Tool (AWS SCT).

To convert a SQL Server schema to an Aurora MySQL schema

  1. In AWS SCT, choose File, New Project. Create a new project named AWS Schema Conversion Tool SQL Server to Aurora MySQL.

  2. In the New Project dialog box, enter the following information, and then choose OK.

    Parameter Description

    Project Name

    Type AWS Schema Conversion Tool SQL Server to Aurora MySQL.

    Location

    Use the default Projects folder and the default Transactional Database (OLTP) option.

    Source Database Engine

    Choose Microsoft SQL Server.

    Target Database Engine

    Choose Amazon Aurora (MySQL compatible).

    
                             Creating a new project in the AWS Schema Conversion
                                Tool
  3. Choose Connect to Microsoft SQL Server. In the Connect to Microsoft SQL Server dialog box, enter the following information, and then choose Test Connection.

    Parameter Description

    Server name

    Type the server name.

    Server port

    Type the SQL Server port number. The default is 1433.

    Instance name

    Type the SQL Server database instance name.

    User name

    Type the SQL Server admin user name.

    Password

    Provide the password for the admin user.

    
                            Test Connection to SQL Server Database in AWS SCT
  4. Choose OK to close the alert box. Then choose OK to close the dialog box and start the connection to the SQL Server DB instance. The database structure on the SQL Server DB instance is shown.

  5. Choose Connect to Amazon Aurora (MySQL compatible). In the Connect to Amazon Aurora (MySQL compatible) dialog box, enter the following information, and then choose Test Connection.

    Parameter Description

    Server name

    Type the server name.

    Server port

    Type the SQL Server port number. The default is 3306.

    User name

    Type the Aurora MySQL admin user name.

    Password

    Provide the password for the admin user.

    
                            Test Connection to Aurora MySQL Database in AWS SCT
  6. Choose OK to close the alert box. Then choose OK to close the dialog box and start the connection to the Aurora MySQL DB instance.

  7. Open the context (right-click) menu for the schema to migrate, and then choose Convert schema.

    
                            Choosing Convert schema in AWS SCT
  8. Choose Yes for the confirmation message. AWS SCT then converts your schemas to the target database format.

    
                             AWS SCT schema conversion

    AWS SCT analyzes the schema and creates a database migration assessment report for the conversion to Aurora MySQL.

  9. Choose Assessment Report View from View to check the report.

    The report breaks down by each object type and by how much manual change is needed to convert it successfully.

    
                             Database migration report in AWS SCT

    Generally, packages, procedures, and functions are more likely to have some issues to resolve because they contain the most custom PL/SQL code. AWS SCT also provides hints about how to fix these objects.

  10. Choose the Action Items tab.

    
                            Action Items in AWS SCT

    The Action Items tab shows each issue for each object that requires attention.

    For each conversion issue, you can complete one of the following actions:

    • Modify the objects on the source SQL Server database so that AWS SCT can convert the objects to the target Aurora MySQL database.

      1. Modify the objects on the source SQL Server database.

      2. Repeat the previous steps to convert the schema and check the assessment report.

      3. If necessary, repeat this process until there are no conversion issues.

      4. Choose Main View from View. Open the context (right-click) menu for the target Aurora MySQL schema, and choose Apply to database to apply the schema changes to the Aurora MySQL database, and confirm that you want to apply the schema changes.

        
                                            Apply Schema changes to the database
    • Instead of modifying the source schema, modify scripts that AWS SCT generates before applying the scripts on the target Aurora MySQL database.

      1. Choose Main View from View. Open the context (right-click) menu for the target Aurora MySQL schema name, and choose Save as SQL. Next, choose a name and destination for the script.

      2. In the script, modify the objects to correct conversion issues.

        You can also exclude foreign key constraints, triggers, and secondary indexes from the script because they can cause problems during the migration. After the migration is complete, you can create these objects on the Aurora MySQL database.

      3. Run the script on the target Aurora MySQL database.

    For more information, see Converting Database Schema to Amazon RDS by Using the AWS Schema Conversion Tool in the AWS Schema Conversion Tool User Guide.

  11. (Optional) Use AWS SCT to create mapping rules.

    1. Under Settings, select Mapping Rules.

    2. Create additional mapping rules that are required based on the action items.

    3. Save the mapping rules.

    4. Choose Export script for DMS to export a JSON format of all the transformations that the AWS DMS task will use. Choose Save.