Example workflow: Fix conversion issues in all code objects with Gemini assistance
Stay organized with collections
Save and categorize content based on your preferences.
This page describes a sample scenario where Gemini assistance
expedites converting code objects in Database Migration Service conversion workspaces.
Costs
To use Gemini assistance in Database Migration Service conversion
workspaces you need to enable Gemini for Google Cloud API.
Pricing for Gemini applies. For more information, see
Gemini for Google Cloud pricing.
Before you begin
To use Gemini assistance in Database Migration Service conversion workspaces,
you need to enable Gemini for Google Cloud in your project.
After you enable Gemini for Google Cloud in your project,
Gemini features are enabled for all your conversion
workspaces. You can later
disable the suggestions in a specific workspace.
Example workflow
In this example scenario, you convert Oracle code and schema where multiple
code objects use the same Oracle function that causes conversion issues.
The rule-based conversion engine can't find a PostgreSQL equivalent
for that function, so you need to fix the conversion issues yourself.
To speed up the conversion process, you use Gemini conversion
assistance to find out how to change the Oracle code.
Your SQL code and schema are stored in the region where you create the
conversion workspace. If you use assisted code and schema conversion with
Gemini models, your code and schemas might be processed in
other regions.
In your Gemini-powered workflow, you follow these steps:
You open the details pane for one of the affected objects, and select
Conversion assistant>Help me fix object conversion issues.
Figure 1. Gemini conversion assistant prompts. (click to enlarge)
The Gemini pane opens.
In the Gemini pane, you click Insert suggestion
and then save SQL changes.
You repeat the steps for every faulty code object.
As you apply the code proposals, Gemini models learn the pattern
and offer to add the fix to all objects with the same issue.
The Review suggestions from Gemini dialog appears.
Figure 2. Gemini fix issues dialog.
(click to enlarge)
You click Review suggestions, and proceed to review suggested changes.
For each object, you click Accept code and exit the Gemini
suggestions view.
Now the conversion issue fix is applied to all faulty code objects in your
workspace.
[[["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-08-25 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."]]