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:
dbms_cloud(recommended when prerequisites are met): 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. Use this for all tables once object storage and the external stage are set up. See Server-side export with dbms_cloud.regular: partitionedSELECTthrough the Worker to Parquet, then the internal migration stage. Use when data volume is genuinely small, or whendbms_cloudprerequisites (DBMS_CLOUD grants, credentials, network ACL) aren’t available yet.
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. Data never flows through the Worker. When the prerequisites below are in place, use dbms_cloud for all tables from the source. 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. When there’s no reliable updated-at column, the watermark can be a pseudo-column such as ORA_ROWSCN.
Prompt:
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 | INTERVAL | Yes | Native INTERVAL by default. See INTERVAL data type handling. |
| ROWID, UROWID | VARCHAR | Yes | |
| JSON, XMLTYPE | VARIANT | Yes | |
| SDO_GEOMETRY | (unmapped) | No | |
| BOOLEAN, VECTOR | (unmapped) | No |
Platform-specific considerations¶
-
Server-side export (
dbms_cloud): Preferdbms_cloudfor all tables once object storage,DBMS_CLOUDgrants, and the Snowflake external stage are in place. Reserveregularfor genuinely small volume or when those prerequisites aren’t set up yet. See Server-side export with dbms_cloud.Prompt (when prerequisites are met):
Prompt (when object storage isn’t ready yet, or volume is genuinely small):
-
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.