Saturday, May 25, 2024
No menu items!
HomeCloud ComputingAccelerating database modernization with Gemini in Database Migration Service

Accelerating database modernization with Gemini in Database Migration Service

At Google Cloud Next ‘23, we announced support in Database Migration Service (DMS) for Oracle-to-PostgreSQL migrations to make them smooth, intuitive and efficient. We also introduced integrated code and schema conversions to reduce friction in the most time-consuming phases of the migration.

This week at Google Cloud Next ‘24, we unveiled Gemini for Google Cloud, a new generation of AI-assistive capabilities  based on Google’s Gemini family of models, including Gemini in Databases

In addition, we announced  the preview of a key feature of Gemini in Database: assistive code and schema conversion, allowing you to speed up the modernization of Oracle databases to PostgreSQL databases on Google Cloud. Finally, we  announced Gemini-assisted code explainability, a key feature of Gemini in Databases, which simplifies code conversion and helps developers become proficient with the PostgreSQL dialect. Let’s dive in.

Gemini-assisted code and schema conversion

Migrating code and schema from Oracle PL/SQL to PostgreSQL can be very challenging due to to the inherent differences between them in terms of syntax, data types, and procedural constructs, etc. The distinct nature of built-in functions, transaction-handling mechanisms, and system-specific objects further complicates the conversion process. When migrating data, developers must meticulously address variations in error handling, security models, and procedural language specifics. 

Yet successfully navigating these disparities is essential if you want to adopt Cloud SQL or AlloyDB for PostgreSQL. And while automatic code conversion can handle the bulk of the migration, there’s often a last mile that requires manual intervention and user feedback. In Database Migration Service, Gemini is trained on your manual interventions, learning based on the edits you make, your responses to its real-time recommendations about the intricacies of your specific code patterns and transformations, and from other commonalities across your code base.

For example, consider Oracle Bulk Collect, which lacks a direct equivalent in PostgreSQL. In the DMS conversion workspace, adjusting SQL code and converting Bulk Collect into PostgreSQL “For,” “In”, and “Loop” statements is a manual process. But once the code is changed manually, Gemini identifies other occurrences so it can suggest additional edits based on what it learned.

A look at Gemini explainability 

If you’re modernizing your database to a new, unfamiliar environment, then Gemini explainability is for you. With this enhancement, you can use simple natural language constructs to ask Database Migration Service questions like:

How can I fix a conversion issue without a deep understanding of the PostgreSQL dialect?

Why was my source converted to the PostgreSQL dialect in that particular way?

How can I optimize my destination code to get the most of the AlloyDB or Cloud SQL for PostgreSQL engine?

How can I add in-line comments to the target code for future reference?

Let’s go back to the previous example. For a non-PostgreSQL developer, finding the equivalent for Bulk collect can take time. With Gemini explainability, simply ask Gemini “How can I fix this issue?” and get insightful information about the issue, how to fix it, and even revised code that you can use as a starting point!

If you’re seeking to modernize your databases and leverage managed PostgreSQL services to reduce costs, increase flexibility, improve performance, and avoid vendor lock-in, Gemini explainability can help you get there much faster.

You can sign up for the Gemini Explainability preview today by filling out this form.

Getting started

Migrating with Database Migration Service is easy. To start, navigate to the Database Migration page in the Google Cloud console, create a new migration job, and take these following steps:

Create your source connection profile, which contains information about the source database. The connection profile can later be used for additional migrations.

Create a conversion workspace that automatically converts your source Oracle schema and the PL/SQL code to a PostgreSQL schema and compatible SQL.

If any exceptions are found and need attention,  you can fix them and save the refined SQL. 

Once saved, Gemini will use your edits to train its model, and if enough training data was accumulated, will prompt a suggestion dialog.

Review the Gemini suggestions and accept/reject. 

Apply the converted schema objects and SQL code on your destination Cloud SQL for your PostgreSQL instance.

Create a migration job and choose the conversion workspace and connection profiles previously created. 

Test your migration job and start your migration whenever you’re ready.

Duet AI for Cloud Database Engineers

Once the migration job starts, DMS takes an initial snapshot of your data, then replicates new changes as they happen. The migration job continues to replicate the source data until you decide to finalize the migration and cut over to the target database. 

What DMS customers are saying

“A database migration is a complex, multi-step process that is important for modernization, yet it carries the potential for serious risk of enterprise disruption. Google’s Database Migration Service is addressing the key capabilities for minimal downtime migrations in a single place, including Gemini-assisted code conversion to make this journey seamless. ,Google and Sabre have partnered on this journey and are collaborating to drive the modernization of Sabre’s databases and enhance Database Migration Service through real-world testing.” – Jeff Carroll, SVP, Platform and Cloud Engineering, Sabre

“The Google Database Migration Service and our partner Nordcloud made our Proof of Concept a success. We were able to migrate and convert our entire 10TB Point of Sale database from Oracle to AlloyDB. The process of backfilling was completed with high efficiency. In general, we were surprised by the high level of automation for both conversion and data migration.” – Head of Software Engineering, Bison

Learn more and start your database journey 

Gemini-assisted migrations in Database Migration Service are a huge step in the evolution of database migration tools. The ability to learn, adapt, and continuously refine the code conversion process not only helps reduce your burden but also sets you up for efficient migrations in the future. As you embark on your journey from Oracle to PostgreSQL, Gemini in Database Migration Service can reduce cost, time, and risk, setting you up for success.

For more information, head over to the documentation or start training with this Database Migration Service Qwiklab. In addition, you can view this conversion workspace introduction video. To get started with the new Database Migration Service for Oracle to PostgreSQL migrations, simply visit the Database Migration page in the console.

Cloud BlogRead More

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments