ADO.NET connection properties

You use connection properties to configure the connection between your ADO.NET client application and your Vertica database.

To download the ADO.NET driver, go to the Client Drivers Downloads page.

You use connection properties to configure the connection between your ADO.NET client application and your Vertica database. The properties provide the basic information about the connections, such as the server name and port number, needed to connect to your database.

You can set a connection property in two ways:

  • Include the property name and value as part of the connection string you pass to a VerticaConnection.

  • Set the properties in a VerticaConnectionStringBuilder object, and then pass the object as a string to a VerticaConnection.

Property Description Default Value
Database Name of the Vertica database to which you want to connect. For example, if you installed the example VMart database, the database is "VMart". none
User Name of the user to log into Vertica. none
Port Port on which Vertica is running. 5433
Host

The host name or IP address of the server on which Vertica is running.

You can provide an IPv4 address, IPv6 address, or host name.

In mixed IPv4/IPv6 networks, the DNS server configuration determines which IP version address is sent first. Use the PreferredAddressFamily option to force the connection to use either IPv4 or IPv6.

none
PreferredAddressFamily

The IP version to use if the client and server have both IPv4 and IPv6 addresses and you have provided a host name. Valid values are:

  • Ipv4—Connect to the server using IPv4.

  • Ipv6—Connect to the server using IPv6.

  • None—Use the IP address provided by the DNS server.

Vertica.Data.VerticaClient.AddressFamilyPreference.None
Password The password associated with the user connecting to the server. string.Empty
BinaryTransfer

Provides a Boolean value that, when set to true, uses binary transfer instead of text transfer. When set to false, the ADO.NET connection uses text transfer. Binary transfer provides faster performance in reading data from a server to an ADO.NET client. Binary transfer also requires less bandwidth than text transfer, although it sometimes uses more when transferring a large number of small values.

Binary transfer mode is not backwards compatible to ADO.NET versions earlier than 3.8. If you are using an earlier version, set this value to false.

The data output by both modes is identical with the following exceptions for certain data types:

  • FLOAT: Binary transfer has slightly better precision.

  • TIMESTAMPTZ: Binary transfer can fail to get the session time zone and default to the local time zone, while text transfer reliably uses the session time zone.

  • NUMERIC: Binary transfer is forcibly disabled for NUMERIC data by the server for Vertica 11.0.2+.

true
ConnSettings SQL commands to run upon connection. Uses %3B for semicolons. string.Empty
IsolationLevel

Sets the transaction isolation level for Vertica. See Transactions for a description of the different transaction levels. This value is either Serializable, ReadCommitted, or Unspecified. See Setting the transaction isolation level for an example of setting the isolation level using this keyword.

Note: By default, this value is set to IsolationLevel.Unspecified, which means the connection uses the server's default transaction isolation level. Vertica's default isolation level is IsolationLevel.ReadCommitted.

System.Data.
IsolationLevel.Unspecified
Label A string to identify the session on the server. string
DirectBatchInsert Deprecated true
ResultBufferSize The size of the buffer to use when streaming results. A value of 0 means ResultBufferSize is turned off. 8192
ConnectionTimeout Number seconds to wait for a connection. A value of 0 means no timeout. 0
ReadOnly A Boolean value. If true, throw an exception on write attempts. false
Pooling A boolean value, whether to enable connection pooling. Connection pooling is useful for server applications because it allows the server to reuse connections. This saves resources and enhances the performance of executing commands on the database. It also reduces the amount of time a user must wait to establish a connection to the database false
MinPoolSize

An integer that defines the minimum number of connections to pool.

Valid Values: Cannot be greater than the number of connections that the server is configured to allow. Otherwise, an exception results.

Default: 55

1
MaxPoolSize

An integer that defines the maximum number of connections to pool.

Valid Values: Cannot be greater than the number of connections that the server is configured to allow. Otherwise, an exception results.

20
LoadBalanceTimeout

The amount of time, expressed in seconds, to timeout or remove unused pooled connections.

**Disable: **Set to 0 (no timeouts)

If you are using a cluster environment to load-balance the work, then pool is restricted to the servers in the cluster when the pool was created. If additional servers are added to the cluster, and the pool is not removed, then the new servers are never added to the connection pool unless LoadBalanceTimeout is set and exceeded or VerticaConnection.ClearAllPools() is called manually from an application. If you are using load balancing, then set this property to a value that considers when new servers are added to the cluster. However, do not set it so low that pools are frequently removed and rebuilt, doing so makes pooling ineffective.

0 (no timeout)
Workload The name of the workload for the session. For details, see Workload routing. None (no workload)
SSL A Boolean value, indicating whether to use SSL for the connection. false
IntegratedSecurity Provides a Boolean value that, when set to true, uses the user’s Windows credentials for authentication, instead of user/password in the connection string. false
KerberosServiceName Provides the service name portion of the Vertica Kerberos principal; for example: vertica/host@EXAMPLE.COM vertica
KerberosHostname Provides the instance or host name portion of the Vertica Kerberos principal; for example: verticaost@EXAMPLE.COM Value specified in the servername connection string property