Migrating Oracle Stored Procedures to AlloyDB with Minimal Downtime

PCDBE By islever Editorial Last updated

Design and implement data migration and replication. Optimize database cost and performance in Google Cloud.

Short answer

C Use Database Migration Service with a conversion workspace for automated schema/code translation and CDC replication to minimize effort and downtime.

Question

You are planning the migration of a large Oracle database to AlloyDB for PostgreSQL. The database contains a large amount of application logic written as stored procedures that needs to be migrated to the target database. You want to minimize both migration effort and downtime for the migration. What should you do?
  1. Use Ora2pg for schema and code conversion and data migration.
  2. Use Ora2pg for schema and code conversion. Use the oracle_fdw extension in AlloyDB and replicate data from source to destination by using CREATE TABLE AS SELECT statements.
  3. Use Database Migration Service. Set up a conversion workspace for schema and code conversion. Create a migration job to perform backfill and change data capture to replicate data from source to destination. Correct Answer
  4. Use Database Migration Service. Set up a legacy conversion workspace for schema and code conversion. Create a migration job to perform backfill and change data capture to replicate data from source to destination.

Key Takeaways

The question tests the difference between legacy and modern conversion workspaces in DMS; the modern workspace provides automated PL/SQL translation essential for minimizing manual effort.

Learn how to migrate Oracle databases with heavy stored procedure logic to AlloyDB using Database Migration Service's conversion workspace and CDC for minimal downtime.

Common mistake: Choosing Ora2pg (Option A) because it is a well-known open-source tool, but it fails to meet the 'minimize migration effort' requirement due to lack of automated PL/SQL translation and managed CDC.

Expert Analysis

The core challenge in migrating a large Oracle database with significant stored procedure logic to AlloyDB is balancing automation, accuracy, and minimal downtime. Google Cloud's Database Migration Service (DMS) is the managed solution designed for this specific workload, offering integrated capabilities that third-party tools like Ora2pg do not provide natively within the GCP ecosystem.

Option C is correct because it leverages DMS’s modern conversion workspace. These workspaces utilize Google’s advanced compiler technology to automatically translate Oracle PL/SQL code, including complex stored procedures, into PostgreSQL-compatible syntax. This significantly reduces manual effort compared to open-source alternatives. Furthermore, DMS supports both backfill (initial data load) and Change Data Capture (CDC) replication. CDC ensures that changes made during the migration process are continuously replicated, allowing for a cutover with minimal downtime, which directly addresses the requirement to minimize disruption.

Option A (Ora2pg) is a valid open-source tool but requires significant manual effort for code translation and does not offer built-in, managed CDC replication out-of-the-box, leading to higher migration effort and potential downtime issues. Option B combines Ora2pg with oracle_fdw, which is an outdated approach involving periodic full table reloads rather than true continuous replication, failing the "minimize downtime" constraint. Option D references a "legacy conversion workspace," which lacks the advanced automated translation features of the current standard conversion workspace, resulting in more manual work and less reliable code conversion.

The key distinction lies in using the modern DMS conversion workspace for automated, high-fidelity code translation combined with native CDC for seamless data synchronization.

Official Reference

Exam Strategy

When evaluating migration options, prioritize managed services that offer integrated code translation and CDC if the source has complex logic. Look for keywords like 'automated', 'conversion workspace', and 'change data capture' as indicators of the most efficient, low-downtime solutions provided by the cloud vendor.

Frequently Asked Questions

What is the difference between a legacy and modern conversion workspace in DMS?

Modern conversion workspaces use advanced compilers to automatically translate Oracle PL/SQL code, reducing manual effort. Legacy workspaces may require more manual intervention or offer less sophisticated translation capabilities.

Why is CDC important for minimizing downtime during migration?

Change Data Capture (CDC) allows continuous replication of data changes from the source to the target while the migration is ongoing. This ensures that only minimal changes need to be applied during the final cutover, reducing downtime.

More PCDBE FAQ →

Community Votes

C
67%
A
33%

67% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.

Discussion 3 contributions

Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.

From public community threads 3

  1. Mavee001 👍 4 Answered C
    https://cloud.google.com/database-migration/docs/oracle-to-alloydb/create-conversion-workspace#conversion-workspaces
  2. AwesomeGCP 👍 1 Answered C
    The correct answer is C. Use Database Migration Service. Set up a conversion workspace for schema and code conversion. Create a migration job to perform backfill and change data capture to replicate data from source to destination. Why Option C is Correct Automated Code & Schema Translation: Database Migration Service (DMS) includes integrated conversion workspaces powered by Google's compiler-based translation engine. It automates the parsing, conversion, and mapping of complex Oracle PL/SQL application logic (stored procedures, packages, triggers, functions) directly to PostgreSQL-compatible PL/pgSQL, drastically reducing manual migration effort. Minimal Downtime (CDC): DMS combines an initial historical data backfill with continuous Change Data Capture (CDC) to stream real-time transactional changes from Oracle to AlloyDB. This keeps the target continuously synchronized until you are ready for a low-downtime, near-instantaneous cutover.
  3. Chamiel1028 👍 1 Answered A
    scenario: Large Oracle database → migrating to AlloyDB for PostgreSQL Database has a large amount of application logic in stored procedures Goals: minimize migration effort and downtime Why Option A is correct Ora2pg is a well-known open-source tool for migrating Oracle to PostgreSQL/AlloyDB: Converts Oracle schema to PostgreSQL-compatible schema Converts Oracle PL/SQL stored procedures to PostgreSQL PL/pgSQL Supports data migration with minimal downtime using incremental or batch exports Ideal for application-heavy Oracle databases with lots of stored procedures and business logic Minimizes effort because schema, code, and data migration are all handled in one tool

Reader comments & corrections

No reader corrections yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

← Back to PCDBE Study Guide