Stay organized with collectionsSave and categorize content based on your preferences.
This page shows you how to create a conversion workspace and use
it to immediately perform deterministic code and schema conversion from Oracle
to PostgreSQL. Before you create the workspace, make sure that youcreate a connection profile for your source database.
Workspaces with the built-in editor
When you create an interactive conversion workspace,
you can upgrade it to accessGemini auto-conversion.
Upgrading the workspace is possible only once,
immediately after you open the newly created conversion workspace.
This operation is described as the last step in this procedure.
To create an interactive conversion workspace and perform the schema
conversion, do the following:
In the Google Cloud console, go toConversion workspaces.
On theCreate a conversion workspacepage, do the following:
Enter the name, identifier, and region for your conversion workspace.
From theSource database enginedrop-down menu, selectOracle.
From theDestination database engineselectCloud SQL for PostgreSQL.
ClickCreate workspace and continue.
On theDefine source and pull schema snapshotpage, do the following:
From theSource connection profiledrop-down menu, select the connection
profile for your source database.
ClickPull schema snapshot and continue.
Database Migration Service is now connecting to the source database and retrieving your schema.
This process can take several minutes.
On theSelect and convert objectspage, use the checkboxes to select which objects
you want to convert to PostgreSQL syntax.
You don't have to convert all your objects in one go. Instead, you can
select just a few objects now andadd more objects to the conversionlater.
ClickConvert and continue.
The conversion workspace opens.
When you open a new workspace for the first time, you can upgrade it to
access the Gemini-powered auto-conversion feature.
Do the following:
In theIntroducing Gemini auto-conversiondialog, select theUpgrade workspace to explore the new experiencecheckbox, and clickContinue.
In theConvert source objects with Gemini?dialog,
clickConvert.
Database Migration Service now performs the conversion process again to
apply Gemini-powered conversion enhancements
on top of the deterministic conversion results.
For more information on Gemini auto-conversion
feature, seeGemini auto-conversion.
Legacy conversion workspaces
Legacy conversion workspaces are an older, more limited type of conversion
workspaces. We don't recommend using the legacy type of conversion
workspaces for your migrations. If you need to use a legacy conversion workspace,
expand theCreate a legacy conversion workspace and convert schemasection
for more information.
Create a legacy conversion workspace and convert schema
Legacy conversion workspaces use Ora2Pg configuration files.
Before you create a legacy conversion workspace, make sure you first
create your Ora2Pg configuration outside Database Migration Service.
For more information, seeWork with legacy conversion workspaces.
In the Google Cloud console, go toConversion workspaces.
On theCreate a conversion workspacepage, do the following:
Enter the name, identifier, and region for your conversion workspace.
From theSource database enginedrop-down menu, selectOracle.
From theDestination database engineselectCloud SQL for PostgreSQL.
Expand theCustomize workspace configurationssection,
and select theEnable legacy conversion workspacecheckbox.
ClickCreate workspace and continue.
On theConnect to source and convert objectspage, do the following:
From theSource connection profiledrop-down menu, select the connection
profile for your source database.
In theConfiguration filebox, clickBrowseand use
the system file picker to select your conversion mapping file.
You can upload multiple conversion mapping files by clickingAdd file.
In theConvert the configurationsection, clickPull schema and convert.
Database Migration Service is now connecting to the source database,
retrieving your schema and converting it to the destination SQL schema
according to the rules defined in your conversion mapping file.
This process can take several minutes.
ClickSave and close.
The conversion workspace details page opens.
You can now apply the converted schema to your destination
database. If your source database includes tables that don't have primary
keys, you also need to manually create primary key constraints in the
converted tables in the destination database after you apply the converted schema.
For more information, seeWork with legacy conversion workspaces.
What's next
You can now work with your conversion workspace to fix conversion issues,
modify your objects with the interactive editor, and apply converted schema
to your destination database. SeeConvert Oracle code and schema to PostgreSQL syntax.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eConversion workspaces are used to convert source database schemas and objects into a format compatible with the destination database, allowing Database Migration Service to migrate data.\u003c/p\u003e\n"],["\u003cp\u003eThere are two types of conversion workspaces: one with a built-in editor for live editing, and a legacy option that utilizes Ora2Pg for schema conversion.\u003c/p\u003e\n"],["\u003cp\u003eSetting up a conversion workspace involves defining its settings, connecting to the source database, pulling schema objects, performing source conversion, and applying the converted schema to the destination database.\u003c/p\u003e\n"],["\u003cp\u003ePrerequisites for setting up a workspace include creating a connection profile for the source Oracle database and optionally configuring an Ora2Pg file for legacy workspace.\u003c/p\u003e\n"],["\u003cp\u003eDuring the process, users can test the connection to the source database and pull schema data, and in the built-in editor, can choose between saving the conversion workspace without immediate conversion or converting the schema and code during creation.\u003c/p\u003e\n"]]],[],null,["# Create a conversion workspace and convert schema\n\nThis page shows you how to create a conversion workspace and use\nit to immediately perform deterministic code and schema conversion from Oracle\nto PostgreSQL. Before you create the workspace, make sure that you\n[create a connection profile for your source database](/database-migration/docs/oracle-to-postgresql/create-source-connection-profile).\n\nWorkspaces with the built-in editor\n-----------------------------------\n\nWhen you create an interactive conversion workspace,\nyou can upgrade it to access\n[Gemini auto-conversion](/database-migration/docs/oracle-to-postgresql/code-conversion-with-gemini#auto-conversion).\nUpgrading the workspace is possible only once,\nimmediately after you open the newly created conversion workspace.\nThis operation is described as the last step in this procedure.\n\nTo create an interactive conversion workspace and perform the schema\nconversion, do the following:\n\n1. In the Google Cloud console, go to **Conversion workspaces** .\n\n [Go to Conversion workspaces](https://console.cloud.google.com/dbmigration/conversion-workspaces)\n2. Click **Set up workspace**.\n3. On the **Create a conversion workspace** page, do the following:\n 1. Enter the name, identifier, and region for your conversion workspace.\n 2. From the **Source database engine** drop-down menu, select **Oracle**.\n 3. From the **Destination database engine** select **Cloud SQL for PostgreSQL**.\n 4. Click **Create workspace and continue**.\n4. On the **Define source and pull schema snapshot** page, do the following:\n 1. From the **Source connection profile** drop-down menu, select the connection profile for your source database.\n 2. Click **Pull schema snapshot and continue**.\n\n Database Migration Service is now connecting to the source database and retrieving your schema.\n This process can take several minutes.\n5. On the **Select and convert objects** page, use the checkboxes to select which objects you want to convert to PostgreSQL syntax.\n\n You don't have to convert all your objects in one go. Instead, you can\n select just a few objects now and\n [add more objects to the conversion](/database-migration/docs/oracle-to-postgresql/work-with-conversion-workspaces#add-source-objects) later.\n6. Click **Convert and continue** .\n\n The conversion workspace opens.\n7. When you open a new workspace for the first time, you can upgrade it to access the Gemini-powered auto-conversion feature. Do the following:\n - In the **Introducing Gemini auto-conversion** dialog, select the **Upgrade workspace to explore the new experience** checkbox, and click **Continue**.\n - In the **Convert source objects with Gemini?** dialog, click **Convert** .\n\n Database Migration Service now performs the conversion process again to\n apply Gemini-powered conversion enhancements\n on top of the deterministic conversion results.\n For more information on Gemini auto-conversion\n feature, see\n [Gemini auto-conversion](/database-migration/docs/oracle-to-postgresql/code-conversion-with-gemini#auto-conversion).\n\nLegacy conversion workspaces\n----------------------------\n\nLegacy conversion workspaces are an older, more limited type of conversion\nworkspaces. We don't recommend using the legacy type of conversion\nworkspaces for your migrations. If you need to use a legacy conversion workspace,\nexpand the **Create a legacy conversion workspace and convert schema** section\nfor more information. \n\n#### Create a legacy conversion workspace and convert schema\n\nLegacy conversion workspaces use Ora2Pg configuration files.\nBefore you create a legacy conversion workspace, make sure you first\ncreate your Ora2Pg configuration outside Database Migration Service.\nFor more information, see\n[Work with legacy conversion workspaces](/database-migration/docs/oracle-to-postgresql/legacy-conversion-workspaces).\n\n1. In the Google Cloud console, go to **Conversion workspaces** .\n\n [Go to Conversion workspaces](https://console.cloud.google.com/dbmigration/conversion-workspaces)\n2. Click **Set up workspace**.\n3. On the **Create a conversion workspace** page, do the following:\n 1. Enter the name, identifier, and region for your conversion workspace.\n 2. From the **Source database engine** drop-down menu, select **Oracle**.\n 3. From the **Destination database engine** select **Cloud SQL for PostgreSQL**.\n 4. Expand the **Customize workspace configurations** section, and select the **Enable legacy conversion workspace** checkbox.\n 5. Click **Create workspace and continue**.\n4. On the **Connect to source and convert objects** page, do the following:\n 1. From the **Source connection profile** drop-down menu, select the connection profile for your source database.\n 2. In the **Configuration file** box, click **Browse** and use\n the system file picker to select your conversion mapping file.\n\n You can upload multiple conversion mapping files by clicking\n **Add file**.\n 3. In the **Convert the configuration** section, click\n **Pull schema and convert**.\n\n Database Migration Service is now connecting to the source database,\n retrieving your schema and converting it to the destination SQL schema\n according to the rules defined in your conversion mapping file.\n This process can take several minutes.\n5. Click **Save and close** .\n\n The conversion workspace details page opens.\n\nYou can now apply the converted schema to your destination\ndatabase. If your source database includes tables that don't have primary\nkeys, you also need to manually create primary key constraints in the\nconverted tables in the destination database after you apply the converted schema.\nFor more information, see\n[Work with legacy conversion workspaces](/database-migration/docs/oracle-to-postgresql/legacy-conversion-workspaces).\n\nWhat's next\n-----------\n\nYou can now work with your conversion workspace to fix conversion issues,\nmodify your objects with the interactive editor, and apply converted schema\nto your destination database. See\n[Convert Oracle code and schema to PostgreSQL syntax](/database-migration/docs/oracle-to-postgresql/convert-sql)."]]