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
DatabaseName getDatabaseName()

setDatabaseName(String)

No default value
Password getPassword()

setPassword(String)

No default value
PortNumber getPortNumber()

setPortNumber(int)

5439

ServerName getServerName()

setServerName(String)

No default value
User getUser()

setUser(String)

No default value

Data encryption properties

The following table summarizes properties used in the implementation of SSL data encryption, including server and client authentication.

Property Data Source Method Default
CryptoProtocolVersion getCryptoProtocolVersion()

setCryptoProtocolVersion(String)

No default value
EncryptionMethod getEncryptionMethod()

setEncryptionMethod(String)

noEncryption
HostNameInCertificate getHostNameInCertificate()

setHostNameInCertificate(String)

No default value
KeyPassword getKeyPassword()

setKeyPassword(String)

No default value
KeyStore getKeyStore()

setKeyStore(String)

No default value
KeyStorePassword getKeyStorePassword()

setKeyStorePassword(String)

No default value
TrustStore getTrustStore()

setTrustStore(String)

No default value
TrustStorePassword getTrustStorePassword()

setTrustStorePassword(String)

No default value
ValidateServerCertificate getValidateServerCertificate()

setValidateServerCertificate(boolean)

true

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

MaxNumericPrecision getMaxNumericPrecision()

setMaxNumericPrecision(Integer)

1000
MaxNumericScale setMaxNumericScale()

setMaxNumericScale(Integer)

998
MaxVarcharSize getMaxVarcharSize()

setMaxVarcharSize(Integer)

10485760
VarcharClobThreshold getVarcharClobThreshold()

setVarcharClobThreshold(Varchar)

32768

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 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)

0

Bulk load properties

The following table contains the only connection property that affects how DataDirect bulk load works with the driver.

Property Data Source Method Default
BulkLoadBatchSize getBulkLoadBatchSize()

setBulkLoadBatchSize(Long)

1000

Failover properties

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

Property Data Source Method Default
ConnectionRetryCount getConnectionRetryCount()

setConnectionRetryCount(Integer)

5
ConnectionRetryDelay getConnectionRetryDelay()

setConnectionRetryDelay(Integer)

1

Client information properties

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

Property Data Source Method Default
AccountingInfo getAccountingInfo()

setAccountingInfo(String)

No default value
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
BatchMechanism getBatchMechanism()

setBatchMechanism(String)

MultiRowInsert
CallEscapeBehavior getCallEscapeBehavior()

setCallEscapeBehavior(String)

callIfNoReturn
CatalogOptions getCatalogOptions()

setCatalogOptions(Integer)

2
ExtendedColumnMetadata getExtendedColumnMetadata()

setExtendedColumnMetadata(Boolean)

false
InitializationString getInitializationString()

setInitializationString(String)

No default value
InsensitiveResultSetBufferSize getInsensitiveResultsetBufferSize()

setInsensitiveResultsetBufferSize(Integer)

2048
ResultSetMetaDataOptions getResultSetMetaDataOptions()

setResultSetMetaDataOptions(Integer)

0
SpyAttributes getSpyAttributes()

setSpyAttributes(String)

No default value
SupportsCatalogs getSupportsCatalogs()

setSupportsCatalogs(Boolean)

true
TransactionErrorBehavior getTransactionErrorBehavior()

setTransactionErrorBehavior(String)

RollbackTransaction