Module com.microsoft.sqlserver.jdbc
Package com.microsoft.sqlserver.jdbc
Interface ISQLServerDataSource
-
- All Superinterfaces:
CommonDataSource
- All Known Implementing Classes:
SQLServerConnectionPoolDataSource
,SQLServerDataSource
,SQLServerXADataSource
public interface ISQLServerDataSource extends CommonDataSource
Provides a factory to create connections to the data source represented by this object. This interface was added in SQL Server JDBC Driver 3.0. This interface is implemented bySQLServerDataSource
Class.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description String
getAADSecurePrincipalId()
Deprecated, for removal: This API element is subject to removal in a future version.UsegetUser()
insteadString
getAccessToken()
Returns the access token.SQLServerAccessTokenCallback
getAccessTokenCallback()
Returns aSQLServerAccessTokenCallback
, the access token callback delegate.String
getAccessTokenCallbackClass()
Returns the fully qualified class name of the implementing class forSQLServerAccessTokenCallback
.String
getApplicationIntent()
Returns the application intent.String
getApplicationName()
Returns the application name.String
getAuthentication()
Returns the authentication mode.boolean
getBulkCopyForBatchInsertAllowEncryptedValueModifications()
Returns whether to allow encrypted value modifications during bulk copy operations created from batch insert operations.int
getBulkCopyForBatchInsertBatchSize()
Returns the default batch size for bulk copy operations created from batch insert operations.boolean
getBulkCopyForBatchInsertCheckConstraints()
Returns whether to check constraints during bulk copy operations created from batch insert operations.boolean
getBulkCopyForBatchInsertFireTriggers()
Returns whether to fire triggers during bulk copy operations created from batch insert operations.boolean
getBulkCopyForBatchInsertKeepIdentity()
Returns whether to keep identity values during bulk copy operations created from batch insert operations.boolean
getBulkCopyForBatchInsertKeepNulls()
Returns whether to keep null values during bulk copy operations created from batch insert operations.boolean
getBulkCopyForBatchInsertTableLock()
Returns whether to use table lock during bulk copy operations created from batch insert operations.boolean
getcacheBulkCopyMetadata()
Sets the value for 'cacheBulkCopyMetadata' propertyboolean
getCalcBigDecimalPrecision()
Sets the value for 'calcBigDecimalPrecision' propertyint
getCancelQueryTimeout()
Returns the cancel timeout.String
getClientCertificate()
Returns client certificate path for client certificate authentication.String
getClientKey()
Returns Private key file path for client certificate authentication.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.String
getDatabaseName()
Returns the database name.String
getDatetimeParameterType()
Returns the value of the datetimeParameterType connection property.boolean
getDelayLoadingLobs()
Returns the current flag value for delayLoadingLobs.String
getDescription()
Returns a description of the data source.boolean
getDisableStatementPooling()
Returns whether statement pooling is disabled.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.String
getEnclaveAttestationProtocol()
Returns the enclave attestation protocol used in Always Encrypted with Secure Enclaves.String
getEnclaveAttestationUrl()
Returns the enclave attestation URL used in Always Encrypted with Secure Enclaves.String
getEncrypt()
Returns the TLS encryption option.String
getFailoverPartner()
Returns the name of the failover server that is used in a database mirroring configuration.boolean
getFIPS()
Returns the value of connection property "fips".GSSCredential
getGSSCredentials()
Returns the GSSCredential.String
getHostNameInCertificate()
Returns the host name used in validating the SQL Server Secure Sockets Layer (SSL) certificate.String
getInstanceName()
Returns the SQL Server instance name.String
getIPAddressPreference()
Gets the name of the preferred type of IP Address.String
getJAASConfigurationName()
Returns the login configuration name for Kerberos authentication.String
getJASSConfigurationName()
Deprecated, for removal: This API element is subject to removal in a future version.UsegetJAASConfigurationName()
insteadString
getKeyStoreAuthentication()
Returns the value of the keyStoreAuthentication setting for the data source object.String
getKeyStoreLocation()
Returns the keyStoreLocation for the Java Key Store.String
getKeyStorePrincipalId()
Returns the value for the connection property 'keyStorePrincipalId'.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.String
getMaxResultBuffer()
Returns value of 'maxResultBuffer' from Connection String.String
getMSIClientId()
Deprecated, for removal: This API element is subject to removal in a future version.UsegetUser()
instead.int
getMsiTokenCacheTtl()
Deprecated, for removal: This API element is subject to removal in a future version.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.int
getPortNumber()
Returns the current port number that is used to communicate with SQL Server.String
getPrepareMethod()
Returns the value indicating the prepare method.int
getQueryTimeout()
Returns the query timeout.String
getRealm()
Returns the realm for Kerberos authentication.boolean
getReplication()
Returns the value of the replication connection property.String
getResponseBuffering()
Returns the response buffering mode for this SQLServerDataSource object.String
getRetryConn()
Sets the value for 'retryConn' propertyString
getRetryExec()
Sets the value for 'retryExec' propertyString
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 sendTemporalDataTypesAsStringForBulkCopyboolean
getSendTimeAsDatetime()
Returns the value of the sendTimeAsDatetime connection property.String
getServerCertificate()
Returns the path to the server certificate.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.String
getServerSpn()
Returns the server spn.String
getSocketFactoryClass()
Returns the value for the connection property 'socketFactoryClass'.String
getSocketFactoryConstructorArg()
Returns the value for the connection property 'socketFactoryConstructorArg'.int
getSocketTimeout()
Returns the socket timeout value.String
getSSLProtocol()
Returns the value of connection property 'sslProtocol'.int
getStatementPoolingCacheSize()
Returns the size of the prepared statement cache for this connection.boolean
getTransparentNetworkIPResolution()
Returns the TransparentNetworkIPResolution value.String
getTrustManagerClass()
Returns the value for the connection property 'trustManagerClass'.String
getTrustManagerConstructorArg()
Returns the value for the connection property 'trustManagerConstructorArg'.boolean
getTrustServerCertificate()
Returns a boolean value that indicates if the trustServerCertificate property is enabled.String
getTrustStore()
Returns the path (including file name) to the certificate trustStore file.String
getTrustStoreType()
Returns the keyStore Type for the trustStore.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 usedboolean
getUseFlexibleCallableStatements()
useFlexibleCallableStatements is temporarily removed.boolean
getUseFmtOnly()
Returns the current flag value for useFmtOnly.String
getUser()
Returns the user name that is used to connect the data source.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.void
setAADSecurePrincipalId(String aadSecurePrincipalId)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetUser(String user)
insteadvoid
setAADSecurePrincipalSecret(String aadSecurePrincipalSecret)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetPassword(String password)
insteadvoid
setAccessToken(String accessToken)
Sets the access token.void
setAccessTokenCallback(SQLServerAccessTokenCallback accessTokenCallback)
Sets theSQLServerAccessTokenCallback
delegate.void
setAccessTokenCallbackClass(String accessTokenCallbackClass)
Sets 'accessTokenCallbackClass' to the fully qualified class name of the implementing class forSQLServerAccessTokenCallback
.void
setApplicationIntent(String applicationIntent)
Sets the application intent.void
setApplicationName(String applicationName)
Sets the application name.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
setBulkCopyForBatchInsertAllowEncryptedValueModifications(boolean bulkCopyForBatchInsertAllowEncryptedValueModifications)
Sets whether to allow encrypted value modifications during bulk copy operations created from batch insert operations.void
setBulkCopyForBatchInsertBatchSize(int bulkCopyForBatchInsertBatchSize)
Sets the default batch size for bulk copy operations created from batch insert operations.void
setBulkCopyForBatchInsertCheckConstraints(boolean bulkCopyForBatchInsertCheckConstraints)
Sets whether to check constraints during bulk copy operations created from batch insert operations.void
setBulkCopyForBatchInsertFireTriggers(boolean bulkCopyForBatchInsertFireTriggers)
Sets whether to fire triggers during bulk copy operations created from batch insert operations.void
setBulkCopyForBatchInsertKeepIdentity(boolean bulkCopyForBatchInsertKeepIdentity)
Sets whether to keep identity values during bulk copy operations created from batch insert operations.void
setBulkCopyForBatchInsertKeepNulls(boolean bulkCopyForBatchInsertKeepNulls)
Sets whether to keep null values during bulk copy operations created from batch insert operations.void
setBulkCopyForBatchInsertTableLock(boolean bulkCopyForBatchInsertTableLock)
Sets whether to use table lock during bulk copy operations created from batch insert operations.void
setcacheBulkCopyMetadata(boolean cacheBulkCopyMetadata)
Returns value of 'cacheBulkCopyMetadata' from Connection String.void
setCalcBigDecimalPrecision(boolean calcBigDecimalPrecision)
Returns value of 'calcBigDecimalPrecision' from Connection String.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 value to enable/disable Always Encrypted functionality for the data source object.void
setConnectRetryCount(int connectRetryCount)
Sets the maximum number of attempts to reestablish a broken connection.void
setConnectRetryInterval(int connectRetryInterval)
Sets the interval, in seconds, between attempts to reestablish a broken connection.void
setDatabaseName(String databaseName)
Sets the database name 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 description of the data source.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, for removal: This API element is subject to removal in a future version.UsesetEncrypt(String encryptOption)
insteadvoid
setEncrypt(String encryptOption)
Sets the option whether TLS encryption is used.void
setFailoverPartner(String serverName)
Sets the name of the failover server that is used in a database mirroring configuration.void
setFIPS(boolean fips)
Sets whether Fips Mode should be enabled/disabled on the connection.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
setInstanceName(String instanceName)
Sets the SQL Server instance name.void
setIntegratedSecurity(boolean enable)
Sets a Boolean value that indicates if the integratedSecurity property is enabled.void
setIPAddressPreference(String iPAddressPreference)
Sets the name of the preferred type of IP Address.void
setJAASConfigurationName(String configurationName)
Sets the login configuration name for Kerberos authentication.void
setJASSConfigurationName(String configurationName)
Deprecated, for removal: This API element is subject to removal in a future version.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 an int value that indicates the number of milliseconds to wait before the database reports a lock time out.void
setMaxResultBuffer(String maxResultBuffer)
Sets the value for 'maxResultBuffer' propertyvoid
setMSIClientId(String managedIdentityClientId)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetUser(String user)
instead.void
setMsiTokenCacheTtl(int timeToLive)
Deprecated, for removal: This API element is subject to removal in a future version.void
setMultiSubnetFailover(boolean multiSubnetFailover)
Sets the value of the multiSubnetFailover connection property.void
setPacketSize(int packetSize)
Sets the current network packet size used to communicate with SQL Server, specified in bytes.void
setPassword(String password)
Sets the password that will be used to connect to SQL Server.void
setPortNumber(int portNumber)
Sets the port number to be used to communicate with 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
setRetryConn(String retryConn)
Returns value of 'retryConn' from Connection String.void
setRetryExec(String retryExec)
Returns value of 'retryExec' from Connection String.void
setSelectMethod(String selectMethod)
Sets the default cursor type that is used for all result sets that are created by using this SQLServerDataSource object.void
setSendStringParametersAsUnicode(boolean sendStringParametersAsUnicode)
Sets a boolean value that indicates if sending string parameters to the server in UNICODE format is enabled.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 name of the computer that is running 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 server spn.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
setSSLProtocol(String sslProtocol)
Sets the sslProtocol property for connection Set this value to specify TLS protocol keyword.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 URL that is used to connect to the data source.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 useFlexibleCallableStatements)
useFlexibleCallableStatements is temporarily removed.void
setUseFmtOnly(boolean useFmtOnly)
Specifies the flag to use FMTONLY for parameter metadata queries.void
setUser(String user)
Sets the user name that is used to connect the data source.void
setWorkstationID(String workstationID)
Sets the name of the client computer name that is used to connect to the data source.void
setXopenStates(boolean xopenStates)
Sets whether converting SQL states to XOPEN compliant states is enabled.-
Methods inherited from interface javax.sql.CommonDataSource
createShardingKeyBuilder, getLoginTimeout, getLogWriter, getParentLogger, setLoginTimeout, setLogWriter
-
-
-
-
Method Detail
-
setApplicationIntent
void setApplicationIntent(String applicationIntent)
Sets the application intent.- Parameters:
applicationIntent
- A String that contains the application intent.
-
getApplicationIntent
String getApplicationIntent()
Returns the application intent.- Returns:
- A String that contains the application intent.
-
setApplicationName
void setApplicationName(String applicationName)
Sets the application name.- Parameters:
applicationName
- A String that contains the name of the application.
-
getApplicationName
String getApplicationName()
Returns the application name.- Returns:
- A String that contains the application name, or "Microsoft JDBC Driver for SQL Server" if no value is set.
-
setDatabaseName
void setDatabaseName(String databaseName)
Sets the database name to connect to.- Parameters:
databaseName
- A String that contains the database name.
-
getDatabaseName
String getDatabaseName()
Returns the database name.- Returns:
- A String that contains the database name or null if no value is set.
-
setInstanceName
void setInstanceName(String instanceName)
Sets the SQL Server instance name.- Parameters:
instanceName
- A String that contains the instance name.
-
getInstanceName
String getInstanceName()
Returns the SQL Server instance name.- Returns:
- A String that contains the instance name, or null if no value is set.
-
setIntegratedSecurity
void setIntegratedSecurity(boolean enable)
Sets a Boolean value that indicates if the integratedSecurity property is enabled.- Parameters:
enable
- true if integratedSecurity is enabled. Otherwise, false.
-
setLastUpdateCount
void setLastUpdateCount(boolean lastUpdateCount)
Sets a Boolean value that indicates if the lastUpdateCount property is enabled.- Parameters:
lastUpdateCount
- true if lastUpdateCount is enabled. Otherwise, false.
-
getLastUpdateCount
boolean getLastUpdateCount()
Returns a Boolean value that indicates if the lastUpdateCount property is enabled.- Returns:
- true if lastUpdateCount is enabled. Otherwise, false.
-
setEncrypt
void setEncrypt(String encryptOption)
Sets the option whether TLS encryption is used.- Parameters:
encryptOption
- TLS encrypt option. Default is "true"
-
setEncrypt
@Deprecated(since="10.1.0", forRemoval=true) void setEncrypt(boolean encryptOption)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetEncrypt(String encryptOption)
insteadSets the option whether TLS encryption is used.- Parameters:
encryptOption
- TLS encrypt option. Default is true
-
getEncrypt
String getEncrypt()
Returns the TLS encryption option.- Returns:
- the TLS encrypt option
-
getServerCertificate
String getServerCertificate()
Returns the path to the server certificate.- Returns:
- serverCertificate property value
-
setServerCertificate
void setServerCertificate(String cert)
Sets the connection property 'serverCertificate' on the connection.- Parameters:
cert
- The path to the server certificate.
-
setTransparentNetworkIPResolution
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
- if set to true, the driver attempts to connect to the first IP address available. It is true by default.
-
getTransparentNetworkIPResolution
boolean getTransparentNetworkIPResolution()
Returns the TransparentNetworkIPResolution value.- Returns:
- if enabled, returns true. Otherwise, false.
-
setTrustServerCertificate
void setTrustServerCertificate(boolean e)
Sets a boolean value that indicates if the trustServerCertificate property is enabled.- Parameters:
e
- true, if the server Secure Sockets Layer (SSL) certificate should be automatically trusted when the communication layer is encrypted using SSL. false, if server SLL certificate should not be trusted certificate location, if encrypt=strict
-
getTrustServerCertificate
boolean getTrustServerCertificate()
Returns a boolean value that indicates if the trustServerCertificate property is enabled.- Returns:
- true if trustServerCertificate is enabled. Otherwise, false. If encrypt=strict, returns server certificate location
-
setTrustStoreType
void setTrustStoreType(String trustStoreType)
Sets the keystore type for the trustStore.- Parameters:
trustStoreType
- A String that contains the trust store type
-
getTrustStoreType
String getTrustStoreType()
Returns the keyStore Type for the trustStore.- Returns:
- trustStoreType A String that contains the trust store type
-
setTrustStore
void setTrustStore(String trustStore)
Sets the path (including file name) to the certificate trustStore file.- Parameters:
trustStore
- A String that contains the path (including file name) to the certificate trustStore file.
-
getTrustStore
String getTrustStore()
Returns the path (including file name) to the certificate trustStore file.- Returns:
- trustStore A String that contains the path (including file name) to the certificate trustStore file, or null if no value is set.
-
setTrustStorePassword
void setTrustStorePassword(String trustStorePassword)
Sets the password that is used to check the integrity of the trustStore data.- Parameters:
trustStorePassword
- A String that contains the password that is used to check the integrity of the trustStore data.
-
setHostNameInCertificate
void setHostNameInCertificate(String hostName)
Sets the host name to be used in validating the SQL Server Secure Sockets Layer (SSL) certificate.- Parameters:
hostName
- A String that contains the host name.
-
getHostNameInCertificate
String getHostNameInCertificate()
Returns the host name used in validating the SQL Server Secure Sockets Layer (SSL) certificate.- Returns:
- A String that contains the host name, or null if no value is set.
-
setLockTimeout
void setLockTimeout(int lockTimeout)
Sets an int value that indicates the number of milliseconds to wait before the database reports a lock time out.- Parameters:
lockTimeout
- An int value that contains the number of milliseconds to wait.
-
getLockTimeout
int getLockTimeout()
Returns an int value that indicates the number of milliseconds that the database will wait before reporting a lock time out.- Returns:
- An int value that contains the number of milliseconds that the database will wait.
-
setPassword
void setPassword(String password)
Sets the password that will be used to connect to SQL Server.- Parameters:
password
- A String that contains the password.
-
setPortNumber
void setPortNumber(int portNumber)
Sets the port number to be used to communicate with SQL Server.- Parameters:
portNumber
- An int value that contains the port number.
-
getPortNumber
int getPortNumber()
Returns the current port number that is used to communicate with SQL Server.- Returns:
- An int value that contains the current port number.
-
setSelectMethod
void setSelectMethod(String selectMethod)
Sets the default cursor type that is used for all result sets that are created by using this SQLServerDataSource object.- Parameters:
selectMethod
- A String value that contains the default cursor type.
-
getSelectMethod
String getSelectMethod()
Returns the default cursor type used for all result sets that are created by using this SQLServerDataSource object.- Returns:
- A String value that contains the default cursor type.
-
setResponseBuffering
void setResponseBuffering(String bufferingMode)
Sets the response buffering mode for connections created by using this SQLServerDataSource object.- Parameters:
bufferingMode
- A String that contains the buffering and streaming mode. The valid mode can be one of the following case-insensitive Strings: full or adaptive.
-
getResponseBuffering
String getResponseBuffering()
Returns the response buffering mode for this SQLServerDataSource object.- Returns:
- A String that contains a lower-case full or adaptive.
-
setReplication
void setReplication(boolean replication)
Sets the value to enable/disable the replication connection property.- Parameters:
replication
- A Boolean value. When true, tells the server that the connection is used for replication.
-
getReplication
boolean getReplication()
Returns the value of the replication connection property.- Returns:
- true if the connection is to be used for replication. Otherwise false.
-
setSendTimeAsDatetime
void setSendTimeAsDatetime(boolean sendTimeAsDatetime)
Sets the value to enable/disable the sendTimeAsDatetime connection property.- Parameters:
sendTimeAsDatetime
- A Boolean value. When true, causes java.sql.Time values to be sent to the server as SQL Server datetime types. When false, causes java.sql.Time values to be sent to the server as SQL Server time types.
-
getSendTimeAsDatetime
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.- Returns:
- true if java.sql.Time values will be sent to the server as a SQL Server datetime type. false if java.sql.Time values will be sent to the server as a SQL Server time type.
-
setDatetimeParameterType
void setDatetimeParameterType(String datetimeParameterType)
Sets the SQL server datatype to use for Java datetime and timestamp values.- Parameters:
datetimeParameterType
- The SQL datatype to use when encoding Java dates for SQL Server. Valid values are: datetime, datetime2 or datetimeoffset.
-
getDatetimeParameterType
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.- Returns:
- Returns the value of the datetimeParameterType property.
-
setSendStringParametersAsUnicode
void setSendStringParametersAsUnicode(boolean sendStringParametersAsUnicode)
Sets a boolean value that indicates if sending string parameters to the server in UNICODE format is enabled.- Parameters:
sendStringParametersAsUnicode
- true if string parameters are sent to the server in UNICODE format. Otherwise, false.
-
getSendStringParametersAsUnicode
boolean getSendStringParametersAsUnicode()
Returns whether sending string parameters to the server in UNICODE format is enabled.- Returns:
- true if string parameters are sent to the server in UNICODE format. Otherwise, false.
-
setServerNameAsACE
void setServerNameAsACE(boolean serverNameAsACE)
Sets whether the serverName will be translated from Unicode to ASCII Compatible Encoding (ACE).- Parameters:
serverNameAsACE
- if enabled the servername will be translated to ASCII Compatible Encoding (ACE)
-
getServerNameAsACE
boolean getServerNameAsACE()
Returns if the serverName should be translated from Unicode to ASCII Compatible Encoding (ACE).- Returns:
- if enabled, will return true. Otherwise, false.
-
setServerName
void setServerName(String serverName)
Sets the name of the computer that is running SQL Server.- Parameters:
serverName
- A String that contains the server name.
-
getServerName
String getServerName()
Returns the name of the SQL Server instance.- Returns:
- A String that contains the server name or null if no value is set.
-
setIPAddressPreference
void setIPAddressPreference(String iPAddressPreference)
Sets the name of the preferred type of IP Address.- Parameters:
iPAddressPreference
- A String that contains the preferred type of IP Address.
-
getIPAddressPreference
String getIPAddressPreference()
Gets the name of the preferred type of IP Address.- Returns:
- IPAddressPreference A String that contains the preferred type of IP Address.
-
setFailoverPartner
void setFailoverPartner(String serverName)
Sets the name of the failover server that is used in a database mirroring configuration.- Parameters:
serverName
- A String that contains the failover server name.
-
getFailoverPartner
String getFailoverPartner()
Returns the name of the failover server that is used in a database mirroring configuration.- Returns:
- A String that contains the name of the failover partner, or null if none is set.
-
setMultiSubnetFailover
void setMultiSubnetFailover(boolean multiSubnetFailover)
Sets the value of the multiSubnetFailover connection property.- Parameters:
multiSubnetFailover
- The new value of the multiSubnetFailover connection property.
-
getMultiSubnetFailover
boolean getMultiSubnetFailover()
Returns the value of the multiSubnetFailover connection property.- Returns:
- Returns true or false, depending on the current setting of the connection property.
-
setUser
void setUser(String user)
Sets the user name that is used to connect the data source.- Parameters:
user
- A String that contains the user name.
-
getUser
String getUser()
Returns the user name that is used to connect the data source.- Returns:
- A String that contains the user name.
-
setWorkstationID
void setWorkstationID(String workstationID)
Sets the name of the client computer name that is used to connect to the data source.- Parameters:
workstationID
- A String that contains the client computer name.
-
getWorkstationID
String getWorkstationID()
Returns the name of the client computer name that is used to connect to the data source.- Returns:
- A String that contains the client computer name.
-
setXopenStates
void setXopenStates(boolean xopenStates)
Sets whether converting SQL states to XOPEN compliant states is enabled.- Parameters:
xopenStates
- true if converting SQL states to XOPEN compliant states is enabled. Otherwise, false.
-
getXopenStates
boolean getXopenStates()
Returns the value that indicates if converting SQL states to XOPEN compliant states is enabled.- Returns:
- true if converting SQL states to XOPEN compliant states is enabled. Otherwise, false.
-
setURL
void setURL(String url)
Sets the URL that is used to connect to the data source.- Parameters:
url
- A String that contains the URL.
-
getURL
String getURL()
Returns the URL that is used to connect to the data source.- Returns:
- A String that contains the URL.
-
setDescription
void setDescription(String description)
Sets the description of the data source.- Parameters:
description
- A String that contains the description.
-
getDescription
String getDescription()
Returns a description of the data source.- Returns:
- A String that contains the data source description or null if no value is set.
-
setPacketSize
void setPacketSize(int packetSize)
Sets the current network packet size used to communicate with SQL Server, specified in bytes.- Parameters:
packetSize
- An int value containing the network packet size.
-
getPacketSize
int getPacketSize()
Returns the current network packet size used to communicate with SQL Server, specified in bytes.- Returns:
- An int value containing the current network packet size.
-
setAuthenticationScheme
void setAuthenticationScheme(String authenticationScheme)
Sets the kind of integrated security you want your application to use.- Parameters:
authenticationScheme
- Values are "JavaKerberos" and the default "NativeAuthentication".
-
setAuthentication
void setAuthentication(String authentication)
Sets the authentication mode.- Parameters:
authentication
- the authentication mode
-
getAuthentication
String getAuthentication()
Returns the authentication mode.- Returns:
- the authentication value
-
setRealm
void setRealm(String realm)
Sets the realm for Kerberos authentication.- Parameters:
realm
- A String that contains the realm
-
getRealm
String getRealm()
Returns the realm for Kerberos authentication.- Returns:
- A String that contains the realm
-
setServerSpn
void setServerSpn(String serverSpn)
Sets the server spn.- Parameters:
serverSpn
- A String that contains the server spn
-
getServerSpn
String getServerSpn()
Returns the server spn.- Returns:
- A String that contains the server spn
-
setUseDefaultGSSCredential
void setUseDefaultGSSCredential(boolean enable)
Sets the value to indicate whether useDefaultGSSCredential is enabled.- Parameters:
enable
- true if useDefaultGSSCredential is enabled. Otherwise, false.
-
getUseDefaultGSSCredential
boolean getUseDefaultGSSCredential()
Returns the useDefaultGSSCredential.- Returns:
- if enabled, return true. Otherwise, false.
-
setGSSCredentials
void setGSSCredentials(GSSCredential userCredential)
Sets the GSSCredential.- Parameters:
userCredential
- the credential
-
getGSSCredentials
GSSCredential getGSSCredentials()
Returns the GSSCredential.- Returns:
- GSSCredential
-
setAccessToken
void setAccessToken(String accessToken)
Sets the access token.- Parameters:
accessToken
- to be set in the string property.
-
getAccessToken
String getAccessToken()
Returns the access token.- Returns:
- the access token.
-
setColumnEncryptionSetting
void setColumnEncryptionSetting(String columnEncryptionSetting)
Sets the value to enable/disable Always Encrypted functionality for the data source object. The default is Disabled.- Parameters:
columnEncryptionSetting
- Enables/disables Always Encrypted functionality for the data source object. The default is Disabled.
-
getColumnEncryptionSetting
String getColumnEncryptionSetting()
Returns the Always Encrypted functionality setting for the data source object.- Returns:
- the Always Encrypted functionality setting for the data source object.
-
setKeyStoreAuthentication
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
- the name that identifies a key store.
-
getKeyStoreAuthentication
String getKeyStoreAuthentication()
Returns the value of the keyStoreAuthentication setting for the data source object.- Returns:
- the value of the keyStoreAuthentication setting for the data source object.
-
setKeyStoreSecret
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
- the password to use for the keystore as well as for the key
-
setKeyStoreLocation
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
- the location including the file name for the Java keystore.
-
getKeyStoreLocation
String getKeyStoreLocation()
Returns the keyStoreLocation for the Java Key Store.- Returns:
- the keyStoreLocation for the Java Key Store.
-
setQueryTimeout
void setQueryTimeout(int queryTimeout)
Setting the query timeout.- Parameters:
queryTimeout
- The number of seconds to wait before a timeout has occurred on a query. The default value is 0, which means infinite timeout.
-
getQueryTimeout
int getQueryTimeout()
Returns the query timeout.- Returns:
- The number of seconds to wait before a timeout has occurred on a query.
-
setCancelQueryTimeout
void setCancelQueryTimeout(int cancelQueryTimeout)
Sets the cancel timeout.- Parameters:
cancelQueryTimeout
- The number of seconds to wait before we wait for the query timeout to happen.
-
getCancelQueryTimeout
int getCancelQueryTimeout()
Returns the cancel timeout.- Returns:
- the number of seconds to wait before we wait for the query timeout to happen.
-
setEnablePrepareOnFirstPreparedStatementCall
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
- Changes the setting per the description.
-
getEnablePrepareOnFirstPreparedStatementCall
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.- Returns:
- Returns the current setting per the description.
-
setServerPreparedStatementDiscardThreshold
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
- Changes the setting per the description.
-
getServerPreparedStatementDiscardThreshold
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.- Returns:
- Returns the current setting per the description.
-
setStatementPoolingCacheSize
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
- Changes the setting per the description.
-
getStatementPoolingCacheSize
int getStatementPoolingCacheSize()
Returns the size of the prepared statement cache for this connection. A value less than 1 means no cache.- Returns:
- Returns the current setting per the description.
-
setDisableStatementPooling
void setDisableStatementPooling(boolean disableStatementPooling)
Sets the value to disable/enable statement pooling.- Parameters:
disableStatementPooling
- true to disable statement pooling, false to enable it.
-
getDisableStatementPooling
boolean getDisableStatementPooling()
Returns whether statement pooling is disabled.- Returns:
- true if statement pooling is disabled, false if it is enabled.
-
setSocketTimeout
void setSocketTimeout(int socketTimeout)
Sets the socket timeout value.- Parameters:
socketTimeout
- The number of milliseconds to wait before a timeout is occurred on a socket read or accept. The default value is 0, which means infinite timeout.
-
getSocketTimeout
int getSocketTimeout()
Returns the socket timeout value.- Returns:
- The number of milliseconds to wait before a timeout is occurred on a socket read or accept.
-
setJASSConfigurationName
@Deprecated(since="9.3.0", forRemoval=true) void setJASSConfigurationName(String configurationName)
Deprecated, for removal: This API element is subject to removal in a future version.Sets the login configuration name for Kerberos authentication. This overrides the default configuration SQLJDBCDriver- Parameters:
configurationName
- the configuration name
-
getJASSConfigurationName
@Deprecated(since="9.3.0", forRemoval=true) String getJASSConfigurationName()
Deprecated, for removal: This API element is subject to removal in a future version.UsegetJAASConfigurationName()
insteadReturns the login configuration name for Kerberos authentication.- Returns:
- login configuration file name
-
setJAASConfigurationName
void setJAASConfigurationName(String configurationName)
Sets the login configuration name for Kerberos authentication. This overrides the default configuration SQLJDBCDriver- Parameters:
configurationName
- the configuration name
-
getJAASConfigurationName
String getJAASConfigurationName()
Returns the login configuration name for Kerberos authentication.- Returns:
- login configuration name
-
getUseDefaultJaasConfig
boolean getUseDefaultJaasConfig()
Returns whether the default JAAS Configuration should be used- Returns:
- useDefaultJaasConfig boolean value
-
setUseDefaultJaasConfig
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
- boolean property to use the default JAAS configuration
-
setFIPS
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
- Boolean property to enable/disable fips
-
getFIPS
boolean getFIPS()
Returns the value of connection property "fips". For FIPS enabled JVM this property should be true.- Returns:
- fips boolean value
-
setSSLProtocol
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
- Value for SSL Protocol to be set.
-
getSSLProtocol
String getSSLProtocol()
Returns the value of connection property 'sslProtocol'.- Returns:
- sslProtocol property value
-
getSocketFactoryClass
String getSocketFactoryClass()
Returns the value for the connection property 'socketFactoryClass'.- Returns:
- socketFactoryClass property value
-
setSocketFactoryClass
void setSocketFactoryClass(String socketFactoryClass)
Sets the connection property 'socketFactoryClass' on the connection.- Parameters:
socketFactoryClass
- The fully qualified class name of a custom javax.net.SocketFactory.
-
getSocketFactoryConstructorArg
String getSocketFactoryConstructorArg()
Returns the value for the connection property 'socketFactoryConstructorArg'.- Returns:
- socketFactoryConstructorArg property value
-
setSocketFactoryConstructorArg
void setSocketFactoryConstructorArg(String socketFactoryConstructorArg)
Sets Constructor Arguments to be provided on constructor of 'socketFactoryClass'.- Parameters:
socketFactoryConstructorArg
- 'socketFactoryClass' constructor arguments
-
setTrustManagerClass
void setTrustManagerClass(String trustManagerClass)
Sets the connection property 'trustManagerClass' on the connection.- Parameters:
trustManagerClass
- The fully qualified class name of a custom javax.net.ssl.TrustManager.
-
getTrustManagerClass
String getTrustManagerClass()
Returns the value for the connection property 'trustManagerClass'.- Returns:
- trustManagerClass property value
-
setTrustManagerConstructorArg
void setTrustManagerConstructorArg(String trustManagerConstructorArg)
Sets Constructor Arguments to be provided on constructor of 'trustManagerClass'.- Parameters:
trustManagerConstructorArg
- 'trustManagerClass' constructor arguments
-
getTrustManagerConstructorArg
String getTrustManagerConstructorArg()
Returns the value for the connection property 'trustManagerConstructorArg'.- Returns:
- trustManagerConstructorArg property value
-
getUseBulkCopyForBatchInsert
boolean getUseBulkCopyForBatchInsert()
Returns whether the use Bulk Copy API is used for Batch Insert.- Returns:
- whether the driver should use Bulk Copy API for Batch Insert operations.
-
setUseBulkCopyForBatchInsert
void setUseBulkCopyForBatchInsert(boolean useBulkCopyForBatchInsert)
Sets whether the use Bulk Copy API should be used for Batch Insert.- Parameters:
useBulkCopyForBatchInsert
- indicates whether Bulk Copy API should be used for Batch Insert operations.
-
setBulkCopyForBatchInsertBatchSize
void setBulkCopyForBatchInsertBatchSize(int bulkCopyForBatchInsertBatchSize)
Sets the default batch size for bulk copy operations created from batch insert operations.- Parameters:
bulkCopyForBatchInsertBatchSize
- the default batch size for bulk copy operations created from batch insert operations.
-
getBulkCopyForBatchInsertBatchSize
int getBulkCopyForBatchInsertBatchSize()
Returns the default batch size for bulk copy operations created from batch insert operations.- Returns:
- the default batch size for bulk copy operations created from batch insert operations.
-
setBulkCopyForBatchInsertCheckConstraints
void setBulkCopyForBatchInsertCheckConstraints(boolean bulkCopyForBatchInsertCheckConstraints)
Sets whether to check constraints during bulk copy operations created from batch insert operations.- Parameters:
bulkCopyForBatchInsertCheckConstraints
- indicates whether to check constraints during bulk copy operations created from batch insert operations.
-
getBulkCopyForBatchInsertCheckConstraints
boolean getBulkCopyForBatchInsertCheckConstraints()
Returns whether to check constraints during bulk copy operations created from batch insert operations.- Returns:
- whether to check constraints during bulk copy operations created from batch insert operations.
-
setBulkCopyForBatchInsertFireTriggers
void setBulkCopyForBatchInsertFireTriggers(boolean bulkCopyForBatchInsertFireTriggers)
Sets whether to fire triggers during bulk copy operations created from batch insert operations.- Parameters:
bulkCopyForBatchInsertFireTriggers
- indicates whether to fire triggers during bulk copy operations created from batch insert operations.
-
getBulkCopyForBatchInsertFireTriggers
boolean getBulkCopyForBatchInsertFireTriggers()
Returns whether to fire triggers during bulk copy operations created from batch insert operations.- Returns:
- whether to fire triggers during bulk copy operations created from batch insert operations.
-
setBulkCopyForBatchInsertKeepIdentity
void setBulkCopyForBatchInsertKeepIdentity(boolean bulkCopyForBatchInsertKeepIdentity)
Sets whether to keep identity values during bulk copy operations created from batch insert operations.- Parameters:
bulkCopyForBatchInsertKeepIdentity
- indicates whether to keep identity values during bulk copy operations created from batch insert operations.
-
getBulkCopyForBatchInsertKeepIdentity
boolean getBulkCopyForBatchInsertKeepIdentity()
Returns whether to keep identity values during bulk copy operations created from batch insert operations.- Returns:
- whether to keep identity values during bulk copy operations created from batch insert operations.
-
setBulkCopyForBatchInsertKeepNulls
void setBulkCopyForBatchInsertKeepNulls(boolean bulkCopyForBatchInsertKeepNulls)
Sets whether to keep null values during bulk copy operations created from batch insert operations.- Parameters:
bulkCopyForBatchInsertKeepNulls
- indicates whether to keep null values during bulk copy operations created from batch insert operations.
-
getBulkCopyForBatchInsertKeepNulls
boolean getBulkCopyForBatchInsertKeepNulls()
Returns whether to keep null values during bulk copy operations created from batch insert operations.- Returns:
- whether to keep null values during bulk copy operations created from batch insert operations.
-
setBulkCopyForBatchInsertTableLock
void setBulkCopyForBatchInsertTableLock(boolean bulkCopyForBatchInsertTableLock)
Sets whether to use table lock during bulk copy operations created from batch insert operations.- Parameters:
bulkCopyForBatchInsertTableLock
- indicates whether to use table lock during bulk copy operations created from batch insert operations.
-
getBulkCopyForBatchInsertTableLock
boolean getBulkCopyForBatchInsertTableLock()
Returns whether to use table lock during bulk copy operations created from batch insert operations.- Returns:
- whether to use table lock during bulk copy operations created from batch insert operations.
-
setBulkCopyForBatchInsertAllowEncryptedValueModifications
void setBulkCopyForBatchInsertAllowEncryptedValueModifications(boolean bulkCopyForBatchInsertAllowEncryptedValueModifications)
Sets whether to allow encrypted value modifications during bulk copy operations created from batch insert operations.- Parameters:
bulkCopyForBatchInsertAllowEncryptedValueModifications
- indicates whether to allow encrypted value modifications during bulk copy operations created from batch insert operations.
-
getBulkCopyForBatchInsertAllowEncryptedValueModifications
boolean getBulkCopyForBatchInsertAllowEncryptedValueModifications()
Returns whether to allow encrypted value modifications during bulk copy operations created from batch insert operations.- Returns:
- whether to allow encrypted value modifications during bulk copy operations created from batch insert operations.
-
setMSIClientId
@Deprecated(since="12.1.0", forRemoval=true) void setMSIClientId(String managedIdentityClientId)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetUser(String user)
instead.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.
-
getMSIClientId
@Deprecated(since="12.1.0", forRemoval=true) String getMSIClientId()
Deprecated, for removal: This API element is subject to removal in a future version.UsegetUser()
instead.Returns the value for the connection property 'msiClientId'.- Returns:
- msiClientId property value
-
setKeyStorePrincipalId
void setKeyStorePrincipalId(String keyStorePrincipalId)
Sets the value for the connection property 'keyStorePrincipalId'.- Parameters:
keyStorePrincipalId
-When keyStoreAuthentication = keyVaultClientSecret, set this value to a valid Azure Active Directory Application Client ID. When keyStoreAuthentication = keyVaultManagedIdentity, set this value to a valid Azure Active Directory Application Object ID (optional, for user-assigned only).
-
getKeyStorePrincipalId
String getKeyStorePrincipalId()
Returns the value for the connection property 'keyStorePrincipalId'.- Returns:
- keyStorePrincipalId
-
setKeyVaultProviderClientId
void setKeyVaultProviderClientId(String keyVaultProviderClientId)
Sets the Azure Key Vault (AKV) Provider Client Id to provided value to be used for column encryption.- Parameters:
keyVaultProviderClientId
- Client Id of Azure Key Vault (AKV) Provider to be used for column encryption.
-
getKeyVaultProviderClientId
String getKeyVaultProviderClientId()
Returns the value for the connection property 'keyVaultProviderClientId'.- Returns:
- keyVaultProviderClientId
-
setKeyVaultProviderClientKey
void setKeyVaultProviderClientKey(String keyVaultProviderClientKey)
Sets the Azure Key Vault (AKV) Provider Client Key to provided value to be used for column encryption.- Parameters:
keyVaultProviderClientKey
- Client Key of Azure Key Vault (AKV) Provider to be used for column encryption.
-
getDomain
String getDomain()
Returns the value for the connection property 'domain'.- Returns:
- 'domain' property value
-
setDomain
void setDomain(String domain)
Sets the 'domain' connection property used for NTLM Authentication.- Parameters:
domain
- Windows domain name
-
getUseFmtOnly
boolean getUseFmtOnly()
Returns the current flag value for useFmtOnly.- Returns:
- 'useFmtOnly' property value.
-
setUseFmtOnly
void setUseFmtOnly(boolean useFmtOnly)
Specifies the flag to use FMTONLY for parameter metadata queries.- Parameters:
useFmtOnly
- boolean value for 'useFmtOnly'.
-
getEnclaveAttestationUrl
String getEnclaveAttestationUrl()
Returns the enclave attestation URL used in Always Encrypted with Secure Enclaves.- Returns:
- enclave attestation URL.
-
setEnclaveAttestationUrl
void setEnclaveAttestationUrl(String url)
Sets the enclave attestation URL used in Always Encrypted with Secure Enclaves.- Parameters:
url
- Enclave attestation URL.
-
getEnclaveAttestationProtocol
String getEnclaveAttestationProtocol()
Returns the enclave attestation protocol used in Always Encrypted with Secure Enclaves.- Returns:
- Enclave attestation protocol.
-
setEnclaveAttestationProtocol
void setEnclaveAttestationProtocol(String protocol)
Sets the enclave attestation protocol to be used in Always Encrypted with Secure Enclaves.- Parameters:
protocol
- Enclave attestation protocol.
-
getClientCertificate
String getClientCertificate()
Returns client certificate path for client certificate authentication.- Returns:
- Client certificate path.
-
setClientCertificate
void setClientCertificate(String certPath)
Sets client certificate path for client certificate authentication.- Parameters:
certPath
- Client certificate path.
-
getClientKey
String getClientKey()
Returns Private key file path for client certificate authentication.- Returns:
- Private key file path.
-
setClientKey
void setClientKey(String keyPath)
Sets Private key file path for client certificate authentication.- Parameters:
keyPath
- Private key file path.
-
setClientKeyPassword
void setClientKeyPassword(String password)
Sets the password to be used for Private key provided by the user for client certificate authentication.- Parameters:
password
- Private key password.
-
setDelayLoadingLobs
void setDelayLoadingLobs(boolean delayLoadingLobs)
Specifies the flag to load LOBs instead of streaming them.- Parameters:
delayLoadingLobs
- boolean value for 'delayLoadingLobs'.
-
getDelayLoadingLobs
boolean getDelayLoadingLobs()
Returns the current flag value for delayLoadingLobs.- Returns:
- 'delayLoadingLobs' property value.
-
getSendTemporalDataTypesAsStringForBulkCopy
boolean getSendTemporalDataTypesAsStringForBulkCopy()
Returns the current flag for value sendTemporalDataTypesAsStringForBulkCopy- Returns:
- 'sendTemporalDataTypesAsStringForBulkCopy' property value.
-
setSendTemporalDataTypesAsStringForBulkCopy
void setSendTemporalDataTypesAsStringForBulkCopy(boolean sendTemporalDataTypesAsStringForBulkCopy)
Specifies the flag to send temporal datatypes as String for Bulk Copy.- Parameters:
sendTemporalDataTypesAsStringForBulkCopy
- boolean value for 'sendTemporalDataTypesAsStringForBulkCopy'.
-
getAADSecurePrincipalId
@Deprecated(since="9.4.1", forRemoval=true) String getAADSecurePrincipalId()
Deprecated, for removal: This API element is subject to removal in a future version.UsegetUser()
insteadReturns the value for the connection property 'AADSecurePrincipalId'.- Returns:
- 'AADSecurePrincipalId' property value.
-
setAADSecurePrincipalId
@Deprecated(since="9.4.1", forRemoval=true) void setAADSecurePrincipalId(String aadSecurePrincipalId)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetUser(String user)
insteadSets the 'AADSecurePrincipalId' connection property used for Active Directory Service Principal authentication.- Parameters:
aadSecurePrincipalId
- Active Directory Service Principal Id.
-
setAADSecurePrincipalSecret
@Deprecated(since="9.4.1", forRemoval=true) void setAADSecurePrincipalSecret(String aadSecurePrincipalSecret)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetPassword(String password)
insteadSets the 'AADSecurePrincipalSecret' connection property used for Active Directory Service Principal authentication.- Parameters:
aadSecurePrincipalSecret
- Active Directory Service Principal secret.
-
getMaxResultBuffer
String getMaxResultBuffer()
Returns value of 'maxResultBuffer' from Connection String.- Returns:
- 'maxResultBuffer' property.
-
setMaxResultBuffer
void setMaxResultBuffer(String maxResultBuffer)
Sets the value for 'maxResultBuffer' property- Parameters:
maxResultBuffer
- String value for 'maxResultBuffer'
-
setConnectRetryCount
void setConnectRetryCount(int connectRetryCount)
Sets the maximum number of attempts to reestablish a broken connection.- Parameters:
connectRetryCount
- maximum number of attempts
-
getConnectRetryCount
int getConnectRetryCount()
Returns the maximum number of attempts set to reestablish a broken connection.- Returns:
- maximum number of attempts
-
setConnectRetryInterval
void setConnectRetryInterval(int connectRetryInterval)
Sets the interval, in seconds, between attempts to reestablish a broken connection.- Parameters:
connectRetryInterval
- interval in seconds
-
getConnectRetryInterval
int getConnectRetryInterval()
Returns the interval set, in seconds, between attempts to reestablish a broken connection.- Returns:
- interval in seconds
-
setPrepareMethod
void setPrepareMethod(String prepareMethod)
Sets the behavior for the prepare method.PrepareMethod
- Parameters:
prepareMethod
- Changes the setting as per description
-
getPrepareMethod
String getPrepareMethod()
Returns the value indicating the prepare method.PrepareMethod
- Returns:
- prepare method
-
setMsiTokenCacheTtl
@Deprecated(since="12.1.0", forRemoval=true) void setMsiTokenCacheTtl(int timeToLive)
Deprecated, for removal: This API element is subject to removal in a future version.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
- Time-to-live is no longer supported.
-
getMsiTokenCacheTtl
@Deprecated(since="12.1.0", forRemoval=true) int getMsiTokenCacheTtl()
Deprecated, for removal: This API element is subject to removal in a future version.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.- Returns:
- Method will always return 0.
-
setAccessTokenCallback
void setAccessTokenCallback(SQLServerAccessTokenCallback accessTokenCallback)
Sets theSQLServerAccessTokenCallback
delegate.- Parameters:
accessTokenCallback
- Access token callback delegate.
-
getAccessTokenCallback
SQLServerAccessTokenCallback getAccessTokenCallback()
Returns aSQLServerAccessTokenCallback
, the access token callback delegate.- Returns:
- Access token callback delegate.
-
getAccessTokenCallbackClass
String getAccessTokenCallbackClass()
Returns the fully qualified class name of the implementing class forSQLServerAccessTokenCallback
.- Returns:
- accessTokenCallbackClass
-
setAccessTokenCallbackClass
void setAccessTokenCallbackClass(String accessTokenCallbackClass)
Sets 'accessTokenCallbackClass' to the fully qualified class name of the implementing class forSQLServerAccessTokenCallback
.- Parameters:
accessTokenCallbackClass
- access token callback class
-
setCalcBigDecimalPrecision
void setCalcBigDecimalPrecision(boolean calcBigDecimalPrecision)
Returns value of 'calcBigDecimalPrecision' from Connection String.- Parameters:
calcBigDecimalPrecision
- indicates whether the driver should attempt to calculate precision from inputted big decimal values
-
getCalcBigDecimalPrecision
boolean getCalcBigDecimalPrecision()
Sets the value for 'calcBigDecimalPrecision' property- Returns:
- calcBigDecimalPrecision boolean value
-
setcacheBulkCopyMetadata
void setcacheBulkCopyMetadata(boolean cacheBulkCopyMetadata)
Returns value of 'cacheBulkCopyMetadata' from Connection String.- Parameters:
cacheBulkCopyMetadata
- indicates whether the driver should use connection level caching of metadata for bulk copy
-
getcacheBulkCopyMetadata
boolean getcacheBulkCopyMetadata()
Sets the value for 'cacheBulkCopyMetadata' property- Returns:
- cacheBulkCopyMetadata boolean value
-
setRetryExec
void setRetryExec(String retryExec)
Returns value of 'retryExec' from Connection String.- Parameters:
retryExec
- Set of rules used for statement (execution) retry
-
getRetryExec
String getRetryExec()
Sets the value for 'retryExec' property- Returns:
- retryExec String value
-
setRetryConn
void setRetryConn(String retryConn)
Returns value of 'retryConn' from Connection String.- Parameters:
retryConn
- Set of rules used for connection retry
-
getRetryConn
String getRetryConn()
Sets the value for 'retryConn' property- Returns:
- retryConn String value
-
setUseFlexibleCallableStatements
void setUseFlexibleCallableStatements(boolean useFlexibleCallableStatements)
useFlexibleCallableStatements is temporarily removed. This is meant as a no-op. Sets whether or not sp_sproc_columns will be used for parameter name lookup.- Parameters:
useFlexibleCallableStatements
- When set to false, sp_sproc_columns is not used for parameter name lookup in callable statements. This eliminates a round trip to the server but imposes limitations on how parameters are set. When set to false, applications must either reference parameters by name or by index, not both. Parameters must also be set in the same order as the stored procedure definition.
-
getUseFlexibleCallableStatements
boolean getUseFlexibleCallableStatements()
useFlexibleCallableStatements is temporarily removed. This is meant as a no-op. Returns whether or not sp_sproc_columns is being used for parameter name lookup.- Returns:
- useFlexibleCallableStatements
-
-