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.

General properties

The following table summarizes the properties used for connecting.

Property Data Source Method Default
AuthenticationMethod getAuthenticationMethod()

setAuthenticationMethod(String)

userIdPassword
Password getPassword()

setPassword(String)

No default value
PortNumber getPortNumber()

setPortNumber(int)

30015

ServerName getServerName()

setServerName(String)

No default value
User getUser()

setUser(String)

No default value

Proxy server properties

The following table summarizes proxy server connection properties.

Property Data Source Method Default
ProxyHost getProxyHost()

setProxyHost(String)

No default value
ProxyPassword getProxyPassword()

setProxyPassword(String)

No default value
ProxyPort getProxyPort()

setProxyPort(Integer)

0 which means the default is determined by the ProxyHost property.

For HTTP URLs: 80

For HTTPS URLs: 443

ProxyUser getProxyUser()

setProxyUser(String)

No default value
UseSystemProxyOptions getUseSystemProxy()

setUseSystemProxy(Boolean)

true

Data type properties

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

Table 1. Data Type Properties
Property Data Source Method Default
ConvertNull getConvertNull()

setConvertNull(Boolean)

true
JavaDoubleToString getJavaDoubleToString()

setJavaDoubleToString(Boolean)

false

Data encryption properties

The following table summarizes connection properties that can be used to enable TLS/SSL encryption.

Property Data Source Method Default
EncryptionMethod setEncryptionMethod

getEncryptionMethod

noEncryption
HostNameInCertificate setHostNameInCertificate

getHostNameInCertificate

No default value
KeyStore setKeyStore

getKeyStore

No default value
KeyStorePassword setKeyStorePassword

getKeyStorePassword

No default value
KeyPassword setKeyPassword

getKeyPassword

No default value
TrustStore setTrustStore

getTrustStore

No default value
TrustStorePassword setTrustStorePassword

getTrustStorePassword

No default value
ValidateServerCertificate setValidateServerCertificate

getValidateServerCertificate

true

Timeout properties

The following table summarizes timeout connection properties.

Property Data Source Method Default
LoginTimeout getLoginTimeout()

setLoginTimeout(Integer)

0
QueryTimeout getQueryTimeout()

setQueryTimeout(Integer)

0

Statement pooling properties

The following table summarizes statement pooling connection properties.

Table 2. Statement Pooling Properties
Property Data Source Method Default
ImportStatementPool getImportStatementPool()

setImportStatementPool(String)

No default value
MaxPooledStatements getMaxPooledStatements()

setMaxPooledStatements(Integer)

0
RegisterStatementPoolMonitorMBean getRegisterStatementPoolMonitorMBean()

setRegisterStatementPoolMonitorMBean(Boolean)

false

Failover properties

The following table summarizes connection properties which are used to implement failover.

Property Data Source Method Default
AlternateServers getAlternateServers()

setAlternateServers(String)

No default value
ConnectionRetryCount getConnectionRetryCount()

setConnectionRetryCount(Integer)

5
ConnectionRetryDelay getConnectionRetryDelay()

setConnectionRetryDelay(Integer)

1
DatabaseName getDatabaseName()

setDatabaseName(String)

No default value
FailoverGranularity getFailoverGranularity()

setFailoverGranularity(String)

nonAtomic
FailoverMode getFailoverMode()

setFailoverMode(String)

connect
FailoverPreconnect getFailoverPreconnect()

setFailoverPreconnect(Boolean)

false
LoadBalancing getLoadBalancing()

setLoadBalancing(Boolean)

No default value

Client information properties

The following table summarizes connection properties which are used to return client information.

Property Data Source Method Default
ApplicationName getApplicationName()

setApplicationName(String)

No default value
ClientHostName getClientHostName()

setClientHostName(String)

No default value
ClientUser getClientUser()

setClientUser(String)

No default value
ProgramID getProgramID()

setProgramID(String)

No default value

Additional properties

The following table summarizes additional connection properties.

Property Data Source Method Default
FetchSize getFetchSize()

setFetchSize(Integer)

100
InsensitiveResultSetBufferSize getInsensitiveResultsetBufferSize()

setInsensitiveResultsetBufferSize(Integer)

2048
SpyAttributes getSpyAttributes()

setSpyAttributes(String)

No default value