The migrate command copies schema and data from an on-premise PostgreSQL database to an Oracle instance with minimal downtime.
migrate extracts tables, converts PostgreSQL types to Oracle equivalents, and loads the transformed data into the target Oracle database. It supports full loads, incremental syncs, and schema-only moves.
Create network access between the source host and Oracle. Ensure the Oracle user has CREATE SESSION, CREATE TABLE, and INSERT privileges. Confirm the pg_dump and SQL*Loader binaries are installed on the jump box running migrate.
Invoke migrate with source and target connection strings, the list of tables, and optional flags for chunking or dry-run validation.
migrate \
--source pgsql://admin:pw@10.0.0.5:5432/ecommerce \
--target oracle://app:pw@adb.us-phoenix-1.oraclecloud.com:1521/ORCLPDB1 \
--tables Customers,Orders,Products,OrderItems \
--chunk-size 50000
After completion, compare row counts and sample records.
SELECT COUNT(*) FROM Customers@on_prem;
SELECT COUNT(*) FROM Customers@oracle;
Use --schema-only for dry runs that validate DDL conversions without copying rows. Use --data-only for refreshing data when schema already exists on Oracle.
Enable chunking, disable indexes during load, and parallelize tables to shorten downtime. Always test in staging before production cut-over.
Yes. Use a materialized view or WHERE filter in the tool’s config file to limit rows by order_date or created_at.
Constraints are recreated after data load. Disable them with --no-fk if load speed is critical, then re-enable and validate.
Combine migrate for the initial load with Oracle GoldenGate or logical decoding for ongoing change capture until cut-over.