[[["わかりやすい","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-09-05 UTC。"],[],[],null,["# Convert SQL with Database Migration Service\n\nDatabase Migration Service helps you convert Oracle and SQL Server\nschema to PostgreSQL. You accomplish this using conversion workspaces and\nGemini-powered conversion.\n\n- [Conversion workspaces](#conversion-workspaces) provide tools to convert schema and code\n objects.\n\n- [Gemini assistance](#gemini-conversion) uses the power of AI to reduce migration\n time and complexity.\n\n- See [Supported scenarios](#supported-scenarios) for links to scenario-specific documentation.\n\nConversion workspaces\n---------------------\n\nUse conversion workspaces to expedite and improve the migration process for\nheterogeneous databases. The conversion workspaces handle code and schema conversion,\nsimplifying the transition to your destination database.\n\nThey offer tools that let you monitor conversion progress with robust overviews.\nConversion workspaces also facilitate collaborative conversion issue solving\nin the conversion editor, where you can adjust the resulting PostgreSQL\ncode in real time.\n[](#lightbox-trigger) **Figure 1.** Conversion workspace overview screen, where you can monitor the progress of your conversion, view issues and inspect the resulting PostgreSQL code. (click to enlarge)\n\nAccelerate code and schema conversion with Gemini\n-------------------------------------------------\n\n|\n| **Preview\n| --- [Gemini](/gemini/docs/overview) in Database Migration Service**\n|\n|\n| This feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nGemini-powered conversion features in Database Migration Service help you apply\nthe power of AI to reduce the time and complexity of your migrations.\n\nUse the following complimentary approaches for a complete end-to-end\nGemini-powered code object conversion experience:\n\n### Auto-conversion\n\nGemini-powered conversion engine can automatically enhance\nthe deterministic conversion patterns used by Database Migration Service. When you enable\nthe auto-conversion feature, Gemini processes all your\nconverted schema is processed to significantly reduce the number of manual\nadjustments needed in your PostgreSQL code.\n\nAfter all augmentations are complete, you can explore the details for each object:\n\n- **Conversion summary** includes an overview of how and why Gemini\n fixed issues found in the deterministic conversion, as well as a list of\n issues that still require further adjustments.\n\n- **Code comparison** provides you with a side-by-side comparison between\n Gemini-powered augmentations and the deterministic conversion.\n\n[](#lightbox-trigger) **Figure 2.** Gemini-powered auto-conversion panel where you can inspect the details of code and schema. (click to enlarge)\n\n### Conversion assistant\n\nConversion assistant is a set of dedicated prompts that can help you better\nunderstand the conversion logic, propose fixes for conversion issues, or\noptimize converted code. For example, if certain Oracle functions don't have\ndirect equivalents in PostgreSQL, you can use the **Help me fix object conversion issues**\nprompt to get a proposal of code changes that can fix the conversion issue.\n\nThe following image shows how to access Gemini prompts\nfor code and schema conversion explainability in conversion workspaces:\n[](#lightbox-trigger) **Figure 3.** Gemini conversion assistant prompts. (click to enlarge)\n\n### Pattern matching\n\nWhen you fix conversion issues in your workspace, Gemini models\ncan learn the pattern from your fixes and suggest changes to other faulty\nobjects in the workspace. For example, after you've fixed object conversion\nissues manually or with the conversion assistant prompt, and when\nGemini models have analyzed enough of your fixes, you can review\nAI-generated suggestions to further refine your code.\n\nThe following image shows the Gemini suggestions fix issues in\nconversion workspaces:\n[](#lightbox-trigger) **Figure 4.** Gemini suggestions fix issues dialog. (click to enlarge)\n\nSupported scenarios\n-------------------\n\nSee the following pages for more information about Database Migration Service conversion\nworkspaces and Gemini-powered conversion:\n\nOracle to Cloud SQL for PostgreSQL\n:\n - [About conversion workspaces](/database-migration/docs/oracle-to-postgresql/about-conversion-ws)\n - [Convert Oracle code and schema to Cloud SQL for PostgreSQL with\n Gemini assistance](/database-migration/docs/oracle-to-postgresql/code-conversion-with-gemini)\n\nOracle to AlloyDB for PostgreSQL\n:\n - [About conversion workspaces](/database-migration/docs/oracle-to-alloydb/about-conversion-ws)\n - [Convert Oracle code and schema to Cloud SQL for PostgreSQL with\n Gemini assistance](/database-migration/docs/oracle-to-alloydb/code-conversion-with-gemini)\n\nSQL Server to Cloud SQL for PostgreSQL\n:\n - [About conversion workspaces](/database-migration/docs/sqlserver-to-csql-pgsql/about-conversion-workspaces)\n - [Convert SQL Server code and schema to Cloud SQL for PostgreSQL with\n Gemini assistance](/database-migration/docs/sqlserver-to-csql-pgsql/code-conversion-with-gemini)\n\nSQL Server to AlloyDB for PostgreSQL\n:\n - [About conversion workspaces](/database-migration/docs/sqlserver-to-alloydb/about-conversion-workspaces)\n - [Convert SQL Server code and schema to AlloyDB for PostgreSQL with\n Gemini assistance](/database-migration/docs/sqlserver-to-alloydb/code-conversion-with-gemini)"]]