SQLServerDataSource Class

  • java.lang.Object
    • com.microsoft.sqlserver.jdbc.SQLServerDataSource

Implements

ISQLServerDataSource java.io.Serializable javax.naming.Referenceable javax.sql.DataSource

public class SQLServerDataSource
implements ISQLServerDataSource, javax.sql.DataSource, java.io.Serializable, javax.naming.Referenceable

Contains a list of properties specific for the SQLServerConnection class.

Constructor Summary

Constructor Description
SQLServerDataSource()

Constructs a SQLServerDataSource.

Method Summary

Modifier and Type Method and Description
T unwrap(Class<T> iface)
java.lang.String getAADSecurePrincipalId()

Deprecated

Returns the value for the connection property 'AADSecurePrincipalId'.

java.lang.String getAccessToken()

Returns the access token.

SQLServerAccessTokenCallback getAccessTokenCallback()

Returns a SQLServerAccessTokenCallback, the access token callback delegate.

java.lang.String getAccessTokenCallbackClass()

Returns the fully qualified class name of the implementing class for SQLServerAccessTokenCallback.

java.lang.String getApplicationIntent()

Returns the application intent.

java.lang.String getApplicationName()

Returns the application name.

java.lang.String getAuthentication()

Returns the authentication mode.

boolean getCalcBigDecimalPrecision()

Returns the value for 'calcBigDecimalPrecision'.

int getCancelQueryTimeout()

Returns the cancel timeout.

java.lang.String getClientCertificate()

Returns client certificate path for client certificate authentication.

java.lang.String getClientKey()

Returns Private key file path for client certificate authentication.

java.lang.String getColumnEncryptionSetting()

Returns the Always Encrypted functionality setting for the data source object.

int getConnectRetryCount()

Returns the maximum number of attempts set to reestablish a broken connection.

int getConnectRetryInterval()

Returns the interval set, in seconds, between attempts to reestablish a broken connection.

java.sql.Connection getConnection()
java.sql.Connection getConnection(String username, String password)
java.lang.String getDatabaseName()

Returns the database name.

java.lang.String getDatetimeParameterType()

Returns the value of the datetimeParameterType connection property.

boolean getDelayLoadingLobs()

Returns the current flag value for delayLoadingLobs.

java.lang.String getDescription()

Returns the DataSource description

boolean getDisableStatementPooling()

Returns whether statement pooling is disabled.

java.lang.String getDomain()

Returns the value for the connection property 'domain'.

boolean getEnablePrepareOnFirstPreparedStatementCall()

Returns the value that indicates whether the first execution of a prepared statement will call sp_executesql and not prepare a statement.

java.lang.String getEnclaveAttestationProtocol()

Returns the enclave attestation protocol used in Always Encrypted with Secure Enclaves.

java.lang.String getEnclaveAttestationUrl()

Returns the enclave attestation URL used in Always Encrypted with Secure Enclaves.

java.lang.String getEncrypt()

Returns the TLS encryption option.

boolean getFIPS()

Returns the value of connection property "fips".

java.lang.String getFailoverPartner()

Returns the name of the failover server that is used in a database mirroring configuration.

org.ietf.jgss.GSSCredential getGSSCredentials()

Returns the GSSCredential.

java.lang.String getHostNameInCertificate()

Returns the host name used in validating the SQL Server Secure Sockets Layer (SSL) certificate.

java.lang.String getIPAddressPreference()

Gets the preferred type of IP Address

java.lang.String getInstanceName()

Returns the SQL Server instance name.

java.lang.String getJAASConfigurationName()

Returns the login configuration name for Kerberos authentication.

java.lang.String getJASSConfigurationName()

Deprecated

Returns the login configuration name for Kerberos authentication.

java.lang.String getKeyStoreAuthentication()

Returns the value of the keyStoreAuthentication setting for the data source object.

java.lang.String getKeyStoreLocation()

Returns the keyStoreLocation for the Java Key Store.

java.lang.String getKeyStorePrincipalId()

Returns the value for the connection property 'keyStorePrincipalId'.

java.lang.String getKeyVaultProviderClientId()

Returns the value for the connection property 'keyVaultProviderClientId'.

boolean getLastUpdateCount()

Returns a Boolean value that indicates if the lastUpdateCount property is enabled.

int getLockTimeout()

Returns an int value that indicates the number of milliseconds that the database will wait before reporting a lock time out.

java.io.PrintWriter getLogWriter()

Returns the log writer for this DataSource.

int getLoginTimeout()
java.lang.String getMSIClientId()

Deprecated

This method is deprecated. Use getUser() instead. Returns the value for the connection property 'msiClientId'.

Returns the value for the connection property 'msiClientId'.

java.lang.String getMaxResultBuffer()

Returns value of 'maxResultBuffer' from Connection String.

int getMsiTokenCacheTtl()

Deprecated

Time-to-live is no longer supported for the cached Managed Identity tokens. This method is a no-op for backwards compatibility only.

Time-to-live is no longer supported for the cached Managed Identity tokens.

boolean getMultiSubnetFailover()

Returns the value of the multiSubnetFailover connection property.

int getPacketSize()

Returns the current network packet size used to communicate with SQL Server, specified in bytes.

java.util.logging.Logger getParentLogger()
int getPortNumber()

Returns the current port number that is used to communicate with SQL Server.

java.lang.String getPrepareMethod()

Returns the value indicating the prepare method.

int getQueryTimeout()

Returns the query timeout.

java.lang.String getRealm()

Returns the realm for Kerberos authentication.

javax.naming.Reference getReference()
boolean getReplication()

Returns the value of the replication connection property.

java.lang.String getResponseBuffering()

Returns the response buffering mode for this SQLServerDataSource object.

java.lang.String getSSLProtocol()

Returns the value of connection property 'sslProtocol'.

java.lang.String getSelectMethod()

Returns the default cursor type used for all result sets that are created by using this SQLServerDataSource object.

boolean getSendStringParametersAsUnicode()

Returns whether sending string parameters to the server in UNICODE format is enabled.

boolean getSendTemporalDataTypesAsStringForBulkCopy()

Returns the current flag for value sendTemporalDataTypesAsStringForBulkCopy

boolean getSendTimeAsDatetime()

Returns the value of the sendTimeAsDatetime connection property.

java.lang.String getServerCertificate()

Returns the path to the server certificate.

java.lang.String getServerName()

Returns the name of the SQL Server instance.

boolean getServerNameAsACE()

Returns if the serverName should be translated from Unicode to ASCII Compatible Encoding (ACE).

int getServerPreparedStatementDiscardThreshold()

Returns the value of the setting that controls how many outstanding prepared statement discard actions (sp_unprepare) can be outstanding per connection before a call to clean-up the outstanding handles on the server is executed.

java.lang.String getServerSpn()

Returns the server spn.

java.lang.String getSocketFactoryClass()

Returns the value for the connection property 'socketFactoryClass'.

java.lang.String getSocketFactoryConstructorArg()

Returns the value for the connection property 'socketFactoryConstructorArg'.

int getSocketTimeout()

Returns the socket timeout value.

int getStatementPoolingCacheSize()

Returns the size of the prepared statement cache for this connection.

boolean getTransparentNetworkIPResolution()

Returns the TransparentNetworkIPResolution value.

java.lang.String getTrustManagerClass()

Returns the value for the connection property 'trustManagerClass'.

java.lang.String getTrustManagerConstructorArg()

Returns the value for the connection property 'trustManagerConstructorArg'.

boolean getTrustServerCertificate()

Returns a boolean value that indicates if the trustServerCertificate property is enabled.

java.lang.String getTrustStore()

Returns the path (including file name) to the certificate trustStore file.

java.lang.String getTrustStoreType()

Returns the keyStore Type for the trustStore.

java.lang.String getURL()

Returns the URL that is used to connect to the data source.

boolean getUseBulkCopyForBatchInsert()

Returns whether the use Bulk Copy API is used for Batch Insert.

boolean getUseDefaultGSSCredential()

Returns the useDefaultGSSCredential.

boolean getUseDefaultJaasConfig()

Returns whether the default JAAS Configuration should be used

boolean getUseFlexibleCallableStatements()

Returns whether or not sp_sproc_columns is being used for parameter name lookup.

boolean getUseFmtOnly()

Returns the current flag value for useFmtOnly.

java.lang.String getUser()

Returns the user name that is used to connect the data source.

java.lang.String getWorkstationID()

Returns the name of the client computer name that is used to connect to the data source.

boolean getXopenStates()

Returns the value that indicates if converting SQL states to XOPEN compliant states is enabled.

boolean getcacheBulkCopyMetadata()

Sets the value for 'cacheBulkCopyMetadata' property

boolean isWrapperFor(Class<?> iface)
void setAADSecurePrincipalId(String aadSecurePrincipalId)

Deprecated

Sets the 'AADSecurePrincipalId' connection property used for Active Directory Service Principal authentication.

void setAADSecurePrincipalSecret(String aadSecurePrincipalSecret)

Deprecated

Sets the 'AADSecurePrincipalSecret' connection property used for Active Directory Service Principal authentication.

void setAccessToken(String accessToken)

Sets the access token.

void setAccessTokenCallback(SQLServerAccessTokenCallback accessTokenCallback)

Sets the SQLServerAccessTokenCallback delegate.

void setAccessTokenCallbackClass(String accessTokenCallbackClass)

Sets 'accessTokenCallbackClass' to the fully qualified class name of the implementing class for SQLServerAccessTokenCallback.

void setApplicationIntent(String applicationIntent)

Sets the application intent.

void setApplicationName(String applicationName)

Sets the specific application in various SQL Server profiling and logging tools.

void setAuthentication(String authentication)

Sets the authentication mode.

void setAuthenticationScheme(String authenticationScheme)

Sets the kind of integrated security you want your application to use.

void setCalcBigDecimalPrecision(boolean calcBigDecimalPrecision)

Sets the 'calcBigDecimalPrecision' setting.

void setCancelQueryTimeout(int cancelQueryTimeout)

Sets the cancel timeout.

void setClientCertificate(String certPath)

Sets client certificate path for client certificate authentication.

void setClientKey(String keyPath)

Sets Private key file path for client certificate authentication.

void setClientKeyPassword(String password)

Sets the password to be used for Private key provided by the user for client certificate authentication.

void setColumnEncryptionSetting(String columnEncryptionSetting)

Sets the Column Encryption setting.

void setConnectRetryCount(int count)

Sets the maximum number of attempts to reestablish a broken connection.

void setConnectRetryInterval(int interval)

Sets the interval, in seconds, between attempts to reestablish a broken connection.

void setDatabaseName(String databaseName)

Sets the the database to connect to.

void setDatetimeParameterType(String datetimeParameterType)

Sets the SQL server datatype to use for Java datetime and timestamp values.

void setDelayLoadingLobs(boolean delayLoadingLobs)

Specifies the flag to load LOBs instead of streaming them.

void setDescription(String description)

Sets the DataSource description.

void setDisableStatementPooling(boolean disableStatementPooling)

Sets the value to disable/enable statement pooling.

void setDomain(String domain)

Sets the 'domain' connection property used for NTLM Authentication.

void setEnablePrepareOnFirstPreparedStatementCall(boolean enablePrepareOnFirstPreparedStatementCall)

Sets the value that enables/disables whether the first execution of a prepared statement will call sp_executesql and not prepare a statement.

void setEnclaveAttestationProtocol(String protocol)

Sets the enclave attestation protocol to be used in Always Encrypted with Secure Enclaves.

void setEnclaveAttestationUrl(String url)

Sets the enclave attestation URL used in Always Encrypted with Secure Enclaves.

void setEncrypt(boolean encryptOption)

Deprecated

Sets the option whether TLS encryption is used.

void setEncrypt(String encryptOption)

Sets the option whether TLS encryption is used.

void setFIPS(boolean fips)

Sets whether Fips Mode should be enabled/disabled on the connection.

void setFailoverPartner(String serverName)

Sets the fail over partner of the target SQL Server.

void setGSSCredentials(GSSCredential userCredential)

Sets the GSSCredential.

void setHostNameInCertificate(String hostName)

Sets the host name to be used in validating the SQL Server Secure Sockets Layer (SSL) certificate.

void setIPAddressPreference(String iPAddressPreference)

Set the preferred type of IP Address

void setInstanceName(String instanceName)

Sets the the SQL Server instance name to connect to.

void setIntegratedSecurity(boolean enable)

Sets a Boolean value that indicates if the integratedSecurity property is enabled.

void setJAASConfigurationName(String configurationName)

Sets the login configuration name for Kerberos authentication.

void setJASSConfigurationName(String configurationName)

Deprecated

Sets the login configuration name for Kerberos authentication.

void setKeyStoreAuthentication(String keyStoreAuthentication)

Sets the name that identifies a key store.

void setKeyStoreLocation(String keyStoreLocation)

Sets the location including the file name for the Java keystore.

void setKeyStorePrincipalId(String keyStorePrincipalId)

Sets the value for the connection property 'keyStorePrincipalId'.

void setKeyStoreSecret(String keyStoreSecret)

Sets the password for the Java keystore.

void setKeyVaultProviderClientId(String keyVaultProviderClientId)

Sets the Azure Key Vault (AKV) Provider Client Id to provided value to be used for column encryption.

void setKeyVaultProviderClientKey(String keyVaultProviderClientKey)

Sets the Azure Key Vault (AKV) Provider Client Key to provided value to be used for column encryption.

void setLastUpdateCount(boolean lastUpdateCount)

Sets a Boolean value that indicates if the lastUpdateCount property is enabled.

void setLockTimeout(int lockTimeout)

Sets the lock timeout value.

void setLogWriter(PrintWriter out)
void setLoginTimeout(int loginTimeout)

Sets the maximum time in seconds that this data source will wait while attempting to connect to a database.

void setMSIClientId(String managedIdentityClientId)

Deprecated

This method is deprecated. Use setUser(String user) instead. Sets the client id to be used to retrieve the access token for a user-assigned Managed Identity.

Sets the client id to be used to retrieve the access token for a user-assigned Managed Identity.

void setMaxResultBuffer(String maxResultBuffer)

Sets the value for 'maxResultBuffer' property

void setMsiTokenCacheTtl(int timeToLive)

Deprecated

Time-to-live is no longer supported for the cached Managed Identity tokens. This method will always return 0 and is for backwards compatibility only.

Time-to-live is no longer supported for the cached Managed Identity tokens.

void setMultiSubnetFailover(boolean multiSubnetFailover)

Sets the value of the multiSubnetFailover connection property.

void setPacketSize(int packetSize)

Sets the packet size.

void setPassword(String password)

Sets the password that will be used when connecting to SQL Server.

void setPortNumber(int portNumber)

Sets the TCP-IP port number used when opening a socket connection to SQL Server.

void setPrepareMethod(String prepareMethod)

Sets the behavior for the prepare method.

void setQueryTimeout(int queryTimeout)

Setting the query timeout.

void setRealm(String realm)

Sets the realm for Kerberos authentication.

void setReplication(boolean replication)

Sets the value to enable/disable the replication connection property.

void setResponseBuffering(String bufferingMode)

Sets the response buffering mode for connections created by using this SQLServerDataSource object.

void setSSLProtocol(String sslProtocol)

Sets the sslProtocol property for connection Set this value to specify TLS protocol keyword.

void setSelectMethod(String selectMethod)

Sets the default cursor type used for the result set.

void setSendStringParametersAsUnicode(boolean sendStringParametersAsUnicode)

Sets whether string parameters are sent to the server in UNICODE format.

void setSendTemporalDataTypesAsStringForBulkCopy(boolean sendTemporalDataTypesAsStringForBulkCopy)

Specifies the flag to send temporal datatypes as String for Bulk Copy.

void setSendTimeAsDatetime(boolean sendTimeAsDatetime)

Sets the value to enable/disable the sendTimeAsDatetime connection property.

void setServerCertificate(String cert)

Sets the connection property 'serverCertificate' on the connection.

void setServerName(String serverName)

Sets the host name of the target SQL Server.

void setServerNameAsACE(boolean serverNameAsACE)

Sets whether the serverName will be translated from Unicode to ASCII Compatible Encoding (ACE).

void setServerPreparedStatementDiscardThreshold(int serverPreparedStatementDiscardThreshold)

Sets the value that controls how many outstanding prepared statement discard actions (sp_unprepare) can be outstanding per connection before a call to clean-up the outstanding handles on the server is executed.

void setServerSpn(String serverSpn)

Sets the Service Principal Name (SPN) of the target SQL Server.

void setSocketFactoryClass(String socketFactoryClass)

Sets the connection property 'socketFactoryClass' on the connection.

void setSocketFactoryConstructorArg(String socketFactoryConstructorArg)

Sets Constructor Arguments to be provided on constructor of 'socketFactoryClass'.

void setSocketTimeout(int socketTimeout)

Sets the socket timeout value.

void setStatementPoolingCacheSize(int statementPoolingCacheSize)

Sets the size of the prepared statement cache for this connection.

void setTransparentNetworkIPResolution(boolean tnir)

Sets the value to enable/disable Transparent Network IP Resolution (TNIR).

void setTrustManagerClass(String trustManagerClass)

Sets the connection property 'trustManagerClass' on the connection.

void setTrustManagerConstructorArg(String trustManagerConstructorArg)

Sets Constructor Arguments to be provided on constructor of 'trustManagerClass'.

void setTrustServerCertificate(boolean e)

Sets a boolean value that indicates if the trustServerCertificate property is enabled.

void setTrustStore(String trustStore)

Sets the path (including file name) to the certificate trustStore file.

void setTrustStorePassword(String trustStorePassword)

Sets the password that is used to check the integrity of the trustStore data.

void setTrustStoreType(String trustStoreType)

Sets the keystore type for the trustStore.

void setURL(String url)

Sets the datasource URL.

void setUseBulkCopyForBatchInsert(boolean useBulkCopyForBatchInsert)

Sets whether the use Bulk Copy API should be used for Batch Insert.

void setUseDefaultGSSCredential(boolean enable)

Sets the value to indicate whether useDefaultGSSCredential is enabled.

void setUseDefaultJaasConfig(boolean useDefaultJaasConfig)

Sets whether the default JAAS Configuration will be used.

void setUseFlexibleCallableStatements(boolean enable)

Sets whether or not sp_sproc_columns will be used for parameter name lookup.

void setUseFmtOnly(boolean useFmtOnly)

Specifies the flag to use FMTONLY for parameter metadata queries.

void setUser(String user)

Sets the user name that will be used when connecting to SQL Server.

void setWorkstationID(String workstationID)

Sets the name of the client machine (or client workstation).

void setXopenStates(boolean xopenStates)

Sets whether the driver will convert SQL states to XOPEN compliant states.

void setcacheBulkCopyMetadata(boolean cacheBulkCopyMetadata)

Returns value of 'cacheBulkCopyMetadata' from Connection String.

java.lang.String toString()

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

SQLServerDataSource

public SQLServerDataSource()

Constructs a SQLServerDataSource.

Method Details

unwrap

public T <T>unwrap(Class<T> iface)

Parameters:

iface

Throws:

java.sql.SQLException

getAADSecurePrincipalId

(=9.4.1,=true)
public String getAADSecurePrincipalId()

Deprecated

Returns the value for the connection property 'AADSecurePrincipalId'.

getAccessToken

public String getAccessToken()

Returns the access token.

getAccessTokenCallback

public SQLServerAccessTokenCallback getAccessTokenCallback()

Returns a SQLServerAccessTokenCallback, the access token callback delegate.

Returns:

Access token callback delegate.

getAccessTokenCallbackClass

public String getAccessTokenCallbackClass()

Returns the fully qualified class name of the implementing class for SQLServerAccessTokenCallback.

Returns:

accessTokenCallbackClass

getApplicationIntent

public String getApplicationIntent()

Returns the application intent.

getApplicationName

public String getApplicationName()

Returns the application name.

getAuthentication

public String getAuthentication()

Returns the authentication mode.

getCalcBigDecimalPrecision

public boolean getCalcBigDecimalPrecision()

Returns the value for 'calcBigDecimalPrecision'.

Returns:

computeBigDecimal boolean value

getCancelQueryTimeout

public int getCancelQueryTimeout()

Returns the cancel timeout.

getClientCertificate

public String getClientCertificate()

Returns client certificate path for client certificate authentication.

getClientKey

public String getClientKey()

Returns Private key file path for client certificate authentication.

getColumnEncryptionSetting

public String getColumnEncryptionSetting()

Returns the Always Encrypted functionality setting for the data source object.

getConnectRetryCount

public int getConnectRetryCount()

Returns the maximum number of attempts set to reestablish a broken connection.

getConnectRetryInterval

public int getConnectRetryInterval()

Returns the interval set, in seconds, between attempts to reestablish a broken connection.

getConnection

public Connection getConnection()

Throws:

getConnection

public Connection getConnection(String username, String password)

Parameters:

username
password

Throws:

getDatabaseName

public String getDatabaseName()

Returns the database name.

getDatetimeParameterType

public String getDatetimeParameterType()

Returns the value of the datetimeParameterType connection property. This method was added in SQL Server JDBC Driver 12.2. Returns the setting of the datetimeParameterType connection property.

getDelayLoadingLobs

public boolean getDelayLoadingLobs()

Returns the current flag value for delayLoadingLobs.

getDescription

public String getDescription()

Returns the DataSource description

getDisableStatementPooling

public boolean getDisableStatementPooling()

Returns whether statement pooling is disabled.

getDomain

public String getDomain()

Returns the value for the connection property 'domain'.

getEnablePrepareOnFirstPreparedStatementCall

public boolean getEnablePrepareOnFirstPreparedStatementCall()

Returns the value that indicates whether the first execution of a prepared statement will call sp_executesql and not prepare a statement. If this configuration returns false the first execution of a prepared statement will call sp_executesql and not prepare a statement, once the second execution happens it will call sp_prepexec and actually setup a prepared statement handle. Following executions will call sp_execute. This relieves the need for sp_unprepare on prepared statement close if the statement is only executed once.

getEnclaveAttestationProtocol

public String getEnclaveAttestationProtocol()

Returns the enclave attestation protocol used in Always Encrypted with Secure Enclaves.

getEnclaveAttestationUrl

public String getEnclaveAttestationUrl()

Returns the enclave attestation URL used in Always Encrypted with Secure Enclaves.

getEncrypt

public String getEncrypt()

Returns the TLS encryption option.

getFIPS

public boolean getFIPS()

Returns the value of connection property "fips". For FIPS enabled JVM this property should be true.

getFailoverPartner

public String getFailoverPartner()

Returns the name of the failover server that is used in a database mirroring configuration.

getGSSCredentials

public GSSCredential getGSSCredentials()

Returns the GSSCredential.

getHostNameInCertificate

public String getHostNameInCertificate()

Returns the host name used in validating the SQL Server Secure Sockets Layer (SSL) certificate.

getIPAddressPreference

public String getIPAddressPreference()

Gets the preferred type of IP Address

getInstanceName

public String getInstanceName()

Returns the SQL Server instance name.

getJAASConfigurationName

public String getJAASConfigurationName()

Returns the login configuration name for Kerberos authentication.

getJASSConfigurationName

(=9.3.0,=true)
public String getJASSConfigurationName()

Deprecated

Returns the login configuration name for Kerberos authentication.

getKeyStoreAuthentication

public String getKeyStoreAuthentication()

Returns the value of the keyStoreAuthentication setting for the data source object.

getKeyStoreLocation

public String getKeyStoreLocation()

Returns the keyStoreLocation for the Java Key Store.

getKeyStorePrincipalId

public String getKeyStorePrincipalId()

Returns the value for the connection property 'keyStorePrincipalId'.

getKeyVaultProviderClientId

public String getKeyVaultProviderClientId()

Returns the value for the connection property 'keyVaultProviderClientId'.

getLastUpdateCount

public boolean getLastUpdateCount()

Returns a Boolean value that indicates if the lastUpdateCount property is enabled.

getLockTimeout

public int getLockTimeout()

Returns an int value that indicates the number of milliseconds that the database will wait before reporting a lock time out.

getLogWriter

public PrintWriter getLogWriter()

Returns the log writer for this DataSource.

getLoginTimeout

public int getLoginTimeout()

getMSIClientId

(=12.1.0,=true)
public String getMSIClientId()

Deprecated

This method is deprecated. Use getUser() instead. Returns the value for the connection property 'msiClientId'.

Returns the value for the connection property 'msiClientId'.

Returns:

msiClientId property value

getMaxResultBuffer

public String getMaxResultBuffer()

Returns value of 'maxResultBuffer' from Connection String.

getMsiTokenCacheTtl

(=12.1.0,=true)
public int getMsiTokenCacheTtl()

Deprecated

Time-to-live is no longer supported for the cached Managed Identity tokens. This method is a no-op for backwards compatibility only.

Time-to-live is no longer supported for the cached Managed Identity tokens. This method will always return 0 and is for backwards compatibility only.

getMultiSubnetFailover

public boolean getMultiSubnetFailover()

Returns the value of the multiSubnetFailover connection property.

getPacketSize

public int getPacketSize()

Returns the current network packet size used to communicate with SQL Server, specified in bytes.

getParentLogger

public Logger getParentLogger()

Throws:

java.sql.SQLFeatureNotSupportedException

getPortNumber

public int getPortNumber()

Returns the current port number that is used to communicate with SQL Server.

getPrepareMethod

public String getPrepareMethod()

Returns the value indicating the prepare method. PrepareMethod

getQueryTimeout

public int getQueryTimeout()

Returns the query timeout.

getRealm

public String getRealm()

Returns the realm for Kerberos authentication.

getReference

public Reference getReference()

getReplication

public boolean getReplication()

Returns the value of the replication connection property.

getResponseBuffering

public String getResponseBuffering()

Returns the response buffering mode for this SQLServerDataSource object.

getSSLProtocol

public String getSSLProtocol()

Returns the value of connection property 'sslProtocol'.

getSelectMethod

public String getSelectMethod()

Returns the default cursor type used for all result sets that are created by using this SQLServerDataSource object.

getSendStringParametersAsUnicode

public boolean getSendStringParametersAsUnicode()

Returns whether sending string parameters to the server in UNICODE format is enabled.

getSendTemporalDataTypesAsStringForBulkCopy

public boolean getSendTemporalDataTypesAsStringForBulkCopy()

Returns the current flag for value sendTemporalDataTypesAsStringForBulkCopy

getSendTimeAsDatetime

public boolean getSendTimeAsDatetime()

Returns the value of the sendTimeAsDatetime connection property. This method was added in SQL Server JDBC Driver 3.0. Returns the setting of the sendTimeAsDatetime connection property.

getServerCertificate

public String getServerCertificate()

Returns the path to the server certificate.

getServerName

public String getServerName()

Returns the name of the SQL Server instance.

getServerNameAsACE

public boolean getServerNameAsACE()

Returns if the serverName should be translated from Unicode to ASCII Compatible Encoding (ACE).

getServerPreparedStatementDiscardThreshold

public int getServerPreparedStatementDiscardThreshold()

Returns the value of the setting that controls how many outstanding prepared statement discard actions (sp_unprepare) can be outstanding per connection before a call to clean-up the outstanding handles on the server is executed.

getServerSpn

public String getServerSpn()

Returns the server spn.

getSocketFactoryClass

public String getSocketFactoryClass()

Returns the value for the connection property 'socketFactoryClass'.

getSocketFactoryConstructorArg

public String getSocketFactoryConstructorArg()

Returns the value for the connection property 'socketFactoryConstructorArg'.

getSocketTimeout

public int getSocketTimeout()

Returns the socket timeout value.

getStatementPoolingCacheSize

public int getStatementPoolingCacheSize()

Returns the size of the prepared statement cache for this connection. A value less than 1 means no cache.

getTransparentNetworkIPResolution

public boolean getTransparentNetworkIPResolution()

Returns the TransparentNetworkIPResolution value.

getTrustManagerClass

public String getTrustManagerClass()

Returns the value for the connection property 'trustManagerClass'.

getTrustManagerConstructorArg

public String getTrustManagerConstructorArg()

Returns the value for the connection property 'trustManagerConstructorArg'.

getTrustServerCertificate

public boolean getTrustServerCertificate()

Returns a boolean value that indicates if the trustServerCertificate property is enabled.

getTrustStore

public String getTrustStore()

Returns the path (including file name) to the certificate trustStore file.

getTrustStoreType

public String getTrustStoreType()

Returns the keyStore Type for the trustStore.

getURL

public String getURL()

Returns the URL that is used to connect to the data source.

getUseBulkCopyForBatchInsert

public boolean getUseBulkCopyForBatchInsert()

Returns whether the use Bulk Copy API is used for Batch Insert.

getUseDefaultGSSCredential

public boolean getUseDefaultGSSCredential()

Returns the useDefaultGSSCredential.

getUseDefaultJaasConfig

public boolean getUseDefaultJaasConfig()

Returns whether the default JAAS Configuration should be used

getUseFlexibleCallableStatements

public boolean getUseFlexibleCallableStatements()

Returns whether or not sp_sproc_columns is being used for parameter name lookup.

getUseFmtOnly

public boolean getUseFmtOnly()

Returns the current flag value for useFmtOnly.

getUser

public String getUser()

Returns the user name that is used to connect the data source.

getWorkstationID

public String getWorkstationID()

Returns the name of the client computer name that is used to connect to the data source.

getXopenStates

public boolean getXopenStates()

Returns the value that indicates if converting SQL states to XOPEN compliant states is enabled.

getcacheBulkCopyMetadata

public boolean getcacheBulkCopyMetadata()

Sets the value for 'cacheBulkCopyMetadata' property

isWrapperFor

public boolean isWrapperFor(Class<?> iface)

Parameters:

iface

Throws:

java.sql.SQLException

setAADSecurePrincipalId

(=9.4.1,=true)
public void setAADSecurePrincipalId(String aadSecurePrincipalId)

Deprecated

Sets the 'AADSecurePrincipalId' connection property used for Active Directory Service Principal authentication.

Parameters:

aadSecurePrincipalId

setAADSecurePrincipalSecret

(=9.4.1,=true)
public void setAADSecurePrincipalSecret(String aadSecurePrincipalSecret)

Deprecated

Sets the 'AADSecurePrincipalSecret' connection property used for Active Directory Service Principal authentication.

Parameters:

aadSecurePrincipalSecret

setAccessToken

public void setAccessToken(String accessToken)

Sets the access token.

Parameters:

accessToken

setAccessTokenCallback

public void setAccessTokenCallback(SQLServerAccessTokenCallback accessTokenCallback)

Sets the SQLServerAccessTokenCallback delegate.

Parameters:

accessTokenCallback - Access token callback delegate.

setAccessTokenCallbackClass

public void setAccessTokenCallbackClass(String accessTokenCallbackClass)

Sets 'accessTokenCallbackClass' to the fully qualified class name of the implementing class for SQLServerAccessTokenCallback.

Parameters:

accessTokenCallbackClass - access token callback class

setApplicationIntent

public void setApplicationIntent(String applicationIntent)

Sets the application intent.

Parameters:

applicationIntent

setApplicationName

public void setApplicationName(String applicationName)

Sets the specific application in various SQL Server profiling and logging tools.

Parameters:

applicationName

setAuthentication

public void setAuthentication(String authentication)

Sets the authentication mode.

Parameters:

authentication

setAuthenticationScheme

public void setAuthenticationScheme(String authenticationScheme)

Sets the kind of integrated security you want your application to use.

Parameters:

authenticationScheme

setCalcBigDecimalPrecision

public void setCalcBigDecimalPrecision(boolean calcBigDecimalPrecision)

Sets the 'calcBigDecimalPrecision' setting.

Parameters:

calcBigDecimalPrecision - boolean property to have the driver calculate a big decimal's precision from input

setCancelQueryTimeout

public void setCancelQueryTimeout(int cancelQueryTimeout)

Sets the cancel timeout.

Parameters:

cancelQueryTimeout

setClientCertificate

public void setClientCertificate(String certPath)

Sets client certificate path for client certificate authentication.

Parameters:

certPath

setClientKey

public void setClientKey(String keyPath)

Sets Private key file path for client certificate authentication.

Parameters:

keyPath

setClientKeyPassword

public void setClientKeyPassword(String password)

Sets the password to be used for Private key provided by the user for client certificate authentication.

Parameters:

password

setColumnEncryptionSetting

public void setColumnEncryptionSetting(String columnEncryptionSetting)

Sets the Column Encryption setting. If lastUpdateCount is set to true, the driver will return only the last update count from all the update counts returned by a batch. The default of false will return all update counts. If lastUpdateCount is not set, getLastUpdateCount returns the default value of false.

Parameters:

columnEncryptionSetting

setConnectRetryCount

public void setConnectRetryCount(int count)

Sets the maximum number of attempts to reestablish a broken connection.

Parameters:

count

setConnectRetryInterval

public void setConnectRetryInterval(int interval)

Sets the interval, in seconds, between attempts to reestablish a broken connection.

Parameters:

interval

setDatabaseName

public void setDatabaseName(String databaseName)

Sets the the database to connect to.

Parameters:

databaseName - if not set, returns the default value of null.

setDatetimeParameterType

public void setDatetimeParameterType(String datetimeParameterType)

Sets the SQL server datatype to use for Java datetime and timestamp values.

Parameters:

datetimeParameterType

setDelayLoadingLobs

public void setDelayLoadingLobs(boolean delayLoadingLobs)

Specifies the flag to load LOBs instead of streaming them.

Parameters:

delayLoadingLobs

setDescription

public void setDescription(String description)

Sets the DataSource description. Per JDBC specification 16.1.1 "...the only property that all DataSource implementations are required to support is the description property".

Parameters:

description

setDisableStatementPooling

public void setDisableStatementPooling(boolean disableStatementPooling)

Sets the value to disable/enable statement pooling.

Parameters:

disableStatementPooling

setDomain

public void setDomain(String domain)

Sets the 'domain' connection property used for NTLM Authentication.

Parameters:

domain

setEnablePrepareOnFirstPreparedStatementCall

public void setEnablePrepareOnFirstPreparedStatementCall(boolean enablePrepareOnFirstPreparedStatementCall)

Sets the value that enables/disables whether the first execution of a prepared statement will call sp_executesql and not prepare a statement. If this configuration is false the first execution of a prepared statement will call sp_executesql and not prepare a statement, once the second execution happens it will call sp_prepexec and actually setup a prepared statement handle. Following executions will call sp_execute. This relieves the need for sp_unprepare on prepared statement close if the statement is only executed once.

Parameters:

enablePrepareOnFirstPreparedStatementCall

setEnclaveAttestationProtocol

public void setEnclaveAttestationProtocol(String protocol)

Sets the enclave attestation protocol to be used in Always Encrypted with Secure Enclaves.

Parameters:

protocol

setEnclaveAttestationUrl

public void setEnclaveAttestationUrl(String url)

Sets the enclave attestation URL used in Always Encrypted with Secure Enclaves.

Parameters:

url

setEncrypt

(=10.1.0,=true)
public void setEncrypt(boolean encryptOption)

Deprecated

Sets the option whether TLS encryption is used.

Parameters:

encryptOption

setEncrypt

public void setEncrypt(String encryptOption)

Sets the option whether TLS encryption is used.

Parameters:

encryptOption

setFIPS

public void setFIPS(boolean fips)

Sets whether Fips Mode should be enabled/disabled on the connection. For FIPS enabled JVM this property should be true.

Parameters:

fips

setFailoverPartner

public void setFailoverPartner(String serverName)

Sets the fail over partner of the target SQL Server.

Parameters:

serverName - if not set, returns the default value of null.

setGSSCredentials

public void setGSSCredentials(GSSCredential userCredential)

Sets the GSSCredential.

Parameters:

userCredential

setHostNameInCertificate

public void setHostNameInCertificate(String hostName)

Sets the host name to be used in validating the SQL Server Secure Sockets Layer (SSL) certificate.

Parameters:

hostName

setIPAddressPreference

public void setIPAddressPreference(String iPAddressPreference)

Set the preferred type of IP Address

Parameters:

iPAddressPreference - Preferred IP Address type

setInstanceName

public void setInstanceName(String instanceName)

Sets the the SQL Server instance name to connect to.

Parameters:

instanceName - if not set, returns the default value of null.

setIntegratedSecurity

public void setIntegratedSecurity(boolean enable)

Sets a Boolean value that indicates if the integratedSecurity property is enabled.

Parameters:

enable

setJAASConfigurationName

public void setJAASConfigurationName(String configurationName)

Sets the login configuration name for Kerberos authentication. This overrides the default configuration SQLJDBCDriver

Parameters:

configurationName

setJASSConfigurationName

(=9.3.0,=true)
public void setJASSConfigurationName(String configurationName)

Deprecated

Sets the login configuration name for Kerberos authentication. This overrides the default configuration SQLJDBCDriver

Parameters:

configurationName

setKeyStoreAuthentication

public void setKeyStoreAuthentication(String keyStoreAuthentication)

Sets the name that identifies a key store. Only value supported is the "JavaKeyStorePassword" for identifying the Java Key Store. The default is null.

Parameters:

keyStoreAuthentication

setKeyStoreLocation

public void setKeyStoreLocation(String keyStoreLocation)

Sets the location including the file name for the Java keystore. Note that, keyStoreAuthentication must be set with "JavaKeyStorePassword".

Parameters:

keyStoreLocation

setKeyStorePrincipalId

public void setKeyStorePrincipalId(String keyStorePrincipalId)

Sets the value for the connection property 'keyStorePrincipalId'.

Parameters:

keyStorePrincipalId

setKeyStoreSecret

public void setKeyStoreSecret(String keyStoreSecret)

Sets the password for the Java keystore. Note that, for Java Key Store provider the password for the keystore and the key must be the same. Note that, keyStoreAuthentication must be set with "JavaKeyStorePassword".

Parameters:

keyStoreSecret

setKeyVaultProviderClientId

public void setKeyVaultProviderClientId(String keyVaultProviderClientId)

Sets the Azure Key Vault (AKV) Provider Client Id to provided value to be used for column encryption.

Parameters:

keyVaultProviderClientId

setKeyVaultProviderClientKey

public void setKeyVaultProviderClientKey(String keyVaultProviderClientKey)

Sets the Azure Key Vault (AKV) Provider Client Key to provided value to be used for column encryption.

Parameters:

keyVaultProviderClientKey

setLastUpdateCount

public void setLastUpdateCount(boolean lastUpdateCount)

Sets a Boolean value that indicates if the lastUpdateCount property is enabled.

Parameters:

lastUpdateCount

setLockTimeout

public void setLockTimeout(int lockTimeout)

Sets the lock timeout value.

Parameters:

lockTimeout - the number of milliseconds to wait before the database reports a lock timeout. The default value of -1 means wait forever. If specified, this value will be the default for all statements on the connection. Note a value of 0 means no wait. If lockTimeout is not set, getLockTimeout returns the default of -1.

setLogWriter

public void setLogWriter(PrintWriter out)

Parameters:

out

setLoginTimeout

public void setLoginTimeout(int loginTimeout)

Sets the maximum time in seconds that this data source will wait while attempting to connect to a database. Note default value is 0.

Parameters:

loginTimeout

setMSIClientId

(=12.1.0,=true)
public void setMSIClientId(String managedIdentityClientId)

Deprecated

This method is deprecated. Use setUser(String user) instead. Sets the client id to be used to retrieve the access token for a user-assigned Managed Identity.

Sets the client id to be used to retrieve the access token for a user-assigned Managed Identity.

Parameters:

managedIdentityClientId - Client ID of the user-assigned Managed Identity.

setMaxResultBuffer

public void setMaxResultBuffer(String maxResultBuffer)

Sets the value for 'maxResultBuffer' property

Parameters:

maxResultBuffer

setMsiTokenCacheTtl

(=12.1.0,=true)
public void setMsiTokenCacheTtl(int timeToLive)

Deprecated

Time-to-live is no longer supported for the cached Managed Identity tokens. This method will always return 0 and is for backwards compatibility only.

Time-to-live is no longer supported for the cached Managed Identity tokens. This method is a no-op for backwards compatibility only.

Parameters:

timeToLive

setMultiSubnetFailover

public void setMultiSubnetFailover(boolean multiSubnetFailover)

Sets the value of the multiSubnetFailover connection property.

Parameters:

multiSubnetFailover

setPacketSize

public void setPacketSize(int packetSize)

Sets the packet size.

Parameters:

packetSize - the size (in bytes) to use for the TCP/IP send and receive buffer. It is also the value used for the TDS packet size (SQL Server Network Packet Size). Validity of the value is checked at connect time. If no value is set for this property, its default value is 4KB.

setPassword

public void setPassword(String password)

Sets the password that will be used when connecting to SQL Server.

Parameters:

password - Note getPassword is deliberately declared non-public for security reasons. If the password is not set, getPassword returns the default value of null.

setPortNumber

public void setPortNumber(int portNumber)

Sets the TCP-IP port number used when opening a socket connection to SQL Server.

Parameters:

portNumber - if not set, getPortNumber returns the default of 1433. Note as mentioned above, setPortNumber does not do any range checking on the port value passed in,\ invalid port numbers like 99999 can be passed in without triggering any error.

setPrepareMethod

public void setPrepareMethod(String prepareMethod)

Sets the behavior for the prepare method. PrepareMethod

Parameters:

prepareMethod

setQueryTimeout

public void setQueryTimeout(int queryTimeout)

Setting the query timeout.

Parameters:

queryTimeout

setRealm

public void setRealm(String realm)

Sets the realm for Kerberos authentication.

Parameters:

realm - realm

setReplication

public void setReplication(boolean replication)

Sets the value to enable/disable the replication connection property.

Parameters:

replication

setResponseBuffering

public void setResponseBuffering(String bufferingMode)

Sets the response buffering mode for connections created by using this SQLServerDataSource object.

Parameters:

bufferingMode

setSSLProtocol

public void setSSLProtocol(String sslProtocol)

Sets the sslProtocol property for connection Set this value to specify TLS protocol keyword. Acceptable values are: TLS, TLSv1, TLSv1.1, and TLSv1.2.

Parameters:

sslProtocol

setSelectMethod

public void setSelectMethod(String selectMethod)

Sets the default cursor type used for the result set.

Parameters:

selectMethod - This(non-Javadoc) @see com.microsoft.sqlserver.jdbc.ISQLServerDataSource#setSelectMethod(java.lang.String) property is useful when you are dealing with large result sets and do not want to store the whole result set in memory on the client side. By setting the property to "cursor" you will be able to create a server side cursor that can fetch smaller chunks of data at a time. If selectMethod is not set, getSelectMethod returns the default value of "direct".

setSendStringParametersAsUnicode

public void setSendStringParametersAsUnicode(boolean sendStringParametersAsUnicode)

Sets whether string parameters are sent to the server in UNICODE format.

Parameters:

sendStringParametersAsUnicode - if true (default), string parameters are sent to the server in UNICODE format. if false, string parameters are sent to the server in the native TDS collation format of the database, not in UNICODE. if set, returns the default of true.

setSendTemporalDataTypesAsStringForBulkCopy

public void setSendTemporalDataTypesAsStringForBulkCopy(boolean sendTemporalDataTypesAsStringForBulkCopy)

Specifies the flag to send temporal datatypes as String for Bulk Copy.

Parameters:

sendTemporalDataTypesAsStringForBulkCopy

setSendTimeAsDatetime

public void setSendTimeAsDatetime(boolean sendTimeAsDatetime)

Sets the value to enable/disable the sendTimeAsDatetime connection property.

Parameters:

sendTimeAsDatetime

setServerCertificate

public void setServerCertificate(String cert)

Sets the connection property 'serverCertificate' on the connection.

Parameters:

cert

setServerName

public void setServerName(String serverName)

Sets the host name of the target SQL Server.

Parameters:

serverName - if not set, returns the default value of null is returned.

setServerNameAsACE

public void setServerNameAsACE(boolean serverNameAsACE)

Sets whether the serverName will be translated from Unicode to ASCII Compatible Encoding (ACE).

Parameters:

serverNameAsACE

setServerPreparedStatementDiscardThreshold

public void setServerPreparedStatementDiscardThreshold(int serverPreparedStatementDiscardThreshold)

Sets the value that controls how many outstanding prepared statement discard actions (sp_unprepare) can be outstanding per connection before a call to clean-up the outstanding handles on the server is executed. If the setting is <= 1 unprepare actions will be executed immedietely on prepared statement close. If it is set to > 1 these calls will be batched together to avoid overhead of calling sp_unprepare too often.

Parameters:

serverPreparedStatementDiscardThreshold

setServerSpn

public void setServerSpn(String serverSpn)

Sets the Service Principal Name (SPN) of the target SQL Server. https://msdn.microsoft.com/en-us/library/cc280459.aspx

Parameters:

serverSpn - service principal name

setSocketFactoryClass

public void setSocketFactoryClass(String socketFactoryClass)

Sets the connection property 'socketFactoryClass' on the connection.

Parameters:

socketFactoryClass

setSocketFactoryConstructorArg

public void setSocketFactoryConstructorArg(String socketFactoryConstructorArg)

Sets Constructor Arguments to be provided on constructor of 'socketFactoryClass'.

Parameters:

socketFactoryConstructorArg

setSocketTimeout

public void setSocketTimeout(int socketTimeout)

Sets the socket timeout value.

Parameters:

socketTimeout

setStatementPoolingCacheSize

public void setStatementPoolingCacheSize(int statementPoolingCacheSize)

Sets the size of the prepared statement cache for this connection. A value less than 1 means no cache.

Parameters:

statementPoolingCacheSize

setTransparentNetworkIPResolution

public void setTransparentNetworkIPResolution(boolean tnir)

Sets the value to enable/disable Transparent Network IP Resolution (TNIR). Beginning in version 6.0 of the Microsoft JDBC Driver for SQL Server, a new connection property transparentNetworkIPResolution (TNIR) is added for transparent connection to Always On availability groups or to a server which has multiple IP addresses associated. When transparentNetworkIPResolution is true, the driver attempts to connect to the first IP address available. If the first attempt fails, the driver tries to connect to all IP addresses in parallel until the timeout expires, discarding any pending connection attempts when one of them succeeds.

transparentNetworkIPResolution is ignored if multiSubnetFailover is true

transparentNetworkIPResolution is ignored if database mirroring is used

transparentNetworkIPResolution is ignored if there are more than 64 IP addresses

Parameters:

tnir

setTrustManagerClass

public void setTrustManagerClass(String trustManagerClass)

Sets the connection property 'trustManagerClass' on the connection.

Parameters:

trustManagerClass

setTrustManagerConstructorArg

public void setTrustManagerConstructorArg(String trustManagerConstructorArg)

Sets Constructor Arguments to be provided on constructor of 'trustManagerClass'.

Parameters:

trustManagerConstructorArg

setTrustServerCertificate

public void setTrustServerCertificate(boolean e)

Sets a boolean value that indicates if the trustServerCertificate property is enabled.

Parameters:

e

setTrustStore

public void setTrustStore(String trustStore)

Sets the path (including file name) to the certificate trustStore file.

Parameters:

trustStore

setTrustStorePassword

public void setTrustStorePassword(String trustStorePassword)

Sets the password that is used to check the integrity of the trustStore data.

Parameters:

trustStorePassword

setTrustStoreType

public void setTrustStoreType(String trustStoreType)

Sets the keystore type for the trustStore.

Parameters:

trustStoreType

setURL

public void setURL(String url)

Sets the datasource URL.

Parameters:

url - The URL property is exposed for backwards compatibility reasons. Also, several Java Application servers expect a setURL function on the DataSource and set it by default (JBoss and WebLogic) Note for security reasons we do not recommend that customers include the password in the url supplied to setURL. The reason for this is third-party Java Application Servers will very often display the value set to URL property in their DataSource configuration GUI. We recommend instead that clients use the setPassword method to set the password value. The Java Application Servers will not display a password that is set on the DataSource in the configuration GUI. Note if setURL is not called, getURL returns the default value of "jdbc:sqlserver://".

setUseBulkCopyForBatchInsert

public void setUseBulkCopyForBatchInsert(boolean useBulkCopyForBatchInsert)

Sets whether the use Bulk Copy API should be used for Batch Insert.

Parameters:

useBulkCopyForBatchInsert

setUseDefaultGSSCredential

public void setUseDefaultGSSCredential(boolean enable)

Sets the value to indicate whether useDefaultGSSCredential is enabled.

Parameters:

enable

setUseDefaultJaasConfig

public void setUseDefaultJaasConfig(boolean useDefaultJaasConfig)

Sets whether the default JAAS Configuration will be used. This means the system-wide JAAS configuration is ignored to avoid conflicts with libraries that override the JAAS configuration.

Parameters:

useDefaultJaasConfig

setUseFlexibleCallableStatements

public void setUseFlexibleCallableStatements(boolean enable)

Sets whether or not sp_sproc_columns will be used for parameter name lookup.

Parameters:

enable

setUseFmtOnly

public void setUseFmtOnly(boolean useFmtOnly)

Specifies the flag to use FMTONLY for parameter metadata queries.

Parameters:

useFmtOnly

setUser

public void setUser(String user)

Sets the user name that will be used when connecting to SQL Server.

Parameters:

user - if not set, returns the default value of null.

setWorkstationID

public void setWorkstationID(String workstationID)

Sets the name of the client machine (or client workstation).

Parameters:

workstationID - host name of the client. if not set, the default value is constructed by calling InetAddress.getLocalHost().getHostName() or if getHostName() returns blank then getHostAddress().toString().

setXopenStates

public void setXopenStates(boolean xopenStates)

Sets whether the driver will convert SQL states to XOPEN compliant states.

Parameters:

xopenStates - if true, the driver will convert SQL states to XOPEN compliant states. The default is false which causes the driver to generate SQL 99 state codes. If not set, getXopenStates returns the default value of false.

setcacheBulkCopyMetadata

public void setcacheBulkCopyMetadata(boolean cacheBulkCopyMetadata)

Returns value of 'cacheBulkCopyMetadata' from Connection String.

Parameters:

cacheBulkCopyMetadata

toString

public String toString()

Overrides:

SQLServerDataSource.toString()

Applies to