OFICIAL Google Cloud Blog

Accelerate PostgreSQL Migrations with Gemini in DMS

What happened
Based on Google Cloud Blog · Aug 11, 2026

Google Cloud’s Database Migration Service now uses Gemini AI to automate the conversion of proprietary SQL code to PostgreSQL, addressing the complex final phase of database migrations.

Video

Video available

Key points
·
Imagine this scenario: Your team decides to migrate a core application from an existing commercial database like Oracle or SQL Server to open source PostgreSQL or a fully managed service such as AlloyDB for PostgreSQL.
·
Schemas convert, tables populate, and data migration pipelines transfer terabytes of data in hours.
·
Buried inside the existing databases are hundreds of stored procedures, complex triggers, and custom functions written in proprietary SQL dialects like PL/SQL or T-SQL.
·
These routines contain years of critical business logic handling transaction validation, order processing, and custom reporting.

Database migrations to PostgreSQL often stall when converting proprietary SQL routines like stored procedures and triggers, which require months of manual rewriting due to dialect differences. Google Cloud’s Database Migration Service (DMS) integrates Gemini AI to automate this process, mapping vendor-specific syntax such as PL/SQL or T-SQL to PostgreSQL’s PL/pgSQL with higher accuracy and speed. The tool analyzes entire database schemas, including dependencies and data types, to ensure consistent translations across complex enterprise environments.

The AI-assisted conversion runs within Google Cloud’s security boundaries, protecting proprietary business logic while providing real-time, side-by-side code comparisons. Users can review Gemini’s inline explanations for each conversion, edit the generated PL/pgSQL code, and validate changes before deployment. This reduces the risk of errors that typically arise from manual rewrites of thousands of lines of procedural logic.

DMS pairs deterministic compiler rules for standard transformations with Gemini’s contextual analysis for complex procedural blocks, ensuring predictable and accurate translations. For example, proprietary Oracle functions like NVL and DECODE are automatically converted to PostgreSQL equivalents such as COALESCE and CASE expressions, with explanations provided for each change.

The service supports staging deployments to test converted code on target instances like Cloud SQL or AlloyDB before production cutover. Validation indicators highlight routines requiring manual review, while the integrated workspace streamlines the entire migration workflow, from schema assessment to final deployment.

Original source → Deals on Clipraptor.com →