Migrating from Oracle to Amazon Redshift moves schema and data to a scalable columnar warehouse with minimal downtime.
Combine AWS Schema Conversion Tool (SCT) for automatic DDL translation with AWS Database Migration Service (DMS) for continuous data replication. This pairing converts Oracle objects, creates them in Redshift, and streams changes until cut-over.
Create a Redshift cluster, provision an S3 bucket, open network access to Oracle, and grant SELECT on source tables. Install SCT and DMS agents on a machine with access to both databases.
Launch SCT, add Oracle as source and Redshift as target, run "Assess" to see compatibility, then click "Convert Schema". Review and apply converted DDL directly to Redshift or generate a .sql script for manual execution.
Download the DDL file from SCT, connect to Redshift via psql or Galaxy, and run the script. Verify objects with pg_table_def
.
Configure a DMS task in full-load + CDC mode. DMS extracts Oracle data, stages it as CSV in S3, and issues INSERT commands to Redshift. Enable logging to monitor throughput.
{"rules":[{"rule-type":"selection","rule-id":"1","rule-name":"1","object-locator":{"schema-name":"HR","table-name":"%"},"rule-action":"include"}]}
Export Oracle data to S3 (e.g., using aws s3 cp
) then run Redshift COPY
. Use gzip compression to speed transfer.
COPY Orders FROM 's3://ecom-bucket/orders/' IAM_ROLE 'arn:aws:iam::123:role/redshiftCopy' FORMAT AS CSV GZIP;
After each table load, compare SELECT COUNT(*)
in Oracle and Redshift. Automate checks with SQL scripts or Galaxy notebooks.
Replace Oracle sequences with Redshift IDENTITY(1,1)
columns or create a table-based sequence generator using GENERATED BY DEFAULT AS IDENTITY
.
With DMS CDC, downtime is limited to final cut-over when you stop writes to Oracle, apply last changes to Redshift, and redirect applications.
Redshift uses a PostgreSQL 8.0 dialect. Most SELECT syntax works, but features like triggers or primary/foreign key enforcement differ.
SCT can translate simple PL/SQL to Redshift-compatible SQL, but complex logic often requires rewriting in external tools such as AWS Glue or Lambda.
Enable DMS CDC so Oracle changes stream continuously to Redshift while users test workloads. Cut-over only when differences are <1 second.