[[["容易理解","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 (世界標準時間)。"],[],[],null,["# Convert Oracle code and schema to PostgreSQL syntax\n\nAfter you\n[create your conversion workspace and perform the initial schema conversion](/database-migration/docs/oracle-to-postgresql/create-conversion-workspace),\nyou can fix conversion issues, modify your objects with the\ninteractive editor, and apply converted schema to your destination database.\n\nDatabases can often have thousands of objects. Converting them all in a single\nsession might be a challenging process. With conversion workspaces, you can divide\nthe conversion process into multiple phases where you add new objects to the\nconversion, fix the issues, and then test them in your destination database.\n\nConversion workspaces can produce deterministic conversion results, or enhance\nthem with\n[Gemini auto-conversion](/database-migration/docs/oracle-to-postgresql/code-conversion-with-gemini#auto-conversion).\nWhen Gemini auto-conversion is enabled, Database Migration Service\napplies auto-conversion augmentations to all your objects every time you convert\nthe source schema. If you want to use only deterministic conversion rules,\ndisable Gemini auto-conversion in your workspace.\n\nTo convert objects from your source database, 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. From the list of available conversion workspaces, select your workspace. Conversion workspace editor opens.\n\n3. 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](/database-migration/docs/oracle-to-postgresql/create-conversion-workspace).\n4. [Fix your conversion issues](/database-migration/docs/oracle-to-postgresql/work-with-conversion-workspaces#fix-conversion-issues).\n\n You can use the interactive SQL editor, upload a conversion mapping file\n to convert the object in a specific way, or utilize Gemini-powered\n conversion features.\n5. 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](/database-migration/docs/oracle-to-postgresql/about-conversion-workspaces).\n6. After you fix conversion issues or adjust your schema, click move_down **Convert source** . Database Migration Service now analyzes your changes and generates the updated PostgreSQL schema.\n\n You can inspect the converted schema in the\n **Cloud SQL for PostgreSQL draft** tab.\n7. Test the converted schema in your destination database. Do the following:\n 1. Click apps **Apply to destination** \\\u003e **Test**.\n 2. On the **Define destination** page, use the **Destination connection profile**\n drop-down menu to select your destination connection profile.\n 3. Click **Define and continue**.\n 4. On the **Select objects and test application** page, use the checkboxes to select which\n converted PostgreSQL schema you want to apply in your destination database.\n 5. Click **Test application**.\n\n Depending on the test results, you might need to further adjust your\n converted schema.\n8. If the schema snapshot you pulled from the source has more objects that you haven't migrated yet, add these objects to the workspace:\n 1. In the **Oracle** panel, click add **Add objects** .\n\n The object selection panel opens.\n 2. In the schema tree, use the checkboxes to select which objects you want to add to the conversion and then click **Add objects**.\n9. Repeat steps 3 through 8 until you convert all the objects that you want to migrate.\n10. When you finish converting your schema, click apps **Apply to destination** \\\u003e **Apply** .\n\n Database Migration Service now creates the schema definitions in your destination\n database.\n\nWhat's next\n-----------\n\n- Your conversion workspace is ready for migration. You can now\n [create the migration job](/database-migration/docs/oracle-to-postgresql/create-migration-job).\n\n- To get a complete, step-by-step migration walkthrough, see\n [Oracle to Cloud SQL for PostgreSQL migration guide](/database-migration/docs/oracle-to-postgresql/guide)."]]