Oracle Examples
Comprehensive examples for exporting data from Oracle databases.
Connection Types
Oracle exports support multiple connection types:
- oraodp: Native Oracle Data Provider (recommended)
- oledb: Using Oracle OLEDB Provider (OraOLEDB)
- odbc: Using ODBC DSN
- adbc_oracle: ADBC FastDriver — ultra-fast, Parquet-only export (see ADBC Examples)
The adbc_oracle connection type uses the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native Parquet exports, and also supports the Physical parallel method (resolved to Rowid). Output is Parquet-only — see the ADBC Examples section below.
Single-threaded Export
Simple export without parallelization.
- Oracle Data Provider
- OLEDB Provider
.\FastBCP.exe `
--connectiontype "oraodp" `
--server "localhost:1521/ORCLPDB1" `
--user "system" `
--password "password" `
--query "SELECT * FROM customers WHERE ROWNUM <= 1000" `
--directory "C:\temp" `
--fileoutput "oracle_customers.csv" `
--decimalseparator "." `
--delimiter "|" `
--dateformat "yyyy-MM-dd HH:mm:ss" `
--encoding "UTF-8" `
--parallelmethod "None"
.\FastBCP.exe `
--connectiontype "oledb" `
--provider "OraOLEDB.Oracle" `
--server "localhost:1521/ORCLPDB1" `
--user "system" `
--password "password" `
--query "SELECT * FROM customers WHERE ROWNUM <= 1000" `
--directory "C:\temp" `
--fileoutput "oracle_customers.csv" `
--decimalseparator "." `
--delimiter "|" `
--dateformat "yyyy-MM-dd HH:mm:ss" `
--encoding "UTF-8" `
--parallelmethod "None"
Parallel Export - Physical Method
Parallel export using the physical row identifier (ROWID).
With an Oracle connection type (oraodp, adbc_oracle), the Physical method resolves to the Oracle ROWID strategy (formerly --parallelmethod Rowid, now deprecated). It is very efficient for full table exports and does not require a distribute key column. --sourceschema and --sourcetable are required.
Full table export:
.\FastBCP.exe `
--connectiontype "oraodp" `
--server "localhost:1521/ORCLPDB1" `
--user "system" `
--password "password" `
--sourceschema "SYSTEM" `
--sourcetable "ORDERS" `
--directory "C:\temp" `
--fileoutput "oracle_orders.csv" `
--decimalseparator "." `
--delimiter "|" `
--dateformat "yyyy-MM-dd HH:mm:ss" `
--encoding "UTF-8" `
--parallelmethod "Physical" `
--paralleldegree 8 `
--merge "False" `
--runid "oraodp_to_csv_parallel8_physical"
With query filter:
.\FastBCP.exe `
--connectiontype "oraodp" `
--server "localhost:1521/ORCLPDB1" `
--user "system" `
--password "password" `
--sourceschema "SYSTEM" `
--sourcetable "ORDERS" `
--query "SELECT * FROM SYSTEM.ORDERS WHERE order_date >= TO_DATE('2024-01-01', 'YYYY-MM-DD')" `
--directory "C:\temp" `
--fileoutput "oracle_orders_2024.csv" `
--decimalseparator "." `
--delimiter "|" `
--dateformat "yyyy-MM-dd HH:mm:ss" `
--encoding "UTF-8" `
--parallelmethod "Physical" `
--paralleldegree 8 `
--merge "False" `
--runid "oraodp_to_csv_parallel8_physical_filtered"
Parallel Export - Random Method
Export using Random distribution with modulo operation.
.\FastBCP.exe `
--connectiontype "oraodp" `
--server "localhost:1521/ORCLPDB1" `
--user "system" `
--password "password" `
--sourceschema "SYSTEM" `
--sourcetable "ORDERS" `
--directory "C:\temp" `
--fileoutput "oracle_orders_random.csv" `
--decimalseparator "." `
--delimiter "|" `
--dateformat "yyyy-MM-dd HH:mm:ss" `
--encoding "UTF-8" `
--parallelmethod "Random" `
--distributekeycolumn "order_id" `
--paralleldegree 8 `
--merge "False" `
--runid "oraodp_to_csv_parallel8_random"
Parallel Export - DataDriven Method
Export using DataDriven distribution based on distinct column values.
.\FastBCP.exe `
--connectiontype "oraodp" `
--server "localhost:1521/ORCLPDB1" `
--user "system" `
--password "password" `
--sourceschema "SYSTEM" `
--sourcetable "ORDERS" `
--directory "C:\temp" `
--fileoutput "oracle_orders_dd.csv" `
--decimalseparator "." `
--delimiter "|" `
--dateformat "yyyy-MM-dd HH:mm:ss" `
--encoding "UTF-8" `
--parallelmethod "DataDriven" `
--distributekeycolumn "order_status" `
--paralleldegree 10 `
--merge "False" `
--runid "oraodp_to_csv_parallel10_datadriven"
Export to Parquet
Export Oracle data to Parquet format.
Single-threaded:
.\FastBCP.exe `
--connectiontype "oraodp" `
--server "localhost:1521/ORCLPDB1" `
--user "system" `
--password "password" `
--sourceschema "SYSTEM" `
--sourcetable "ORDERS" `
--directory "C:\temp" `
--fileoutput "oracle_orders.parquet" `
--parallelmethod "None"
Parallel with Physical (Rowid):
.\FastBCP.exe `
--connectiontype "oraodp" `
--server "localhost:1521/ORCLPDB1" `
--user "system" `
--password "password" `
--sourceschema "SYSTEM" `
--sourcetable "ORDERS" `
--directory "C:\temp" `
--fileoutput "oracle_orders.parquet" `
--parallelmethod "Physical" `
--paralleldegree 10 `
--merge "False"
OLEDB Connection Examples
Using Oracle OLEDB Provider for connections.
Single-threaded:
.\FastBCP.exe `
--connectiontype "oledb" `
--provider "OraOLEDB.Oracle" `
--server "localhost:1521/ORCLPDB1" `
--user "system" `
--password "password" `
--query "SELECT * FROM SYSTEM.ORDERS WHERE ROWNUM <= 10000" `
--directory "C:\temp" `
--fileoutput "oracle_orders.csv" `
--decimalseparator "." `
--delimiter "|" `
--dateformat "yyyy-MM-dd HH:mm:ss" `
--encoding "UTF-8" `
--parallelmethod "None"
Parallel Random:
.\FastBCP.exe `
--connectiontype "oledb" `
--provider "OraOLEDB.Oracle" `
--server "localhost:1521/ORCLPDB1" `
--user "system" `
--password "password" `
--query "SELECT * FROM SYSTEM.ORDERS" `
--directory "C:\temp" `
--fileoutput "oracle_orders.csv" `
--decimalseparator "." `
--delimiter "|" `
--dateformat "yyyy-MM-dd HH:mm:ss" `
--encoding "UTF-8" `
--parallelmethod "Random" `
--distributekeycolumn "order_id" `
--paralleldegree 6 `
--merge "False"
Parallel DataDriven:
.\FastBCP.exe `
--connectiontype "oledb" `
--provider "OraOLEDB.Oracle" `
--server "localhost:1521/ORCLPDB1" `
--user "system" `
--password "password" `
--query "SELECT * FROM SYSTEM.ORDERS" `
--directory "C:\temp" `
--fileoutput "oracle_orders.csv" `
--decimalseparator "." `
--delimiter "|" `
--dateformat "yyyy-MM-dd HH:mm:ss" `
--encoding "UTF-8" `
--parallelmethod "DataDriven" `
--distributekeycolumn "order_status" `
--paralleldegree 6 `
--merge "False"
ADBC Examples
The adbc_oracle connection type uses the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native exports. Output is Parquet-only, and the Physical parallel method (resolved to Rowid) is also supported — see Connection Parameters and Parallel Parameters for details.
./FastBCP \
--connectiontype "adbc_oracle" \
--server "localhost:1521/orclpdb1" \
--user "MIG_EXPRESS" \
--password "FastPassword" \
--sourceschema "TPCH10" \
--sourcetable "LINEITEM" \
--directory "./" \
--fileoutput "{sourcetable}.parquet" \
--method "None"
Build your command with the Wizard