Convert Oracle code and schema to PostgreSQL syntax

After you create your conversion workspace and perform the initial schema conversion, you can fix conversion issues, modify your objects with the interactive editor, and apply converted schema to your destination database.

Databases can often have thousands of objects. Converting them all in a single session might be a challenging process. With conversion workspaces, you can divide the conversion process into multiple phases where you add new objects to the conversion, fix the issues, and then test them in your destination database.

To convert objects from your source database, do the following:

  1. In the Google Cloud console, go to Conversion workspaces.

    Go to Conversion workspaces

  2. From the list of available conversion workspaces, select your workspace.

    Conversion workspace editor opens.

  3. Use the Oracle schema panel to check your source objects for conversion issues. This panel contains all the objects you pulled from your schema during workspace creation.
  4. Fix your conversion issues.

    You can use the interactive SQL editor, upload a conversion mapping file to convert the object in a specific way, or utilize Gemini-assisted conversion features.

  5. Optional: You can also use the interactive SQL editor to adjust the converted schema to better meet your needs, even if there are no conversion issues with your object. For a list of editable Oracle objects, see Supported object types.
  6. After you fix conversion issues or adjust your schema, click Convert source. Database Migration Service now analyzes your changes and generates the updated PostgreSQL schema.

    You can inspect the converted schema in the Cloud SQL for PostgreSQL draft tab.

  7. Test the converted schema in your destination database. Do the following:
    1. Click Apply to destination > Test.
    2. On the Define destination page, use the Destination connection profile
    3. drop-down menu to select your destination connection profile.
    4. Click Define and continue.
    5. On the Select objects and test application page, use the checkboxes to select which
    6. converted PostgreSQL schema you want to apply in your destination database.
    7. Click Test application.

    Depending on the test results, you might need to further adjust your converted schema.

  8. If the schema snapshot you pulled from the source has more objects that you haven't migrated yet, add these objects to the workspace:
    1. In the Oracle panel, click Add objects.

      The object selection panel opens.

    2. In the schema tree, use the checkboxes to select which objects you want to add to the conversion and then click Add objects.
  9. Repeat steps 3 through 8 until you convert all the objects that you want to migrate.
  10. When you finish converting your schema, click Apply to destination > Apply.

    Database Migration Service now creates the schema definitions in your destination database.

What's next