Package com.microsoft.sqlserver.jdbc
Class SQLServerDataSource
- java.lang.Object
-
- com.microsoft.sqlserver.jdbc.SQLServerDataSource
-
- All Implemented Interfaces:
ISQLServerDataSource,Serializable,Wrapper,Referenceable,CommonDataSource,DataSource
- Direct Known Subclasses:
SQLServerConnectionPoolDataSource
public class SQLServerDataSource extends Object implements ISQLServerDataSource, DataSource, Serializable, Referenceable
Contains a list of properties specific for theSQLServerConnectionclass.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SQLServerDataSource()Constructs a SQLServerDataSource.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAccessToken()Returns the access token.StringgetApplicationIntent()Returns the application intent.StringgetApplicationName()Returns the application name.StringgetAuthentication()Returns the authentication mode.intgetCancelQueryTimeout()Returns the cancel timeout.StringgetClientCertificate()Returns client certificate path for client certificate authentication.StringgetClientKey()Returns Private key file path for client certificate authentication.StringgetColumnEncryptionSetting()Returns the Always Encrypted functionality setting for the data source object.ConnectiongetConnection()ConnectiongetConnection(String username, String password)StringgetDatabaseName()Returns the database name.booleangetDelayLoadingLobs()Returns the current flag value for delayLoadingLobs.StringgetDescription()Returns the DataSource descriptionbooleangetDisableStatementPooling()Returns whether statement pooling is disabled.StringgetDomain()Returns the value for the connection property 'domain'.booleangetEnablePrepareOnFirstPreparedStatementCall()Returns the value that indicates whether the first execution of a prepared statement will call sp_executesql and not prepare a statement.StringgetEnclaveAttestationProtocol()Returns the enclave attestation protocol used in Always Encrypted with Secure Enclaves.StringgetEnclaveAttestationUrl()Returns the enclave attestation URL used in Always Encrypted with Secure Enclaves.booleangetEncrypt()Returns a Boolean value that indicates if the encrypt property is enabled.StringgetFailoverPartner()Returns the name of the failover server that is used in a database mirroring configuration.booleangetFIPS()Returns the value of connection property "fips".GSSCredentialgetGSSCredentials()Returns the GSSCredential.StringgetHostNameInCertificate()Returns the host name used in validating the SQL Server Secure Sockets Layer (SSL) certificate.StringgetInstanceName()Returns the SQL Server instance name.StringgetJASSConfigurationName()Returns the login configuration file for Kerberos authentication.StringgetKeyStoreAuthentication()Returns the value of the keyStoreAuthentication setting for the data source object.StringgetKeyStoreLocation()Returns the keyStoreLocation for the Java Key Store.StringgetKeyStorePrincipalId()Returns the value for the connection property 'keyStorePrincipalId'.StringgetKeyVaultProviderClientId()Returns the value for the connection property 'keyVaultProviderClientId'.booleangetLastUpdateCount()Returns a Boolean value that indicates if the lastUpdateCount property is enabled.intgetLockTimeout()Returns an int value that indicates the number of milliseconds that the database will wait before reporting a lock time out.intgetLoginTimeout()PrintWritergetLogWriter()Returns the log writer for this DataSource.StringgetMSIClientId()Returns the value for the connection property 'msiClientId'.booleangetMultiSubnetFailover()Returns the value of the multiSubnetFailover connection property.intgetPacketSize()Returns the current network packet size used to communicate with SQL Server, specified in bytes.LoggergetParentLogger()intgetPortNumber()Returns the current port number that is used to communicate with SQL Server.intgetQueryTimeout()Returns the query timeout.ReferencegetReference()StringgetResponseBuffering()Returns the response buffering mode for this SQLServerDataSource object.StringgetSelectMethod()Returns the default cursor type used for all result sets that are created by using this SQLServerDataSource object.booleangetSendStringParametersAsUnicode()Returns whether sending string parameters to the server in UNICODE format is enabled.booleangetSendTemporalDataTypesAsStringForBulkCopy()booleangetSendTimeAsDatetime()Returns the value of the sendTimeAsDatetime connection property.StringgetServerName()Returns the name of the SQL Server instance.booleangetServerNameAsACE()Returns if the serverName should be translated from Unicode to ASCII Compatible Encoding (ACE).intgetServerPreparedStatementDiscardThreshold()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.StringgetServerSpn()Returns the server spn.StringgetSocketFactoryClass()Returns the value for the connection property 'socketFactoryClass'.StringgetSocketFactoryConstructorArg()Returns the value for the connection property 'socketFactoryConstructorArg'.intgetSocketTimeout()Returns the socket timeout value.StringgetSSLProtocol()Returns the value of connection property 'sslProtocol'.intgetStatementPoolingCacheSize()Returns the size of the prepared statement cache for this connection.booleangetTransparentNetworkIPResolution()Returns the TransparentNetworkIPResolution value.StringgetTrustManagerClass()Returns the value for the connection property 'trustManagerClass'.StringgetTrustManagerConstructorArg()Returns the value for the connection property 'trustManagerConstructorArg'.booleangetTrustServerCertificate()Returns a Boolean value that indicates if the trustServerCertificate property is enabled.StringgetTrustStore()Returns the path (including file name) to the certificate trustStore file.StringgetTrustStoreType()Returns the keyStore Type for the trustStore.StringgetURL()Returns the URL that is used to connect to the data source.booleangetUseBulkCopyForBatchInsert()Returns whether the use Bulk Copy API is used for Batch Insert.booleangetUseFmtOnly()Returns the current flag value for useFmtOnly.StringgetUser()Returns the user name that is used to connect the data source.StringgetWorkstationID()Returns the name of the client computer name that is used to connect to the data source.booleangetXopenStates()Returns the value that indicates if converting SQL states to XOPEN compliant states is enabled.booleanisWrapperFor(Class<?> iface)voidsetAccessToken(String accessToken)Sets the access token.voidsetApplicationIntent(String applicationIntent)Sets the application intent.voidsetApplicationName(String applicationName)Sets the specific application in various SQL Server profiling and logging tools.voidsetAuthentication(String authentication)Sets the authentication mode.voidsetAuthenticationScheme(String authenticationScheme)Sets the kind of integrated security you want your application to use.voidsetCancelQueryTimeout(int cancelQueryTimeout)Sets the cancel timeout.voidsetClientCertificate(String certPath)Sets client certificate path for client certificate authentication.voidsetClientKey(String keyPath)Sets Private key file path for client certificate authentication.voidsetClientKeyPassword(String password)Sets the password to be used for Private key provided by the user for client certificate authentication.voidsetColumnEncryptionSetting(String columnEncryptionSetting)Sets the Column Encryption setting.voidsetDatabaseName(String databaseName)Sets the the database to connect to.voidsetDelayLoadingLobs(boolean delayLoadingLobs)Specifies the flag to load LOBs instead of streaming them.voidsetDescription(String description)Sets the DataSource description.voidsetDisableStatementPooling(boolean disableStatementPooling)Sets the value to disable/enable statement pooling.voidsetDomain(String domain)Sets the 'domain' connection property used for NTLM Authentication.voidsetEnablePrepareOnFirstPreparedStatementCall(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.voidsetEnclaveAttestationProtocol(String protocol)Sets the enclave attestation protocol to be used in Always Encrypted with Secure Enclaves.voidsetEnclaveAttestationUrl(String url)Sets the enclave attestation URL used in Always Encrypted with Secure Enclaves.voidsetEncrypt(boolean encrypt)Sets a Boolean value that indicates if the encrypt property is enabled.voidsetFailoverPartner(String serverName)Sets the fail over partner of the target SQL Server.voidsetFIPS(boolean fips)Sets whether Fips Mode should be enabled/disabled on the connection.voidsetGSSCredentials(GSSCredential userCredential)Sets the GSSCredential.voidsetHostNameInCertificate(String hostName)Sets the host name to be used in validating the SQL Server Secure Sockets Layer (SSL) certificate.voidsetInstanceName(String instanceName)Sets the the SQL Server instance name to connect to.voidsetIntegratedSecurity(boolean enable)Sets a Boolean value that indicates if the integratedSecurity property is enabled.voidsetJASSConfigurationName(String configurationName)Sets the login configuration file for Kerberos authentication.voidsetKeyStoreAuthentication(String keyStoreAuthentication)Sets the name that identifies a key store.voidsetKeyStoreLocation(String keyStoreLocation)Sets the location including the file name for the Java keystore.voidsetKeyStorePrincipalId(String keyStorePrincipalId)Sets the value for the connection property 'keyStorePrincipalId'.voidsetKeyStoreSecret(String keyStoreSecret)Sets the password for the Java keystore.voidsetKeyVaultProviderClientId(String keyVaultProviderClientId)Sets the Azure Key Vault (AKV) Provider Client Id to provided value to be used for column encryption.voidsetKeyVaultProviderClientKey(String keyVaultProviderClientKey)Sets the Azure Key Vault (AKV) Provider Client Key to provided value to be used for column encryption.voidsetLastUpdateCount(boolean lastUpdateCount)Sets a Boolean value that indicates if the lastUpdateCount property is enabled.voidsetLockTimeout(int lockTimeout)Sets the lock timeout value.voidsetLoginTimeout(int loginTimeout)Sets the maximum time in seconds that this data source will wait while attempting to connect to a database.voidsetLogWriter(PrintWriter out)voidsetMSIClientId(String msiClientId)Sets the client id to be used to retrieve access token from MSI EndPoint.voidsetMultiSubnetFailover(boolean multiSubnetFailover)Sets the value of the multiSubnetFailover connection property.voidsetPacketSize(int packetSize)Sets the packet size.voidsetPassword(String password)Sets the password that will be used when connecting to SQL Server.voidsetPortNumber(int portNumber)Sets the TCP-IP port number used when opening a socket connection to SQL Server.voidsetQueryTimeout(int queryTimeout)Setting the query timeout.voidsetResponseBuffering(String bufferingMode)Sets the response buffering mode for connections created by using this SQLServerDataSource object.voidsetSelectMethod(String selectMethod)Sets the default cursor type used for the result set.voidsetSendStringParametersAsUnicode(boolean sendStringParametersAsUnicode)Sets whether string parameters are sent to the server in UNICODE format.voidsetSendTemporalDataTypesAsStringForBulkCopy(boolean sendTemporalDataTypesAsStringForBulkCopy)Specifies the flag to send temporal datatypes as String for Bulk Copy.voidsetSendTimeAsDatetime(boolean sendTimeAsDatetime)Sets the value to enable/disable the sendTimeAsDatetime connection property.voidsetServerName(String serverName)Sets the host name of the target SQL Server.voidsetServerNameAsACE(boolean serverNameAsACE)Sets whether the serverName will be translated from Unicode to ASCII Compatible Encoding (ACE).voidsetServerPreparedStatementDiscardThreshold(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.voidsetServerSpn(String serverSpn)Sets the Service Principal Name (SPN) of the target SQL Server.voidsetSocketFactoryClass(String socketFactoryClass)Sets the connection property 'socketFactoryClass' on the connection.voidsetSocketFactoryConstructorArg(String socketFactoryConstructorArg)Sets Constructor Arguments to be provided on constructor of 'socketFactoryClass'.voidsetSocketTimeout(int socketTimeout)Sets the socket timeout value.voidsetSSLProtocol(String sslProtocol)Sets the sslProtocol property for connection Set this value to specify TLS protocol keyword.voidsetStatementPoolingCacheSize(int statementPoolingCacheSize)Sets the size of the prepared statement cache for this connection.voidsetTransparentNetworkIPResolution(boolean tnir)Sets the value to enable/disable Transparent Netowrk IP Resolution (TNIR).voidsetTrustManagerClass(String trustManagerClass)Sets the connection property 'trustManagerClass' on the connection.voidsetTrustManagerConstructorArg(String trustManagerConstructorArg)Sets Constructor Arguments to be provided on constructor of 'trustManagerClass'.voidsetTrustServerCertificate(boolean e)Sets a Boolean value that indicates if the trustServerCertificate property is enabled.voidsetTrustStore(String trustStore)Sets the path (including file name) to the certificate trustStore file.voidsetTrustStorePassword(String trustStorePassword)Sets the password that is used to check the integrity of the trustStore data.voidsetTrustStoreType(String trustStoreType)Sets the keystore type for the trustStore.voidsetURL(String url)Sets the datasource URL.voidsetUseBulkCopyForBatchInsert(boolean useBulkCopyForBatchInsert)Sets whether the use Bulk Copy API should be used for Batch Insert.voidsetUseFmtOnly(boolean useFmtOnly)Specifies the flag to use FMTONLY for parameter metadata queries.voidsetUser(String user)Sets the user name that will be used when connecting to SQL Server.voidsetWorkstationID(String workstationID)Sets the name of the client machine (or client workstation).voidsetXopenStates(boolean xopenStates)Sets whether the driver will convert SQL states to XOPEN compliant states.StringtoString()<T> Tunwrap(Class<T> iface)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.sql.CommonDataSource
createShardingKeyBuilder
-
Methods inherited from interface javax.sql.DataSource
createConnectionBuilder
-
-
-
-
Method Detail
-
getConnection
public Connection getConnection() throws SQLServerException
- Specified by:
getConnectionin interfaceDataSource- Throws:
SQLServerException
-
getConnection
public Connection getConnection(String username, String password) throws SQLServerException
- Specified by:
getConnectionin interfaceDataSource- Throws:
SQLServerException
-
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.- Specified by:
setLoginTimeoutin interfaceCommonDataSource- Specified by:
setLoginTimeoutin interfaceDataSource
-
getLoginTimeout
public int getLoginTimeout()
- Specified by:
getLoginTimeoutin interfaceCommonDataSource- Specified by:
getLoginTimeoutin interfaceDataSource
-
setLogWriter
public void setLogWriter(PrintWriter out)
- Specified by:
setLogWriterin interfaceCommonDataSource- Specified by:
setLogWriterin interfaceDataSource
-
getLogWriter
public PrintWriter getLogWriter()
Returns the log writer for this DataSource.- Specified by:
getLogWriterin interfaceCommonDataSource- Specified by:
getLogWriterin interfaceDataSource
-
getParentLogger
public Logger getParentLogger() throws SQLFeatureNotSupportedException
- Specified by:
getParentLoggerin interfaceCommonDataSource- Throws:
SQLFeatureNotSupportedException
-
setApplicationName
public void setApplicationName(String applicationName)
Sets the specific application in various SQL Server profiling and logging tools.- Specified by:
setApplicationNamein interfaceISQLServerDataSource- Parameters:
applicationName- A String that contains the name of the application.
-
getApplicationName
public String getApplicationName()
Description copied from interface:ISQLServerDataSourceReturns the application name.- Specified by:
getApplicationNamein interfaceISQLServerDataSource- Returns:
- A String that contains the application name, or "Microsoft JDBC Driver for SQL Server" if no value is set.
-
setDatabaseName
public void setDatabaseName(String databaseName)
Sets the the database to connect to.- Specified by:
setDatabaseNamein interfaceISQLServerDataSource- Parameters:
databaseName- if not set, returns the default value of null.
-
getDatabaseName
public String getDatabaseName()
Description copied from interface:ISQLServerDataSourceReturns the database name.- Specified by:
getDatabaseNamein interfaceISQLServerDataSource- Returns:
- A String that contains the database name or null if no value is set.
-
setInstanceName
public void setInstanceName(String instanceName)
Sets the the SQL Server instance name to connect to.- Specified by:
setInstanceNamein interfaceISQLServerDataSource- Parameters:
instanceName- if not set, returns the default value of null.
-
getInstanceName
public String getInstanceName()
Description copied from interface:ISQLServerDataSourceReturns the SQL Server instance name.- Specified by:
getInstanceNamein interfaceISQLServerDataSource- Returns:
- A String that contains the instance name, or null if no value is set.
-
setIntegratedSecurity
public void setIntegratedSecurity(boolean enable)
Description copied from interface:ISQLServerDataSourceSets a Boolean value that indicates if the integratedSecurity property is enabled.- Specified by:
setIntegratedSecurityin interfaceISQLServerDataSource- Parameters:
enable- true if integratedSecurity is enabled. Otherwise, false.
-
setAuthenticationScheme
public void setAuthenticationScheme(String authenticationScheme)
Description copied from interface:ISQLServerDataSourceSets the kind of integrated security you want your application to use.- Specified by:
setAuthenticationSchemein interfaceISQLServerDataSource- Parameters:
authenticationScheme- Values are "JavaKerberos" and the default "NativeAuthentication".
-
setAuthentication
public void setAuthentication(String authentication)
Description copied from interface:ISQLServerDataSourceSets the authentication mode.- Specified by:
setAuthenticationin interfaceISQLServerDataSource- Parameters:
authentication- the authentication mode
-
getAuthentication
public String getAuthentication()
Description copied from interface:ISQLServerDataSourceReturns the authentication mode.- Specified by:
getAuthenticationin interfaceISQLServerDataSource- Returns:
- the authentication value
-
setGSSCredentials
public void setGSSCredentials(GSSCredential userCredential)
Description copied from interface:ISQLServerDataSourceSets the GSSCredential.- Specified by:
setGSSCredentialsin interfaceISQLServerDataSource- Parameters:
userCredential- the credential
-
getGSSCredentials
public GSSCredential getGSSCredentials()
Description copied from interface:ISQLServerDataSourceReturns the GSSCredential.- Specified by:
getGSSCredentialsin interfaceISQLServerDataSource- Returns:
- GSSCredential
-
setAccessToken
public void setAccessToken(String accessToken)
Description copied from interface:ISQLServerDataSourceSets the access token.- Specified by:
setAccessTokenin interfaceISQLServerDataSource- Parameters:
accessToken- to be set in the string property.
-
getAccessToken
public String getAccessToken()
Description copied from interface:ISQLServerDataSourceReturns the access token.- Specified by:
getAccessTokenin interfaceISQLServerDataSource- Returns:
- the access token.
-
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.- Specified by:
setColumnEncryptionSettingin interfaceISQLServerDataSource- Parameters:
columnEncryptionSetting- Enables/disables Always Encrypted functionality for the data source object. The default is Disabled.
-
getColumnEncryptionSetting
public String getColumnEncryptionSetting()
Description copied from interface:ISQLServerDataSourceReturns the Always Encrypted functionality setting for the data source object.- Specified by:
getColumnEncryptionSettingin interfaceISQLServerDataSource- Returns:
- the Always Encrypted functionality setting for the data source object.
-
setKeyStoreAuthentication
public void setKeyStoreAuthentication(String keyStoreAuthentication)
Description copied from interface:ISQLServerDataSourceSets the name that identifies a key store. Only value supported is the "JavaKeyStorePassword" for identifying the Java Key Store. The default is null.- Specified by:
setKeyStoreAuthenticationin interfaceISQLServerDataSource- Parameters:
keyStoreAuthentication- the name that identifies a key store.
-
getKeyStoreAuthentication
public String getKeyStoreAuthentication()
Description copied from interface:ISQLServerDataSourceReturns the value of the keyStoreAuthentication setting for the data source object.- Specified by:
getKeyStoreAuthenticationin interfaceISQLServerDataSource- Returns:
- the value of the keyStoreAuthentication setting for the data source object.
-
setKeyStoreSecret
public void setKeyStoreSecret(String keyStoreSecret)
Description copied from interface:ISQLServerDataSourceSets 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".- Specified by:
setKeyStoreSecretin interfaceISQLServerDataSource- Parameters:
keyStoreSecret- the password to use for the keystore as well as for the key
-
setKeyStoreLocation
public void setKeyStoreLocation(String keyStoreLocation)
Description copied from interface:ISQLServerDataSourceSets the location including the file name for the Java keystore. Note that, keyStoreAuthentication must be set with "JavaKeyStorePassword".- Specified by:
setKeyStoreLocationin interfaceISQLServerDataSource- Parameters:
keyStoreLocation- the location including the file name for the Java keystore.
-
getKeyStoreLocation
public String getKeyStoreLocation()
Description copied from interface:ISQLServerDataSourceReturns the keyStoreLocation for the Java Key Store.- Specified by:
getKeyStoreLocationin interfaceISQLServerDataSource- Returns:
- the keyStoreLocation for the Java Key Store.
-
setLastUpdateCount
public void setLastUpdateCount(boolean lastUpdateCount)
Description copied from interface:ISQLServerDataSourceSets a Boolean value that indicates if the lastUpdateCount property is enabled.- Specified by:
setLastUpdateCountin interfaceISQLServerDataSource- Parameters:
lastUpdateCount- true if lastUpdateCount is enabled. Otherwise, false.
-
getLastUpdateCount
public boolean getLastUpdateCount()
Description copied from interface:ISQLServerDataSourceReturns a Boolean value that indicates if the lastUpdateCount property is enabled.- Specified by:
getLastUpdateCountin interfaceISQLServerDataSource- Returns:
- true if lastUpdateCount is enabled. Otherwise, false.
-
setEncrypt
public void setEncrypt(boolean encrypt)
Description copied from interface:ISQLServerDataSourceSets a Boolean value that indicates if the encrypt property is enabled.- Specified by:
setEncryptin interfaceISQLServerDataSource- Parameters:
encrypt- true if the Secure Sockets Layer (SSL) encryption is enabled between the client and the SQL Server. Otherwise, false.
-
getEncrypt
public boolean getEncrypt()
Description copied from interface:ISQLServerDataSourceReturns a Boolean value that indicates if the encrypt property is enabled.- Specified by:
getEncryptin interfaceISQLServerDataSource- Returns:
- true if encrypt is enabled. Otherwise, false.
-
setTransparentNetworkIPResolution
public void setTransparentNetworkIPResolution(boolean tnir)
Description copied from interface:ISQLServerDataSourceSets the value to enable/disable Transparent Netowrk 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
- Specified by:
setTransparentNetworkIPResolutionin interfaceISQLServerDataSource- Parameters:
tnir- if set to true, the driver attempts to connect to the first IP address available. It is true by default.
-
getTransparentNetworkIPResolution
public boolean getTransparentNetworkIPResolution()
Description copied from interface:ISQLServerDataSourceReturns the TransparentNetworkIPResolution value.- Specified by:
getTransparentNetworkIPResolutionin interfaceISQLServerDataSource- Returns:
- if enabled, returns true. Otherwise, false.
-
setTrustServerCertificate
public void setTrustServerCertificate(boolean e)
Description copied from interface:ISQLServerDataSourceSets a Boolean value that indicates if the trustServerCertificate property is enabled.- Specified by:
setTrustServerCertificatein interfaceISQLServerDataSource- Parameters:
e- true, if the server Secure Sockets Layer (SSL) certificate should be automatically trusted when the communication layer is encrypted using SSL. Otherwise, false.
-
getTrustServerCertificate
public boolean getTrustServerCertificate()
Description copied from interface:ISQLServerDataSourceReturns a Boolean value that indicates if the trustServerCertificate property is enabled.- Specified by:
getTrustServerCertificatein interfaceISQLServerDataSource- Returns:
- true if trustServerCertificate is enabled. Otherwise, false.
-
setTrustStoreType
public void setTrustStoreType(String trustStoreType)
Description copied from interface:ISQLServerDataSourceSets the keystore type for the trustStore.- Specified by:
setTrustStoreTypein interfaceISQLServerDataSource- Parameters:
trustStoreType- A String that contains the trust store type
-
getTrustStoreType
public String getTrustStoreType()
Description copied from interface:ISQLServerDataSourceReturns the keyStore Type for the trustStore.- Specified by:
getTrustStoreTypein interfaceISQLServerDataSource- Returns:
- trustStoreType A String that contains the trust store type
-
setTrustStore
public void setTrustStore(String trustStore)
Description copied from interface:ISQLServerDataSourceSets the path (including file name) to the certificate trustStore file.- Specified by:
setTrustStorein interfaceISQLServerDataSource- Parameters:
trustStore- A String that contains the path (including file name) to the certificate trustStore file.
-
getTrustStore
public String getTrustStore()
Description copied from interface:ISQLServerDataSourceReturns the path (including file name) to the certificate trustStore file.- Specified by:
getTrustStorein interfaceISQLServerDataSource- Returns:
- trustStore A String that contains the path (including file name) to the certificate trustStore file, or null if no value is set.
-
setTrustStorePassword
public void setTrustStorePassword(String trustStorePassword)
Description copied from interface:ISQLServerDataSourceSets the password that is used to check the integrity of the trustStore data.- Specified by:
setTrustStorePasswordin interfaceISQLServerDataSource- Parameters:
trustStorePassword- A String that contains the password that is used to check the integrity of the trustStore data.
-
setHostNameInCertificate
public void setHostNameInCertificate(String hostName)
Description copied from interface:ISQLServerDataSourceSets the host name to be used in validating the SQL Server Secure Sockets Layer (SSL) certificate.- Specified by:
setHostNameInCertificatein interfaceISQLServerDataSource- Parameters:
hostName- A String that contains the host name.
-
getHostNameInCertificate
public String getHostNameInCertificate()
Description copied from interface:ISQLServerDataSourceReturns the host name used in validating the SQL Server Secure Sockets Layer (SSL) certificate.- Specified by:
getHostNameInCertificatein interfaceISQLServerDataSource- Returns:
- A String that contains the host name, or null if no value is set.
-
setLockTimeout
public void setLockTimeout(int lockTimeout)
Sets the lock timeout value.- Specified by:
setLockTimeoutin interfaceISQLServerDataSource- 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.
-
getLockTimeout
public int getLockTimeout()
Description copied from interface:ISQLServerDataSourceReturns an int value that indicates the number of milliseconds that the database will wait before reporting a lock time out.- Specified by:
getLockTimeoutin interfaceISQLServerDataSource- Returns:
- An int value that contains the number of milliseconds that the database will wait.
-
setPassword
public void setPassword(String password)
Sets the password that will be used when connecting to SQL Server.- Specified by:
setPasswordin interfaceISQLServerDataSource- 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.- Specified by:
setPortNumberin interfaceISQLServerDataSource- 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.
-
getPortNumber
public int getPortNumber()
Description copied from interface:ISQLServerDataSourceReturns the current port number that is used to communicate with SQL Server.- Specified by:
getPortNumberin interfaceISQLServerDataSource- Returns:
- An int value that contains the current port number.
-
setSelectMethod
public void setSelectMethod(String selectMethod)
Sets the default cursor type used for the result set.- Specified by:
setSelectMethodin interfaceISQLServerDataSource- 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".
-
getSelectMethod
public String getSelectMethod()
Description copied from interface:ISQLServerDataSourceReturns the default cursor type used for all result sets that are created by using this SQLServerDataSource object.- Specified by:
getSelectMethodin interfaceISQLServerDataSource- Returns:
- A String value that contains the default cursor type.
-
setResponseBuffering
public void setResponseBuffering(String bufferingMode)
Description copied from interface:ISQLServerDataSourceSets the response buffering mode for connections created by using this SQLServerDataSource object.- Specified by:
setResponseBufferingin interfaceISQLServerDataSource- 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
public String getResponseBuffering()
Description copied from interface:ISQLServerDataSourceReturns the response buffering mode for this SQLServerDataSource object.- Specified by:
getResponseBufferingin interfaceISQLServerDataSource- Returns:
- A String that contains a lower-case full or adaptive.
-
setApplicationIntent
public void setApplicationIntent(String applicationIntent)
Description copied from interface:ISQLServerDataSourceSets the application intent.- Specified by:
setApplicationIntentin interfaceISQLServerDataSource- Parameters:
applicationIntent- A String that contains the application intent.
-
getApplicationIntent
public String getApplicationIntent()
Description copied from interface:ISQLServerDataSourceReturns the application intent.- Specified by:
getApplicationIntentin interfaceISQLServerDataSource- Returns:
- A String that contains the application intent.
-
setSendTimeAsDatetime
public void setSendTimeAsDatetime(boolean sendTimeAsDatetime)
Description copied from interface:ISQLServerDataSourceSets the value to enable/disable the sendTimeAsDatetime connection property.- Specified by:
setSendTimeAsDatetimein interfaceISQLServerDataSource- 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
public boolean getSendTimeAsDatetime()
Description copied from interface:ISQLServerDataSourceReturns 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.- Specified by:
getSendTimeAsDatetimein interfaceISQLServerDataSource- 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.
-
setUseFmtOnly
public void setUseFmtOnly(boolean useFmtOnly)
Description copied from interface:ISQLServerDataSourceSpecifies the flag to use FMTONLY for parameter metadata queries.- Specified by:
setUseFmtOnlyin interfaceISQLServerDataSource- Parameters:
useFmtOnly- boolean value for 'useFmtOnly'.
-
getUseFmtOnly
public boolean getUseFmtOnly()
Description copied from interface:ISQLServerDataSourceReturns the current flag value for useFmtOnly.- Specified by:
getUseFmtOnlyin interfaceISQLServerDataSource- Returns:
- 'useFmtOnly' property value.
-
setDelayLoadingLobs
public void setDelayLoadingLobs(boolean delayLoadingLobs)
Description copied from interface:ISQLServerDataSourceSpecifies the flag to load LOBs instead of streaming them.- Specified by:
setDelayLoadingLobsin interfaceISQLServerDataSource- Parameters:
delayLoadingLobs- boolean value for 'delayLoadingLobs'.
-
getDelayLoadingLobs
public boolean getDelayLoadingLobs()
Description copied from interface:ISQLServerDataSourceReturns the current flag value for delayLoadingLobs.- Specified by:
getDelayLoadingLobsin interfaceISQLServerDataSource- Returns:
- 'delayLoadingLobs' property value.
-
setSendStringParametersAsUnicode
public void setSendStringParametersAsUnicode(boolean sendStringParametersAsUnicode)
Sets whether string parameters are sent to the server in UNICODE format.- Specified by:
setSendStringParametersAsUnicodein interfaceISQLServerDataSource- 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.
-
getSendStringParametersAsUnicode
public boolean getSendStringParametersAsUnicode()
Description copied from interface:ISQLServerDataSourceReturns whether sending string parameters to the server in UNICODE format is enabled.- Specified by:
getSendStringParametersAsUnicodein interfaceISQLServerDataSource- Returns:
- true if string parameters are sent to the server in UNICODE format. Otherwise, false.
-
setServerNameAsACE
public void setServerNameAsACE(boolean serverNameAsACE)
Description copied from interface:ISQLServerDataSourceSets whether the serverName will be translated from Unicode to ASCII Compatible Encoding (ACE).- Specified by:
setServerNameAsACEin interfaceISQLServerDataSource- Parameters:
serverNameAsACE- if enabled the servername will be translated to ASCII Compatible Encoding (ACE)
-
getServerNameAsACE
public boolean getServerNameAsACE()
Description copied from interface:ISQLServerDataSourceReturns if the serverName should be translated from Unicode to ASCII Compatible Encoding (ACE).- Specified by:
getServerNameAsACEin interfaceISQLServerDataSource- Returns:
- if enabled, will return true. Otherwise, false.
-
setServerName
public void setServerName(String serverName)
Sets the host name of the target SQL Server.- Specified by:
setServerNamein interfaceISQLServerDataSource- Parameters:
serverName- if not set, returns the default value of null is returned.
-
getServerName
public String getServerName()
Description copied from interface:ISQLServerDataSourceReturns the name of the SQL Server instance.- Specified by:
getServerNamein interfaceISQLServerDataSource- Returns:
- A String that contains the server name or null if no value is set.
-
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- Specified by:
setServerSpnin interfaceISQLServerDataSource- Parameters:
serverSpn- service principal name
-
getServerSpn
public String getServerSpn()
Description copied from interface:ISQLServerDataSourceReturns the server spn.- Specified by:
getServerSpnin interfaceISQLServerDataSource- Returns:
- A String that contains the server spn
-
setFailoverPartner
public void setFailoverPartner(String serverName)
Sets the fail over partner of the target SQL Server.- Specified by:
setFailoverPartnerin interfaceISQLServerDataSource- Parameters:
serverName- if not set, returns the default value of null.
-
getFailoverPartner
public String getFailoverPartner()
Description copied from interface:ISQLServerDataSourceReturns the name of the failover server that is used in a database mirroring configuration.- Specified by:
getFailoverPartnerin interfaceISQLServerDataSource- Returns:
- A String that contains the name of the failover partner, or null if none is set.
-
setMultiSubnetFailover
public void setMultiSubnetFailover(boolean multiSubnetFailover)
Description copied from interface:ISQLServerDataSourceSets the value of the multiSubnetFailover connection property.- Specified by:
setMultiSubnetFailoverin interfaceISQLServerDataSource- Parameters:
multiSubnetFailover- The new value of the multiSubnetFailover connection property.
-
getMultiSubnetFailover
public boolean getMultiSubnetFailover()
Description copied from interface:ISQLServerDataSourceReturns the value of the multiSubnetFailover connection property.- Specified by:
getMultiSubnetFailoverin interfaceISQLServerDataSource- Returns:
- Returns true or false, depending on the current setting of the connection property.
-
setUser
public void setUser(String user)
Sets the user name that will be used when connecting to SQL Server.- Specified by:
setUserin interfaceISQLServerDataSource- Parameters:
user- if not set, returns the default value of null.
-
getUser
public String getUser()
Description copied from interface:ISQLServerDataSourceReturns the user name that is used to connect the data source.- Specified by:
getUserin interfaceISQLServerDataSource- Returns:
- A String that contains the user name.
-
setWorkstationID
public void setWorkstationID(String workstationID)
Sets the name of the client machine (or client workstation).- Specified by:
setWorkstationIDin interfaceISQLServerDataSource- 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().
-
getWorkstationID
public String getWorkstationID()
Description copied from interface:ISQLServerDataSourceReturns the name of the client computer name that is used to connect to the data source.- Specified by:
getWorkstationIDin interfaceISQLServerDataSource- Returns:
- A String that contains the client computer name.
-
setXopenStates
public void setXopenStates(boolean xopenStates)
Sets whether the driver will convert SQL states to XOPEN compliant states.- Specified by:
setXopenStatesin interfaceISQLServerDataSource- 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.
-
getXopenStates
public boolean getXopenStates()
Description copied from interface:ISQLServerDataSourceReturns the value that indicates if converting SQL states to XOPEN compliant states is enabled.- Specified by:
getXopenStatesin interfaceISQLServerDataSource- Returns:
- true if converting SQL states to XOPEN compliant states is enabled. Otherwise, false.
-
setFIPS
public void setFIPS(boolean fips)
Description copied from interface:ISQLServerDataSourceSets whether Fips Mode should be enabled/disabled on the connection. For FIPS enabled JVM this property should be true.- Specified by:
setFIPSin interfaceISQLServerDataSource- Parameters:
fips- Boolean property to enable/disable fips
-
getFIPS
public boolean getFIPS()
Description copied from interface:ISQLServerDataSourceReturns the value of connection property "fips". For FIPS enabled JVM this property should be true.- Specified by:
getFIPSin interfaceISQLServerDataSource- Returns:
- fips boolean value
-
getSocketFactoryClass
public String getSocketFactoryClass()
Description copied from interface:ISQLServerDataSourceReturns the value for the connection property 'socketFactoryClass'.- Specified by:
getSocketFactoryClassin interfaceISQLServerDataSource- Returns:
- socketFactoryClass property value
-
setSocketFactoryClass
public void setSocketFactoryClass(String socketFactoryClass)
Description copied from interface:ISQLServerDataSourceSets the connection property 'socketFactoryClass' on the connection.- Specified by:
setSocketFactoryClassin interfaceISQLServerDataSource- Parameters:
socketFactoryClass- The fully qualified class name of a custom javax.net.SocketFactory.
-
getSocketFactoryConstructorArg
public String getSocketFactoryConstructorArg()
Description copied from interface:ISQLServerDataSourceReturns the value for the connection property 'socketFactoryConstructorArg'.- Specified by:
getSocketFactoryConstructorArgin interfaceISQLServerDataSource- Returns:
- socketFactoryConstructorArg property value
-
setSocketFactoryConstructorArg
public void setSocketFactoryConstructorArg(String socketFactoryConstructorArg)
Description copied from interface:ISQLServerDataSourceSets Constructor Arguments to be provided on constructor of 'socketFactoryClass'.- Specified by:
setSocketFactoryConstructorArgin interfaceISQLServerDataSource- Parameters:
socketFactoryConstructorArg- 'socketFactoryClass' constructor arguments
-
setSSLProtocol
public void setSSLProtocol(String sslProtocol)
Description copied from interface:ISQLServerDataSourceSets the sslProtocol property for connection Set this value to specify TLS protocol keyword. Acceptable values are: TLS, TLSv1, TLSv1.1, and TLSv1.2.- Specified by:
setSSLProtocolin interfaceISQLServerDataSource- Parameters:
sslProtocol- Value for SSL Protocol to be set.
-
getSSLProtocol
public String getSSLProtocol()
Description copied from interface:ISQLServerDataSourceReturns the value of connection property 'sslProtocol'.- Specified by:
getSSLProtocolin interfaceISQLServerDataSource- Returns:
- sslProtocol property value
-
setTrustManagerClass
public void setTrustManagerClass(String trustManagerClass)
Description copied from interface:ISQLServerDataSourceSets the connection property 'trustManagerClass' on the connection.- Specified by:
setTrustManagerClassin interfaceISQLServerDataSource- Parameters:
trustManagerClass- The fully qualified class name of a custom javax.net.ssl.TrustManager.
-
getTrustManagerClass
public String getTrustManagerClass()
Description copied from interface:ISQLServerDataSourceReturns the value for the connection property 'trustManagerClass'.- Specified by:
getTrustManagerClassin interfaceISQLServerDataSource- Returns:
- trustManagerClass property value
-
setTrustManagerConstructorArg
public void setTrustManagerConstructorArg(String trustManagerConstructorArg)
Description copied from interface:ISQLServerDataSourceSets Constructor Arguments to be provided on constructor of 'trustManagerClass'.- Specified by:
setTrustManagerConstructorArgin interfaceISQLServerDataSource- Parameters:
trustManagerConstructorArg- 'trustManagerClass' constructor arguments
-
getTrustManagerConstructorArg
public String getTrustManagerConstructorArg()
Description copied from interface:ISQLServerDataSourceReturns the value for the connection property 'trustManagerConstructorArg'.- Specified by:
getTrustManagerConstructorArgin interfaceISQLServerDataSource- Returns:
- trustManagerConstructorArg property value
-
setURL
public void setURL(String url)
Sets the datasource URL.- Specified by:
setURLin interfaceISQLServerDataSource- 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://".
-
getURL
public String getURL()
Description copied from interface:ISQLServerDataSourceReturns the URL that is used to connect to the data source.- Specified by:
getURLin interfaceISQLServerDataSource- Returns:
- A String that contains the URL.
-
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".- Specified by:
setDescriptionin interfaceISQLServerDataSource- Parameters:
description- A String that contains the description.
-
getDescription
public String getDescription()
Returns the DataSource description- Specified by:
getDescriptionin interfaceISQLServerDataSource- Returns:
- A String that contains the data source description or null if no value is set.
-
setPacketSize
public void setPacketSize(int packetSize)
Sets the packet size.- Specified by:
setPacketSizein interfaceISQLServerDataSource- 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.
-
getPacketSize
public int getPacketSize()
Description copied from interface:ISQLServerDataSourceReturns the current network packet size used to communicate with SQL Server, specified in bytes.- Specified by:
getPacketSizein interfaceISQLServerDataSource- Returns:
- An int value containing the current network packet size.
-
setQueryTimeout
public void setQueryTimeout(int queryTimeout)
Description copied from interface:ISQLServerDataSourceSetting the query timeout.- Specified by:
setQueryTimeoutin interfaceISQLServerDataSource- 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
public int getQueryTimeout()
Description copied from interface:ISQLServerDataSourceReturns the query timeout.- Specified by:
getQueryTimeoutin interfaceISQLServerDataSource- Returns:
- The number of seconds to wait before a timeout has occurred on a query.
-
setCancelQueryTimeout
public void setCancelQueryTimeout(int cancelQueryTimeout)
Description copied from interface:ISQLServerDataSourceSets the cancel timeout.- Specified by:
setCancelQueryTimeoutin interfaceISQLServerDataSource- Parameters:
cancelQueryTimeout- The number of seconds to wait before we wait for the query timeout to happen.
-
getCancelQueryTimeout
public int getCancelQueryTimeout()
Description copied from interface:ISQLServerDataSourceReturns the cancel timeout.- Specified by:
getCancelQueryTimeoutin interfaceISQLServerDataSource- Returns:
- the number of seconds to wait before we wait for the query timeout to happen.
-
setEnablePrepareOnFirstPreparedStatementCall
public void setEnablePrepareOnFirstPreparedStatementCall(boolean enablePrepareOnFirstPreparedStatementCall)
Description copied from interface:ISQLServerDataSourceSets 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.- Specified by:
setEnablePrepareOnFirstPreparedStatementCallin interfaceISQLServerDataSource- Parameters:
enablePrepareOnFirstPreparedStatementCall- Changes the setting per the description.
-
getEnablePrepareOnFirstPreparedStatementCall
public boolean getEnablePrepareOnFirstPreparedStatementCall()
Description copied from interface:ISQLServerDataSourceReturns 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.- Specified by:
getEnablePrepareOnFirstPreparedStatementCallin interfaceISQLServerDataSource- Returns:
- Returns the current setting per the description.
-
setServerPreparedStatementDiscardThreshold
public void setServerPreparedStatementDiscardThreshold(int serverPreparedStatementDiscardThreshold)
Description copied from interface:ISQLServerDataSourceSets 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.- Specified by:
setServerPreparedStatementDiscardThresholdin interfaceISQLServerDataSource- Parameters:
serverPreparedStatementDiscardThreshold- Changes the setting per the description.
-
getServerPreparedStatementDiscardThreshold
public int getServerPreparedStatementDiscardThreshold()
Description copied from interface:ISQLServerDataSourceReturns 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.- Specified by:
getServerPreparedStatementDiscardThresholdin interfaceISQLServerDataSource- Returns:
- Returns the current setting per the description.
-
setStatementPoolingCacheSize
public void setStatementPoolingCacheSize(int statementPoolingCacheSize)
Description copied from interface:ISQLServerDataSourceSets the size of the prepared statement cache for this connection. A value less than 1 means no cache.- Specified by:
setStatementPoolingCacheSizein interfaceISQLServerDataSource- Parameters:
statementPoolingCacheSize- Changes the setting per the description.
-
getStatementPoolingCacheSize
public int getStatementPoolingCacheSize()
Description copied from interface:ISQLServerDataSourceReturns the size of the prepared statement cache for this connection. A value less than 1 means no cache.- Specified by:
getStatementPoolingCacheSizein interfaceISQLServerDataSource- Returns:
- Returns the current setting per the description.
-
setDisableStatementPooling
public void setDisableStatementPooling(boolean disableStatementPooling)
Description copied from interface:ISQLServerDataSourceSets the value to disable/enable statement pooling.- Specified by:
setDisableStatementPoolingin interfaceISQLServerDataSource- Parameters:
disableStatementPooling- true to disable statement pooling, false to enable it.
-
getDisableStatementPooling
public boolean getDisableStatementPooling()
Description copied from interface:ISQLServerDataSourceReturns whether statement pooling is disabled.- Specified by:
getDisableStatementPoolingin interfaceISQLServerDataSource- Returns:
- true if statement pooling is disabled, false if it is enabled.
-
setSocketTimeout
public void setSocketTimeout(int socketTimeout)
Description copied from interface:ISQLServerDataSourceSets the socket timeout value.- Specified by:
setSocketTimeoutin interfaceISQLServerDataSource- 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
public int getSocketTimeout()
Description copied from interface:ISQLServerDataSourceReturns the socket timeout value.- Specified by:
getSocketTimeoutin interfaceISQLServerDataSource- Returns:
- The number of milliseconds to wait before a timeout is occurred on a socket read or accept.
-
setUseBulkCopyForBatchInsert
public void setUseBulkCopyForBatchInsert(boolean useBulkCopyForBatchInsert)
Description copied from interface:ISQLServerDataSourceSets whether the use Bulk Copy API should be used for Batch Insert.- Specified by:
setUseBulkCopyForBatchInsertin interfaceISQLServerDataSource- Parameters:
useBulkCopyForBatchInsert- indicates whether Bulk Copy API should be used for Batch Insert operations.
-
getUseBulkCopyForBatchInsert
public boolean getUseBulkCopyForBatchInsert()
Description copied from interface:ISQLServerDataSourceReturns whether the use Bulk Copy API is used for Batch Insert.- Specified by:
getUseBulkCopyForBatchInsertin interfaceISQLServerDataSource- Returns:
- whether the driver should use Bulk Copy API for Batch Insert operations.
-
setJASSConfigurationName
public void setJASSConfigurationName(String configurationName)
Description copied from interface:ISQLServerDataSourceSets the login configuration file for Kerberos authentication. This overrides the default configuration SQLJDBCDriver- Specified by:
setJASSConfigurationNamein interfaceISQLServerDataSource- Parameters:
configurationName- the configuration name
-
getJASSConfigurationName
public String getJASSConfigurationName()
Description copied from interface:ISQLServerDataSourceReturns the login configuration file for Kerberos authentication.- Specified by:
getJASSConfigurationNamein interfaceISQLServerDataSource- Returns:
- login configuration file name
-
setMSIClientId
public void setMSIClientId(String msiClientId)
Description copied from interface:ISQLServerDataSourceSets the client id to be used to retrieve access token from MSI EndPoint.- Specified by:
setMSIClientIdin interfaceISQLServerDataSource- Parameters:
msiClientId- Client ID of User Assigned Managed Identity
-
getMSIClientId
public String getMSIClientId()
Description copied from interface:ISQLServerDataSourceReturns the value for the connection property 'msiClientId'.- Specified by:
getMSIClientIdin interfaceISQLServerDataSource- Returns:
- msiClientId property value
-
setKeyVaultProviderClientId
public void setKeyVaultProviderClientId(String keyVaultProviderClientId)
Description copied from interface:ISQLServerDataSourceSets the Azure Key Vault (AKV) Provider Client Id to provided value to be used for column encryption.- Specified by:
setKeyVaultProviderClientIdin interfaceISQLServerDataSource- Parameters:
keyVaultProviderClientId- Client Id of Azure Key Vault (AKV) Provider to be used for column encryption.
-
getKeyVaultProviderClientId
public String getKeyVaultProviderClientId()
Description copied from interface:ISQLServerDataSourceReturns the value for the connection property 'keyVaultProviderClientId'.- Specified by:
getKeyVaultProviderClientIdin interfaceISQLServerDataSource- Returns:
- keyVaultProviderClientId
-
setKeyVaultProviderClientKey
public void setKeyVaultProviderClientKey(String keyVaultProviderClientKey)
Description copied from interface:ISQLServerDataSourceSets the Azure Key Vault (AKV) Provider Client Key to provided value to be used for column encryption.- Specified by:
setKeyVaultProviderClientKeyin interfaceISQLServerDataSource- Parameters:
keyVaultProviderClientKey- Client Key of Azure Key Vault (AKV) Provider to be used for column encryption.
-
setKeyStorePrincipalId
public void setKeyStorePrincipalId(String keyStorePrincipalId)
Description copied from interface:ISQLServerDataSourceSets the value for the connection property 'keyStorePrincipalId'.- Specified by:
setKeyStorePrincipalIdin interfaceISQLServerDataSource- 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
public String getKeyStorePrincipalId()
Description copied from interface:ISQLServerDataSourceReturns the value for the connection property 'keyStorePrincipalId'.- Specified by:
getKeyStorePrincipalIdin interfaceISQLServerDataSource- Returns:
- keyStorePrincipalId
-
getDomain
public String getDomain()
Description copied from interface:ISQLServerDataSourceReturns the value for the connection property 'domain'.- Specified by:
getDomainin interfaceISQLServerDataSource- Returns:
- 'domain' property value
-
setDomain
public void setDomain(String domain)
Description copied from interface:ISQLServerDataSourceSets the 'domain' connection property used for NTLM Authentication.- Specified by:
setDomainin interfaceISQLServerDataSource- Parameters:
domain- Windows domain name
-
getEnclaveAttestationUrl
public String getEnclaveAttestationUrl()
Description copied from interface:ISQLServerDataSourceReturns the enclave attestation URL used in Always Encrypted with Secure Enclaves.- Specified by:
getEnclaveAttestationUrlin interfaceISQLServerDataSource- Returns:
- enclave attestation URL.
-
setEnclaveAttestationUrl
public void setEnclaveAttestationUrl(String url)
Description copied from interface:ISQLServerDataSourceSets the enclave attestation URL used in Always Encrypted with Secure Enclaves.- Specified by:
setEnclaveAttestationUrlin interfaceISQLServerDataSource- Parameters:
url- Enclave attestation URL.
-
getEnclaveAttestationProtocol
public String getEnclaveAttestationProtocol()
Description copied from interface:ISQLServerDataSourceReturns the enclave attestation protocol used in Always Encrypted with Secure Enclaves.- Specified by:
getEnclaveAttestationProtocolin interfaceISQLServerDataSource- Returns:
- Enclave attestation protocol.
-
setEnclaveAttestationProtocol
public void setEnclaveAttestationProtocol(String protocol)
Description copied from interface:ISQLServerDataSourceSets the enclave attestation protocol to be used in Always Encrypted with Secure Enclaves.- Specified by:
setEnclaveAttestationProtocolin interfaceISQLServerDataSource- Parameters:
protocol- Enclave attestation protocol.
-
getClientCertificate
public String getClientCertificate()
Description copied from interface:ISQLServerDataSourceReturns client certificate path for client certificate authentication.- Specified by:
getClientCertificatein interfaceISQLServerDataSource- Returns:
- Client certificate path.
-
setClientCertificate
public void setClientCertificate(String certPath)
Description copied from interface:ISQLServerDataSourceSets client certificate path for client certificate authentication.- Specified by:
setClientCertificatein interfaceISQLServerDataSource- Parameters:
certPath- Client certificate path.
-
getClientKey
public String getClientKey()
Description copied from interface:ISQLServerDataSourceReturns Private key file path for client certificate authentication.- Specified by:
getClientKeyin interfaceISQLServerDataSource- Returns:
- Private key file path.
-
setClientKey
public void setClientKey(String keyPath)
Description copied from interface:ISQLServerDataSourceSets Private key file path for client certificate authentication.- Specified by:
setClientKeyin interfaceISQLServerDataSource- Parameters:
keyPath- Private key file path.
-
setClientKeyPassword
public void setClientKeyPassword(String password)
Description copied from interface:ISQLServerDataSourceSets the password to be used for Private key provided by the user for client certificate authentication.- Specified by:
setClientKeyPasswordin interfaceISQLServerDataSource- Parameters:
password- Private key password.
-
getSendTemporalDataTypesAsStringForBulkCopy
public boolean getSendTemporalDataTypesAsStringForBulkCopy()
- Specified by:
getSendTemporalDataTypesAsStringForBulkCopyin interfaceISQLServerDataSource
-
setSendTemporalDataTypesAsStringForBulkCopy
public void setSendTemporalDataTypesAsStringForBulkCopy(boolean sendTemporalDataTypesAsStringForBulkCopy)
Description copied from interface:ISQLServerDataSourceSpecifies the flag to send temporal datatypes as String for Bulk Copy.- Specified by:
setSendTemporalDataTypesAsStringForBulkCopyin interfaceISQLServerDataSource- Parameters:
sendTemporalDataTypesAsStringForBulkCopy- boolean value for 'sendTemporalDataTypesAsStringForBulkCopy'.
-
getReference
public Reference getReference()
- Specified by:
getReferencein interfaceReferenceable
-
isWrapperFor
public boolean isWrapperFor(Class<?> iface) throws SQLException
- Specified by:
isWrapperForin interfaceWrapper- Throws:
SQLException
-
unwrap
public <T> T unwrap(Class<T> iface) throws SQLException
- Specified by:
unwrapin interfaceWrapper- Throws:
SQLException
-
-