Google Cloud's Database Migration Service (DMS) has introduced new capabilities to automate the conversion of complex stored procedures during database migrations. Specifically, DMS can now translate SQL Server stored procedures that return multiple result sets into PostgreSQL's `SETOF refcursor` architecture. This automation tackles a significant challenge in moving databases from proprietary systems to open-source PostgreSQL or managed services like AlloyDB for PostgreSQL.
SQL Server natively streams multiple tabular streams from a single execution, a feature known as Multiple Active Result Sets (MARS). In contrast, PostgreSQL requires explicit cursor manipulation for similar functionality. Manually rewriting hundreds of such procedures during a large-scale migration project is often impractical. DMS's core conversion strategy addresses this by automating the translation of SQL Server's multi-stream protocol to PostgreSQL's explicit cursor management.
The update also integrates Gemini, Google's generative AI, into DMS. This integration accelerates the conversion of proprietary SQL code, such as PL/SQL or T-SQL, to PostgreSQL's PL/pgSQL. This AI-powered translation capability is designed to handle complex stored procedures, triggers, and custom functions that often contain critical business logic.
Database migrations often face a "last mile" bottleneck after initial schema and data transfers are complete. This bottleneck arises from the need to translate thousands of lines of procedural logic written in proprietary SQL dialects. Manual translation demands specialized expertise, significant time, and carries a high risk of errors. The automation provided by DMS, particularly with Gemini's assistance, aims to mitigate these delays and errors, making the modernization process more efficient.
By automating the conversion of multi-result set procedures and leveraging AI for code translation, DMS seeks to reduce the manual effort and specialized knowledge required for database migrations. This can help organizations move their applications from commercial databases like Oracle or SQL Server to PostgreSQL, potentially benefiting from PostgreSQL's enterprise performance, availability, and developer community.
✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →
One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.
One email a day. Unsubscribe in one click, any time.
Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.
▶ Play today's briefNew every morning, and the back catalogue is archived by date.
Google Cloud has integrated Gemini, its generative AI, into the Database Migration Service (DMS) to accelerate the conversion of proprietary SQL code to PostgreSQL PL/pgSQL. This update addresses the bottleneck of manually translating complex stored procedures, triggers, and custom functions during database migrations, which often causes significant delays and errors.
Google Cloud's Database Migration Service (DMS) now automates the translation of SQL Server stored procedures that return multiple result sets into PostgreSQL's `SETOF refcursor` architecture. This automation addresses a key challenge in large-scale database migrations by converting SQL Server's native multi-stream protocol to PostgreSQL's explicit cursor management.