You can use connection properties to customize the driver for your environment. This section organizes connection properties according to functionality. You can use connection properties with either the JDBC DriverManager or a JDBC data source. For a DriverManager connection, a property is expressed as a key value pair and takes the form property=value. For a data source connection, a property is expressed as a JDBC method and takes the form setproperty(value).

Note:
  • In a JDBC data source, string values must be enclosed in double quotation marks, for example, setUser("abc@defcorp.com").
  • The data type listed for each connection property is the Java data type used for the property value in a JDBC data source.
  • Connection property names are case-insensitive. For example, Password is the same as password.
  • For connection properties that support string values, use the following escape sequence to specify values containing leading or trailing spaces and curly brackets: {value}. For example: User={hello } or Password={{hello}}.

The following tables describe the connection properties by functionality.

Required properties

The following table summarizes properties required for connecting.

Property Data Source Method Default
PortNumber getPortNumber()

setPortNumber(Integer)

1433
ServerName getServerName()

setServerName(String)

None

Authentication properties

The following table summarizes properties required for authentication.

Property Data Source Method Default
AccessToken getAccessToken()

setAccessToken(String)

None

ActiveDirectoryPrincipalID getActiveDirectoryPrincipalID()

setActiveDirectoryPrincipalID(String)

Empty string

ActiveDirectoryPrincipalSecret getActiveDirectoryPrincipalSecret()

setActiveDirectoryPrincipalSecret(String)

Empty string

AuthenticationMethod getAuthenticationMethod()

setAuthenticationMethod(String)

auto
Domain getDomain()

setDomain(String)

None

GSSCredential getGSSCredential()

setGSSCredential(String)

Null

LoginConfigName getLoginConfigName()

setLoginConfigName(String)

JDBC_DRIVER_01

Password getPassword()

setPassword(String)

None

ServicePrincipalName getServicePrincipalName()

setServicePrincipalName(String)

Driver builds value based on environment

User getUser()

setUser(String)

None

Data encryption properties

The following table summarizes properties required for encrypting data.

Property Data Source Method Default
CryptoProtocolVersion getCryptoProtocolVersion()

setCryptoProtocolVersion(String)

None

EncryptionMethod getEncryptionMethod()

setEncryptionMethod(String)

noEncryption
HostNameInCertificate getHostNameInCertificate()

setHostNameInCertificate(String)

Empty string

TrustStore getTrustStore()

setTrustStore(String)

None

TrustStorePassword getTrustStorePassword()

setTrustStorePassword(String)

None

ValidateServerCertificate getValidateServerCertificate()

setValidateServerCertificate(Boolean)

true

Failover properties

The following table summarizes properties which can be used to implement failover.

Property Data Source Method Default
AlternateServers getAlternateServers()

setAlternateServers(String)

None

ConnectionRetryCount getConnectionRetryCount()

setConnectionRetryCount(Integer)

5
ConnectionRetryDelay getConnectionRetryDelay()

setConnectionRetryDelay(Integer)

1 (second)
FailoverGranularity getFailoverGranularity()

setFailoverGranularity(String)

nonAtomic
FailoverMode getFailoverMode()

setFailoverMode(String)

connect
FailoverPreconnect getFailoverPreconnect()

setFailoverPreconnect(Boolean)

false
LoadBalancing getLoadBalancing()

setLoadBalancing(Boolean)

false
MultiSubnetFailover getMultiSubnetFailover()

setMultiSubnetFailover(Boolean)

false

Bulk load properties

The following table summarizes properties used to configure bulk operations.

Property Data Source Method Default
BulkLoadBatchSize getBulkLoadBatchSize()

setBulkLoadBatchSize(Long)

1000 (rows)

BulkLoadOptions getBulkLoadOptions()

setBulkLoadOptions(Long)

2

EnableBulkLoad getEnableBulkLoad()

setEnableBulkLoad(Boolean)

false

Proxy server properties

The following table summarizes properties used for proxy server connections.

Property Data Source Method Default
ProxyHost getProxyHost()

setProxyHost(String)

None
ProxyPassword getProxyPassword()

setProxyPassword(String)

None
ProxyPort getProxyPort()

setProxyPort(Integer)

0 which means that the default value is determined by whether the value specified for the ProxyHost property is an HTTP or HTTPS URL.

For HTTP: 80

For HTTPS: 443

ProxyUser getProxyUser()

setProxyUser(String)

None

Data type properties

The following table summarizes properties which can be used to handle data types.

Property Data Source Method Default
ConvertNull getConvertNull()

setConvertNull(Integer)

1 (data type check is performed if column value is null)
DateTimeInputParameterType getDateTimeInputParameterType()

setDateTimeInputParameterType(String)

auto
DateTimeOutputParameterType getDateTimeOutputParameterType()

setDateTimeOutputParameterType(String)

auto
DescribeInputParameters getDescribeInputParameters()

setDescribeInputParameters(String)

noDescribe
DescribeOutputParameters getDescribeOutputParameters()

setDescribeOutputParameters(String)

noDescribe
FetchTSWTZAsTimestamp getFetchTSWTZAsTimestamp()

setFetchTSWTZAsTimestamp(Boolean)

false
FetchTWFSasTime getFetchTWFSasTime()

setFetchTWFSasTime(Boolean)

false
JavaDoubleToString getDateTimeOutputParameterType()

setJavaDoubleToString(Boolean)

false
JDBCBehavior getJDBCBehavior()

setJDBCBehavior(Integer)

1
XMLDescribeType getXMLDescribeType()

setXMLDescribeType(String)

None

Timeout properties

The following table summarizes timeout connection properties.

Property Data Source Method Default
EnableCancelTimeout getEnableCancelTimeout()

setEnableCancelTimeout(Boolean)

false
LoginTimeout getLoginTimeout()

setLoginTimeout(Integer)

0
QueryTimeout getQueryTimeout()

setQueryTimeout(Integer)

0

Statement pooling properties

The following table summarizes the statement pooling connection properties.

Property Data Source Method Default
ImportStatementPool getImportStatementPool()

setImportStatementPool(String)

None
MaxPooledStatements getMaxPooledStatements()

setMaxPooledStatements(Integer)

0
RegisterStatementPoolMonitorMBean getRegisterStatementPoolMonitorMBean()

setRegisterStatementPoolMonitorMBean(Boolean)

false

Client information properties

The following table summarizes the connection properties which can be used to return client information.

Property Data Source Method Default
AccountingInfo getAccountingInfo()

setAccountingInfo(String)

None
ApplicationName getApplicationName()

setApplicationName(String)

None
ClientHostName getClientHostName()

setClientHostName(String)

None
ClientUser getClientUser()

setClientUser(String)

None
NetAddress getNetAddress()

setNetAddress(String)

000000000000
ProgramID getProgramID()

setProgramID(String)

None

Always encrypted properties

The following table summarizes the connection properties related to Always Encrypted functionality.

Property Data Source Method Default
AEKeyCacheTTL getAEKeyCacheTTL()

setAEKeyCacheTTL(Long)

7200
ColumnEncryption getColumnEncryption()

setColumnEncryption(String)

Disabled
AEKeystoreClientSecret getAEKeystoreClientSecret()

setAEKeystoreClientSecret(String)

None
AEKeystorePrincipalId getAEKeystorePrincipalId()

setAEKeystorePrincipalId(String)

None
AEKeystoreLocation getAEKeystoreLocation()

setAEKeystoreLocation(String)

None
AEKeystoreSecret getAEKeystoreSecret()

setAEKeystoreSecret(String)

None

Additional properties

The following table summarizes additional connection properties.

Property Data Source Method Default
AlwaysReportTriggerResults getAlwaysReportTriggerResults()

setAlwaysReportTriggerResults(Boolean)

false
ApplicationIntent getApplicationIntent()

setApplicationIntent(String)

ReadWrite
CatalogOptions getCatalogOptions()

setCatalogOptions(Integer)

0
CodePageOverride getCodePageOverride()

setCodePageOverride(String)

None
DatabaseName getDatabaseName()

setDatabaseName(String)

None
EnableReplicationUser getEnableReplicationUser()

setEnableReplicationUser(Boolean)

false (Disabled)
InitializationString getInitializationString()

setInitializationString(String)

None
InsensitiveResultSetBufferSize getInsensitiveResultSetBufferSize()

setInsensitiveResultSetBufferSize(Integer)

2048 KB
LongDataCacheSize getLongDataCacheSize()

setLongDataCacheSize(Integer)

2048
PacketSize getPacketSize()

setPacketSize(Integer)

-1
ResultSetMetaDataOptions getResultSetMetaDataOptions()

setResultSetMetaDataOptions(Integer)

0
SelectMethod getSelectMethod()

setSelectMethod(String)

direct
SnapshotSerializable getSnapshotSerializable()

setSnapshotSerializable(Boolean)

false
SpyAttributes getSpyAttributes()

setSpyAttributes(String)

None
SuppressConnectionWarnings getSuppressConnectionWarnings()

setSuppressConnectionWarnings(Boolean)

false
TransactionMode getTransactionMode()

setTransactionMode(String)

implicit
TruncateFractionalSeconds getTruncateFractionalSeconds()

setTruncateFractionalSeconds(Boolean)

true
UseServerSideUpdatableCursors getUseServerSideUpdatableCursors()

setUseServerSideUpdatableCursors(Boolean)

false
XATransactionGroup getXATransactionGroup()

setXATransactionGroup(String)

None