Connection Parameters
FastBCP requires connection information to access your database. This page covers all connection-related parameters.
Connection Type
Specify the type of database connection driver to use. This parameter determines how FastBCP connects to your database.
./FastBCP \
...
--connectiontype mssql \
...
Syntax:
- Short form:
-C "connection_type" - Long form:
--connectiontype "connection_type"
Available Connection Types:
| Connection Type | Description |
|---|---|
adbc_mssql | Microsoft SQL Server via ADBC (Arpe.io ADBC FastDriver) - 2x faster for Parquet exports |
adbc_pgsql | PostgreSQL via ADBC (Arpe.io ADBC FastDriver) - ultra-fast Parquet exports |
adbc_oracle | Oracle via ADBC (Arpe.io ADBC FastDriver) - ultra-fast Parquet exports |
adbc_netezza | Netezza / IBM NPS via ADBC (embedded ArpeNetezza driver) - no NZdotNET needed, works with IBM Cloud NPS |
adbc_teradata | Teradata via ADBC (embedded ArpeTeradata driver) - TLS logon needs no Teradata client software |
clickhouse | ClickHouse database |
hana | SAP HANA database |
mssql | Microsoft SQL Server (default) |
mysql | MySQL/MariaDB database |
nzsql | IBM Netezza |
odbc | Generic ODBC connection |
oledb | Generic OLE DB connection |
oraodp | Oracle Data Provider |
pgcopy | PostgreSQL with COPY protocol |
pgsql | PostgreSQL standard connection |
teradata | Teradata database |
The ADBC FastDriver connectors (adbc_mssql, adbc_pgsql, adbc_oracle, adbc_netezza, adbc_teradata) are available on Windows x64 and Linux x64 only. They are not supported on Linux ARM64.
ADBC connectors (adbc_mssql, adbc_pgsql, adbc_oracle, adbc_netezza, adbc_teradata) only support exporting to Parquet format. No other output format is supported with these connection types.
Since FastBCP 1.3, the ADBC connectors run fully on their ADBC driver: the metadata and planning step (row counts, column types, Ntile, Random, Timepartition, DBPartition, …) uses the same driver and the same connection string as the data step. No SqlClient, Npgsql, ODP.NET or NZdotNET is involved.
DSN (Data Source Name)
If you have chosen an ODBC connection type, you must define the DSN with the -N or --dsn parameter, or alternatively define a connection string using -g or --sourceconnectstring.
./FastBCP \
...
--connectiontype odbc \
--dsn "MyODBCDataSource" \
...
Syntax:
- Short form:
-N "DSN_name" - Long form:
--dsn "DSN_name"
Provider
If you have chosen an OLEDB connection type, you must define the OLEDB provider with the -P or --provider parameter.
./FastBCP \
...
--connectiontype oledb \
--provider MSOLEDBSQL \
...
./FastBCP \
...
--connectiontype oledb \
--provider NZOLEDB \
...
Syntax:
- Short form:
-P "provider_name" - Long form:
--provider "provider_name"
Server
Except if you have defined a connection string (-g or --sourceconnectstring), you must define a server (or could also be a TNS entry for Oracle).
Syntax:
- Short form:
-S "server" - Long form:
--server "server"
Server Format Examples
The server parameter accepts different formats depending on your database:
IP address or DNS name:
./FastBCP \
...
--server "myserver.mydomain.com" \
...
IP address or DNS name with port number:
./FastBCP \
...
--server "myserver.mydomain.com:2433" \
...
or
./FastBCP \
...
--server "myserver.mydomain.com,2433" \
...
IP address or DNS name with named instance:
./FastBCP \
...
--server "myserver.mydomain.com\myinstance" \
...
For Oracle - Easy Connect string:
./FastBCP \
...
--server "myserver.mydomain.com:1521/myinstance" \
...
Trusted or User & Password
Trusted
You can used a trusted (Windows or Kerberos Authentication) using the --trusted switch parameter.
./FastBCP \
...
--server "myserver.mydomain.com\myinstance \
--trusted \
--database MySourceDB" \
...
User and Password
You can also provide a user and password
the --user and --password can be used like this
./FastBCP \
...
--server "myserver.mydomain.com\myinstance \
--user "FastUser" \
--password "FastPassword" \
--database MySourceDB" \
...
Source Connection String
You can use a connection string to define the connection to the database. This connection string will override any other connection parameters and can be used if the other authentication mode are not enougth for your case
You can use the connection string for any connection type. The connection string must be enclosed in double quotes.
Example:
./FastBCP \
...
--sourceconnectstring "Server=myserver;Database=mydb;User ID=FastUser;Password=FastPassword;Encrypt=True;TrustServerCertificate=True"
...
Syntax:
- Short form:
-g "connection_string" - Long form:
--sourceconnectstring "connection_string"
Passwords are masked in logs and telemetry, including quoted passwords containing ; (e.g. Password="p;w=1").
Connection Strings with ADBC Connectors
With the ADBC connection types (adbc_mssql, adbc_pgsql, adbc_oracle, adbc_netezza, adbc_teradata), --sourceconnectstring accepts:
- The native syntax of the database (ADO.NET-style
Key=Value;pairs), translated to the driver keys - Explicit
adbc.*/arpeio.*keys, which win over translated keys - A whole-connection
uri/adbc.<driver>.connection_string
Native keys with no driver equivalent (e.g. Pooling=false) are dropped with a warning. With a whole-connection uri / connection_string, native keys are dropped with a warning: put them inside the URI / connection string instead.
A Driver= path in --sourceconnectstring is used for both the metadata and the data step.
adbc_netezza
Keys do not need the adbc.arpenz. prefix. All of the following are accepted:
| Kind | Keys |
|---|---|
| Friendly / ADO.NET keys | Server, Host, host:port, Port, Database, User ID, Password, SSL Mode, Application Name, … |
| Plain driver keys | sslmode, tls_min_version, char_encoding, login_timeout, … |
| Whole connection | uri, connection_string |
Keys the driver does not support (e.g. propagate, Pooling) are ignored, with a single warning. Application Name defaults to FastBCP.
./FastBCP \
--connectiontype adbc_netezza \
--sourceconnectstring "Server=nps-host;Port=5480;Database=SALES;User ID=admin;Password=FastPassword;SSL Mode=require" \
...
NPS 7.x servers only offer TLS 1.0/1.1. Add tls_min_version=1.0 to the connection string to connect to them.
adbc_pgsql
Like -C pgsql, -C adbc_pgsql honours PGUSER, PGPASSWORD, PGPASSFILE / ~/.pgpass and PGSSLROOTCERT when -U / -X / -g do not provide them.
A NaN in a NUMERIC column fails the read. Add adbc.arpepgsql.numeric_special=null to --sourceconnectstring to read it as NULL instead.
adbc_oracle
Like -C oraodp, -C adbc_oracle resolves TNS aliases through tnsnames.ora (looked up in TNS_ADMIN, then $ORACLE_HOME/network/admin), so --server can be a TNS alias.
Network encryption and data integrity are negotiated with encryption=accepted and data_integrity=accepted, so the server decides, as with -C oraodp. Use the FASTBCP_ADBC_ENCRYPTION / FASTBCP_ADBC_DATA_INTEGRITY environment variables or explicit keys to override this.
adbc_teradata
-C adbc_teradata reads Teradata through the embedded ArpeTeradata ADBC driver, for both the metadata step and the data step. It uses the Teradata SQL dialect, like -C teradata.
Connection:
--server host[:port](legacy port, default1025),--user,--passwordand an optional--database, or a--sourceconnectstringin the Teradata provider spelling.- Keys translated from
--sourceconnectstring:Host/Server/Data Source,Port/DBS Port/Port Number,Database/Initial Catalog,User Id/User Name/UID,Password/PWD,SSL Mode,HTTPS Port,SSL CA,SSL CA Path,TMODE,Login Timeout/Connect Timeout/Connection Timeout,Query Timeout,TTU Path. Explicitadbc.arpeteradata.*keys are passed as is and win. - Trusted authentication (
--trusted/-A) is not supported: FastBCP stops with-C adbc_teradata does not support trusted (-A) authentication: give -U and -X.
Logon and Teradata Tools and Utilities (TTU):
- The default logon (
sslmode=prefer) uses TLS on the HTTPS port (443) and needs no Teradata client software. - When the server has no TLS, the driver falls back to the legacy port (1025).
sslmode=disablein--sourceconnectstringalways uses the legacy port. The legacy-port logon needs the customer's TTU (CLIv2). - Linux: FastBCP looks for TTU in the
FASTBCP_TTU_PATHenvironment variable, then in attuorTeradataToolsAndUtilitiesBasedirectory next to the FastBCP binary. The library directory found is passed to the driver (adbc.arpeteradata.ttu_path) and logged. When nothing is found, the driver searches itself (ARPETERADATA_TTU_PATH,/opt/teradata/client, the system library path). - Windows: FastBCP passes nothing; the driver finds
wincli32.dllitself (ARPETERADATA_TTU_PATH, its own directory, the registered TTU installation).
See FASTBCP_TTU_PATH for the TTU folder layouts accepted on Linux and how to prepare Teradata's TTU download without installing it.
./FastBCP \
--connectiontype adbc_teradata \
--server "td-host" \
--user "FastUser" \
--password "FastPassword" \
--database "TPCH" \
...
Database
Optionally define a source database.
Example:
./FastBCP \
...
--database "AdventureWorks" \
...
Syntax:
- Short form:
-I "database_name" - Long form:
--database "database_name"
Application Intent
Specifies the application workload type when connecting to SQL Server. This parameter is only applicable for SQL Server (mssql, adbc_mssql) and OLEDB (oledb) connection types.
With adbc_mssql, an ApplicationIntent key in --sourceconnectstring is also passed to the driver.
Syntax:
- Long form:
--applicationintent "ReadOnly|ReadWrite"
Values:
ReadOnly(default) - Declares the read-only workload type when connecting to a read-only replica in an Always On availability groupReadWrite- Declares a read-write workload type (standard connection)
Example (Read-Only):
./FastBCP \
--connectiontype mssql \
--server "myserver.mydomain.com" \
--applicationintent ReadOnly \
--database "AdventureWorks" \
...
Example (Read-Write):
./FastBCP \
--connectiontype mssql \
--server "myserver.mydomain.com" \
--applicationintent ReadWrite \
--database "AdventureWorks" \
...
When using ReadOnly, the connection will be routed to a read-only replica if available in an Always On availability group configuration. This is useful for offloading reporting and export workloads from the primary replica.