[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-08-18 (世界標準時間)。"],[[["\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)."]]