Migrate stored procedures using SCT

We will now migrate some stored procedures using SCT, directly to Aurora (MySQL)

  1. While still having SCT up, we will now create a mapping rule to map the migration path of the objects:

    • Navigate to Settings in the menu, and click Mapping Rules

    • Click Add new rule

    • Use the values below for this workshop:

    Setting Value
    Name Maprule1
    For schema
    where database name like sampledb
    schema name like %
    Actions remove suffix
    suffix dbo
    • Click on Save all then Close
  2. After creating a mapping rule for this project, we will now run a Migration Report on the stored procedures we plan to migrate:

    • Unselect everything, click on the check box next to Procedures then right click on dbo, then click on Create Report

    • We should now be able to see a report similar to what we ran earlier. Review it, then click on Action Items:

    • You should now be able to see a summary of the Items that need your attention, and the ones that can’t be migrated directly.

  3. For this workshop, we will choose the objects that doesn’t have any issues being converted and migrated directly:

    • Select the 2 user stored procedures that don’t have a red exclamation point:
    • Then right click on Procedures, then click on Convert Schema

  4. Once converted, you should be able to see the converted stored procedures over on the right (Aurora MySQL), and if you click on any of the converted stored procedures, you should be able to see the conversion in the middle pane :

  5. Once ready, click on Schemas under the Aurora pane, then click on Apply to database (Changes on the database will not be applied without doing this step)

  6. After converting and migrating the stored procedures, you can then validate using MySQL Workbench to connect and verify the new stored procedures in the sampledb schema:

You have now successfully used SCT to convert and migrate stored procedures from SQL Server to MySQL (Aurora)