このページでは、Gemini アシスタンスが Database Migration Service 変換ワークスペースでのコード オブジェクトの変換を迅速に進めるサンプル シナリオについて説明します。
費用
Database Migration Service の変換ワークスペースで Gemini アシスタンスを使用するには、Gemini for Google Cloud API を有効にする必要があります。Gemini の料金が適用されます。詳細については、
Gemini for Google Cloud の料金をご覧ください。
始める前に
Database Migration Service の変換ワークスペースで Gemini アシスタンスを使用するには、プロジェクトで Gemini for Google Cloud を有効にする必要があります。
[[["わかりやすい","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-01 UTC。"],[[["\u003cp\u003eGemini assistance in Database Migration Service conversion workspaces helps expedite the conversion of code objects by providing suggestions to resolve conversion issues.\u003c/p\u003e\n"],["\u003cp\u003eUtilizing Gemini requires enabling the Gemini API, which applies Gemini pricing, and can later be disabled in specific workspaces.\u003c/p\u003e\n"],["\u003cp\u003eGemini learns from the applied code proposals and offers to fix similar issues in multiple objects, significantly speeding up the conversion process.\u003c/p\u003e\n"],["\u003cp\u003eThe code and schemas you use might be processed in different regions than the workspace region, and it's recommended to validate all output from Gemini for Google Cloud products before using.\u003c/p\u003e\n"],["\u003cp\u003eGemini assistance is a pre-GA feature, meaning it's subject to the "Pre-GA Offerings Terms," available "as is," and may have limited support.\u003c/p\u003e\n"]]],[],null,["# Example workflow: Fix conversion issues in all code objects with Gemini assistance\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\nThis page describes a sample scenario where Gemini assistance\nexpedites converting code objects in Database Migration Service conversion workspaces.\n\nCosts\n-----\n\nTo use Gemini assistance in Database Migration Service conversion\nworkspaces you need to enable Gemini for Google Cloud API.\nPricing for Gemini applies. For more information, see\n[Gemini for Google Cloud pricing](/products/gemini/pricing).\n\nBefore you begin\n----------------\n\nTo use Gemini assistance in Database Migration Service conversion workspaces,\nyou need to enable Gemini for Google Cloud in your project.\n[Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=cloudaicompanion.googleapis.com)\n\n\u003cbr /\u003e\n\nAfter you enable Gemini for Google Cloud in your project,\nGemini features are enabled for all your conversion\nworkspaces. You can later\n[disable the suggestions](#disable-suggestions) in a specific workspace.\n\nExample workflow\n----------------\n\nIn this example scenario, you convert Oracle code and schema where multiple\ncode objects use the same Oracle function that causes conversion issues.\nThe rule-based conversion engine can't find a PostgreSQL equivalent\nfor that function, so you need to fix the conversion issues yourself.\nTo speed up the conversion process, you use Gemini conversion\nassistance to find out how to change the Oracle code.\n\nYour SQL code and schema are stored in the region where you create the\nconversion workspace. If you use assisted code and schema conversion with\nGemini models, your code and schemas might be processed in\nother regions.\n\nLearn [how and when Gemini\nfor Google Cloud uses your data](/gemini/docs/discover/data-governance).\n\n\u003cbr /\u003e\n\n| As an early-stage technology, Gemini for Google Cloud\n| products can generate output that seems plausible but is factually incorrect. We recommend that you\n| validate all output from Gemini for Google Cloud products before you use it.\n| For more information, see\n| [Gemini for Google Cloud and responsible AI](/gemini/docs/discover/responsible-ai).\n\nIn your Gemini-powered workflow, you follow these steps:\n\n1. You open the details pane for one of the affected objects, and select **Conversion assistant** \\\u003e **Help me fix object conversion issues**.\n\n[](#lightbox-trigger) **Figure 1.** Gemini conversion assistant prompts. (click to enlarge)\n\nThe Gemini pane opens.\n\n1. In the Gemini pane, you click **Insert suggestion**\n and then save SQL changes.\n\n2. You repeat the steps for every faulty code object.\n\n As you apply the code proposals, Gemini models learn the pattern\n and offer to add the fix to all objects with the same issue.\n The **Review suggestions from Gemini** dialog appears.\n [](#lightbox-trigger) **Figure 2.** Gemini fix issues dialog. (click to enlarge)\n3. You click **Review suggestions**, and proceed to review suggested changes.\n\n4. For each object, you click **Accept code** and exit the Gemini\n suggestions view.\n\nNow the conversion issue fix is applied to all faulty code objects in your\nworkspace."]]