Migrating Data from Oracle¶
This page covers Oracle-specific setup for Data migration. For workflow and Worker field definitions, see Data migration configuration reference.
Prerequisites¶
- Oracle Instant Client and a matching ODBC driver on each Worker host.
- Service name or TNS configuration for the target database.
- For
dbms_cloudextraction: a source user withEXECUTEonDBMS_CLOUD, a stored credential created withDBMS_CLOUD.CREATE_CREDENTIAL, and a network ACL that allows HTTPS to your object-store endpoint. See Server-side export with dbms_cloud.
Connectivity and extraction¶
Oracle supports two extraction strategies:
regular(default): partitionedSELECTthrough the Worker to Parquet, then the internal migration stage.dbms_cloud: Oracle exports Parquet directly to object storage withDBMS_CLOUD.EXPORT_DATA, and Snowflake loads from an external stage. Data doesn’t pass through the Worker. See Server-side export with dbms_cloud.
Basic / EZConnect (default)¶
Connection modes¶
| Mode | When to use | Key TOML fields |
|---|---|---|
basic | Standard username/password (EZConnect) | host, database (service name), port |
tns_alias | TNS name resolution | tns_name, optional tns_admin |
connect_descriptor | Full DESCRIPTION block | Connect descriptor per site standards |
Set odbc_driver to the exact name from pyodbc.drivers() on the Worker host, or use auto_detect_driver when appropriate.
Workflow example:
Server-side export with dbms_cloud¶
With the dbms_cloud strategy, Oracle writes Parquet files directly to object storage using DBMS_CLOUD.EXPORT_DATA, and Snowflake loads them from an external stage. Because data never flows through the Worker, this suits large tables. It’s the Oracle counterpart to Redshift UNLOAD and Teradata WRITE_NOS.
Oracle prerequisites (a DBA typically handles these once):
- Grant
EXECUTEonDBMS_CLOUDto the source user. - Create a credential for your object store with
DBMS_CLOUD.CREATE_CREDENTIAL. Credentials aren’t grantable, so the same user that runs the export must own it. - Add a network ACL that allows HTTPS to your object-store endpoint (for example
*.amazonaws.com).
Worker TOML on the Oracle source connection (both keys are required; partial configuration is rejected):
dbms_cloud_file_uri_prefixmust start withhttps://. The Worker appends the partition path and anexport_file-name prefix.- Export format defaults to Parquet with snappy compression. Only Parquet loads into Snowflake; don’t override
dbms_cloud_format_clausewith JSON.
Snowflake external stage must point at the same prefix Oracle writes to:
Workflow example:
The workflow references the stage object, not the storage integration. Configuration parsing fails if externalStage is omitted.
Incremental sync¶
Oracle supports none and watermark. checksum is not supported for Oracle.
Data type mappings¶
| Oracle type | Snowflake target type | Supported for migration | Notes |
|---|---|---|---|
| NUMBER, INTEGER, INT, SMALLINT | NUMBER | Yes | |
| DECIMAL, NUMERIC, DEC | NUMBER | Yes | |
| FLOAT, REAL, BINARY_FLOAT, BINARY_DOUBLE | FLOAT | Yes | |
| DOUBLE PRECISION | FLOAT | Yes | |
| VARCHAR2, NVARCHAR2, CHAR, NCHAR, VARCHAR | VARCHAR / CHAR | Yes | Oracle treats empty string as NULL |
| CLOB, NCLOB | TEXT | Yes | Very large LOBs may need workflow-level type overrides |
| LONG | VARCHAR | Yes | |
| RAW, BLOB, LONG RAW | BINARY | Yes | |
| BFILE | VARCHAR | Yes | |
| DATE | TIMESTAMP_NTZ | Yes | Oracle DATE includes time; maps to TIMESTAMP_NTZ |
| TIMESTAMP | TIMESTAMP_NTZ | Yes | Nanoseconds truncated to microseconds |
| TIMESTAMP WITH TIME ZONE | TIMESTAMP_TZ | Yes | |
| TIMESTAMP WITH LOCAL TIME ZONE | TIMESTAMP_LTZ | Yes | Converted using the session time zone |
| INTERVAL YEAR TO MONTH, INTERVAL DAY TO SECOND | VARCHAR | Yes | |
| ROWID, UROWID | VARCHAR | Yes | |
| JSON, XMLTYPE | VARIANT | Yes | |
| SDO_GEOMETRY | (unmapped) | No | |
| BOOLEAN, VECTOR | (unmapped) | No |
Platform-specific suggestions¶
- Large tables: Prefer
dbms_cloudso Oracle exports directly to object storage instead of streaming data through the Worker. Keepregularfor smaller tables or when object-store access isn’t set up. See Server-side export with dbms_cloud. - Wallet-based TLS: Use
wallet_directoryandwallet_passwordin Worker TOML when your Oracle environment requires wallet authentication. - No checksum sync: Plan incremental loads with
watermarkinstead ofchecksum, which is not supported for Oracle. - Anti-locking: AIM DMV adds an automatic
PARALLELoptimizer hint on large Oracle tables. Override withqueryModifiers.selectModifier, or setselectModifierto"NONE"to disable. See Anti-locking and query modifiers.