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

This datasource lists properties specific for the SQLServerConnection class.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`SQLServerDataSource()` Initializes a new instance of the SQLServerDataSource class.

### Method Summary

All Methods Instance Methods Concrete Methods
`String` `getAccessToken()` Retrieves the access token.
`String` `getApplicationIntent()` Returns the application intent.
`String` `getApplicationName()` Returns the application name.
`String` `getAuthentication()` Retrieves the authentication mode
`String` `getColumnEncryptionSetting()` Retrieves the Always Encrypted functionality setting for the data source object.
`Connection` `getConnection()`
`Connection` `getConnection(String username, String password)`
`String` `getDatabaseName()` Returns the database name.
`String` `getDescription()` Returns a description of the data source.
`boolean` `getEnablePrepareOnFirstPreparedStatementCall()` 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.
`boolean` `getEncrypt()` Returns a Boolean value that indicates if the encrypt property is enabled.
`String` `getFailoverPartner()` Returns the name of the failover server that is used in a database mirroring configuration.
`boolean` `getFIPS()`
`String` `getFIPSProvider()`
`GSSCredential` `getGSSCredentials()` Retrieves 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` `getJASSConfigurationName()` Retrieves the login configuration file for Kerberos authentication.
`String` `getKeyStoreAuthentication()` Gets the value of the keyStoreAuthentication setting for the data source object.
`String` `getKeyStoreLocation()` Retrieves the keyStoreLocation for the Java Key Store.
`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.
`int` `getLoginTimeout()`
`PrintWriter` `getLogWriter()`
`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.
`Logger` `getParentLogger()`
`int` `getPortNumber()` Returns the current port number that is used to communicate with SQL Server.
`int` `getQueryTimeout()`
`Reference` `getReference()`
`String` `getResponseBuffering()` Returns the response buffering mode for this SQLServerDataSource object.
`String` `getSelectMethod()` Returns the default cursor type used for all result sets that are created by using this SQLServerDataSource object.
`boolean` `getSendStringParametersAsUnicode()` Returns a boolean value that indicates if sending string parameters to the server in UNICODE format is enabled.
`boolean` `getSendTimeAsDatetime()` This method was added in SQL Server JDBC Driver 3.0.
`String` `getServerName()` Returns the name of the SQL Server instance.
`boolean` `getServerNameAsACE()` Retrieves if the serverName should be translated from Unicode to ASCII Compatible Encoding (ACE)
`int` `getServerPreparedStatementDiscardThreshold()` This setting 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
`int` `getSocketTimeout()`
`boolean` `getTransparentNetworkIPResolution()` Retrieves the TransparentNetworkIPResolution value.
`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()`
`String` `getURL()` Returns the URL that is used to connect to the data source.
`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 a boolean value that indicates if converting SQL states to XOPEN compliant states is enabled.
`boolean` `isWrapperFor(Class<?> iface)`
`void` `setAccessToken(String accessToken)` Sets the access token.
`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)` Indicates the kind of integrated security you want your application to use.
`void` `setColumnEncryptionSetting(String columnEncryptionSetting)` Enables/disables Always Encrypted functionality for the data source object.
`void` `setDatabaseName(String databaseName)` Sets the database name to connect to.
`void` `setDescription(String description)` Sets the description of the data source.
`void` `setEnablePrepareOnFirstPreparedStatementCall(boolean enablePrepareOnFirstPreparedStatementCall)` 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.
`void` `setEncrypt(boolean encrypt)` Sets a Boolean value that indicates if the encrypt property is enabled.
`void` `setFailoverPartner(String serverName)` Sets the name of the failover server that is used in a database mirroring configuration.
`void` `setFIPS(boolean fips)`
`void` `setFIPSProvider(String fipsProvider)`
`void` `setGSSCredentials(GSSCredential userCredential)` sets GSSCredential
`void` `setHostNameInCertificate(String host)` 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` `setJASSConfigurationName(String configurationName)` Sets the login configuration file for Kerberos authentication.
`void` `setKeyStoreAuthentication(String keyStoreAuthentication)` Sets the name that identifies a key store.
`void` `setKeyStoreLocation(String keyStoreLocation)` Sets the location including the file name for the Java keystore.
`void` `setKeyStoreSecret(String keyStoreSecret)` Sets the password for the Java keystore.
`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` `setLoginTimeout(int loginTimeout)`
`void` `setLogWriter(PrintWriter out)`
`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` `setQueryTimeout(int queryTimeout)`
`void` `setResponseBuffering(String respo)` Sets the response buffering mode for connections created by using this SQLServerDataSource object.
`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` `setSendTimeAsDatetime(boolean sendTimeAsDatetime)` Modifies the setting of the sendTimeAsDatetime connection property.
`void` `setServerName(String serverName)` Sets the name of the computer that is running SQL Server.
`void` `setServerNameAsACE(boolean serverNameAsACE)` Translates the serverName from Unicode to ASCII Compatible Encoding (ACE)
`void` `setServerPreparedStatementDiscardThreshold(int serverPreparedStatementDiscardThreshold)` This setting 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` `setSocketTimeout(int socketTimeout)`
`void` `setTransparentNetworkIPResolution(boolean 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.
`void` `setTrustServerCertificate(boolean e)` Sets a Boolean value that indicates if the trustServerCertificate property is enabled.
`void` `setTrustStore(String st)` Sets the path (including file name) to the certificate trustStore file.
`void` `setTrustStorePassword(String p)` Sets the password that is used to check the integrity of the trustStore data.
`void` `setTrustStoreType(String trustStoreType)`
`void` `setURL(String url)` Sets the URL that is used to connect to the data source.
`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 a Boolean value that indicates if converting SQL states to XOPEN compliant states is enabled.
`String` `toString()`
`<T> T` `unwrap(Class<T> iface)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### SQLServerDataSource

    public SQLServerDataSource()

Initializes a new instance of the SQLServerDataSource class.

### Method Detail

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### getConnection

    public Connection getConnection()
                             throws SQLServerException

Specified by:
  `getConnection` in interface `DataSource`
Throws:
  `SQLServerException`

#### getConnection

    public Connection getConnection(String username,
                                    String password)
                             throws SQLServerException

Specified by:
  `getConnection` in interface `DataSource`
Throws:
  `SQLServerException`

#### setLoginTimeout

    public void setLoginTimeout(int loginTimeout)

Specified by:
  `setLoginTimeout` in interface `CommonDataSource`

#### getLoginTimeout

    public int getLoginTimeout()

Specified by:
  `getLoginTimeout` in interface `CommonDataSource`

#### setLogWriter

    public void setLogWriter(PrintWriter out)

Specified by:
  `setLogWriter` in interface `CommonDataSource`

#### getLogWriter

    public PrintWriter getLogWriter()

Specified by:
  `getLogWriter` in interface `CommonDataSource`

#### getParentLogger

    public Logger getParentLogger()
                           throws SQLFeatureNotSupportedException

Specified by:
  `getParentLogger` in interface `CommonDataSource`
Throws:
  `SQLFeatureNotSupportedException`

#### setApplicationName

    public void setApplicationName(String applicationName)

Description copied from interface: `ISQLServerDataSource`
Sets the application name.

Specified by:
  `setApplicationName` in interface `ISQLServerDataSource`
Parameters:
  `applicationName` - A String that contains the name of the application.

#### getApplicationName

    public String getApplicationName()

Description copied from interface: `ISQLServerDataSource`
Returns the application name.

Specified by:
  `getApplicationName` in interface `ISQLServerDataSource`
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)

Description copied from interface: `ISQLServerDataSource`
Sets the database name to connect to.

Specified by:
  `setDatabaseName` in interface `ISQLServerDataSource`
Parameters:
  `databaseName` - A String that contains the database name.

#### getDatabaseName

    public String getDatabaseName()

Description copied from interface: `ISQLServerDataSource`
Returns the database name.

Specified by:
  `getDatabaseName` in interface `ISQLServerDataSource`
Returns:
  A String that contains the database name or null if no value is set.

#### setInstanceName

    public void setInstanceName(String instanceName)

Description copied from interface: `ISQLServerDataSource`
Sets the SQL Server instance name.

Specified by:
  `setInstanceName` in interface `ISQLServerDataSource`
Parameters:
  `instanceName` - A String that contains the instance name.

#### getInstanceName

    public String getInstanceName()

Description copied from interface: `ISQLServerDataSource`
Returns the SQL Server instance name.

Specified by:
  `getInstanceName` in interface `ISQLServerDataSource`
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: `ISQLServerDataSource`
Sets a Boolean value that indicates if the integratedSecurity property is enabled.

Specified by:
  `setIntegratedSecurity` in interface `ISQLServerDataSource`
Parameters:
  `enable` - true if integratedSecurity is enabled. Otherwise, false.

#### setAuthenticationScheme

    public void setAuthenticationScheme(String authenticationScheme)

Description copied from interface: `ISQLServerDataSource`
Indicates the kind of integrated security you want your application to use.

Specified by:
  `setAuthenticationScheme` in interface `ISQLServerDataSource`
Parameters:
  `authenticationScheme` - Values are "JavaKerberos" and the default "NativeAuthentication".

#### setAuthentication

    public void setAuthentication(String authentication)

sets the authentication mode

Parameters:
  `authentication` - the authentication mode

#### getAuthentication

    public String getAuthentication()

Retrieves the authentication mode

Returns:
  the authentication value

#### setGSSCredentials

    public void setGSSCredentials(GSSCredential userCredential)

sets GSSCredential

Parameters:
  `userCredential` -

#### getGSSCredentials

    public GSSCredential getGSSCredentials()

Retrieves the GSSCredential

Returns:
  GSSCredential

#### setAccessToken

    public void setAccessToken(String accessToken)

Sets the access token.

Parameters:
  `accessToken` - to be set in the string property.

#### getAccessToken

    public String getAccessToken()

Retrieves the access token.

Returns:
  the access token.

#### setColumnEncryptionSetting

    public void setColumnEncryptionSetting(String columnEncryptionSetting)

Enables/disables 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

    public String getColumnEncryptionSetting()

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

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

#### setKeyStoreAuthentication

    public void setKeyStoreAuthentication(String keyStoreAuthentication)

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

Parameters:
  `keyStoreAuthentication` - the name that identifies a key store.

#### getKeyStoreAuthentication

    public String getKeyStoreAuthentication()

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

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

#### setKeyStoreSecret

    public void setKeyStoreSecret(String keyStoreSecret)

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

Parameters:
  `keyStoreSecret` - the password to use for the keystore as well as for the key

#### setKeyStoreLocation

    public void setKeyStoreLocation(String keyStoreLocation)

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

Parameters:
  `keyStoreLocation` - the location including the file name for the Java keystore.

#### getKeyStoreLocation

    public String getKeyStoreLocation()

Retrieves the keyStoreLocation for the Java Key Store.

Returns:
  the keyStoreLocation for the Java Key Store.

#### setLastUpdateCount

    public void setLastUpdateCount(boolean lastUpdateCount)

Description copied from interface: `ISQLServerDataSource`
Sets a Boolean value that indicates if the lastUpdateCount property is enabled.

Specified by:
  `setLastUpdateCount` in interface `ISQLServerDataSource`
Parameters:
  `lastUpdateCount` - true if lastUpdateCount is enabled. Otherwise, false.

#### getLastUpdateCount

    public boolean getLastUpdateCount()

Description copied from interface: `ISQLServerDataSource`
Returns a Boolean value that indicates if the lastUpdateCount property is enabled.

Specified by:
  `getLastUpdateCount` in interface `ISQLServerDataSource`
Returns:
  true if lastUpdateCount is enabled. Otherwise, false.

#### setEncrypt

    public void setEncrypt(boolean encrypt)

Description copied from interface: `ISQLServerDataSource`
Sets a Boolean value that indicates if the encrypt property is enabled.

Specified by:
  `setEncrypt` in interface `ISQLServerDataSource`
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: `ISQLServerDataSource`
Returns a Boolean value that indicates if the encrypt property is enabled.

Specified by:
  `getEncrypt` in interface `ISQLServerDataSource`
Returns:
  true if encrypt is enabled. Otherwise, false.

#### setTransparentNetworkIPResolution

    public void setTransparentNetworkIPResolution(boolean 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

    public boolean getTransparentNetworkIPResolution()

Retrieves the TransparentNetworkIPResolution value.

Returns:
  if enabled, returns true. Otherwise, false.

#### setTrustServerCertificate

    public void setTrustServerCertificate(boolean e)

Description copied from interface: `ISQLServerDataSource`
Sets a Boolean value that indicates if the trustServerCertificate property is enabled.

Specified by:
  `setTrustServerCertificate` in interface `ISQLServerDataSource`
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: `ISQLServerDataSource`
Returns a Boolean value that indicates if the trustServerCertificate property is enabled.

Specified by:
  `getTrustServerCertificate` in interface `ISQLServerDataSource`
Returns:
  true if trustServerCertificate is enabled. Otherwise, false.

#### setTrustStoreType

    public void setTrustStoreType(String trustStoreType)

#### getTrustStoreType

    public String getTrustStoreType()

#### setTrustStore

    public void setTrustStore(String st)

Description copied from interface: `ISQLServerDataSource`
Sets the path (including file name) to the certificate trustStore file.

Specified by:
  `setTrustStore` in interface `ISQLServerDataSource`
Parameters:
  `st` - A String that contains the path (including file name) to the certificate trustStore file.

#### getTrustStore

    public String getTrustStore()

Description copied from interface: `ISQLServerDataSource`
Returns the path (including file name) to the certificate trustStore file.

Specified by:
  `getTrustStore` in interface `ISQLServerDataSource`
Returns:
  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 p)

Description copied from interface: `ISQLServerDataSource`
Sets the password that is used to check the integrity of the trustStore data.

Specified by:
  `setTrustStorePassword` in interface `ISQLServerDataSource`
Parameters:
  `p` - A String that contains the password that is used to check the integrity of the trustStore data.

#### setHostNameInCertificate

    public void setHostNameInCertificate(String host)

Description copied from interface: `ISQLServerDataSource`
Sets the host name to be used in validating the SQL Server Secure Sockets Layer (SSL) certificate.

Specified by:
  `setHostNameInCertificate` in interface `ISQLServerDataSource`
Parameters:
  `host` - A String that contains the host name.

#### getHostNameInCertificate

    public String getHostNameInCertificate()

Description copied from interface: `ISQLServerDataSource`
Returns the host name used in validating the SQL Server Secure Sockets Layer (SSL) certificate.

Specified by:
  `getHostNameInCertificate` in interface `ISQLServerDataSource`
Returns:
  A String that contains the host name, or null if no value is set.

#### setLockTimeout

    public void setLockTimeout(int lockTimeout)

Description copied from interface: `ISQLServerDataSource`
Sets an int value that indicates the number of milliseconds to wait before the database reports a lock time out.

Specified by:
  `setLockTimeout` in interface `ISQLServerDataSource`
Parameters:
  `lockTimeout` - An int value that contains the number of milliseconds to wait.

#### getLockTimeout

    public int getLockTimeout()

Description copied from interface: `ISQLServerDataSource`
Returns an int value that indicates the number of milliseconds that the database will wait before reporting a lock time out.

Specified by:
  `getLockTimeout` in interface `ISQLServerDataSource`
Returns:
  An int value that contains the number of milliseconds that the database will wait.

#### setPassword

    public void setPassword(String password)

Description copied from interface: `ISQLServerDataSource`
Sets the password that will be used to connect to SQL Server.

Specified by:
  `setPassword` in interface `ISQLServerDataSource`
Parameters:
  `password` - A String that contains the password.

#### setPortNumber

    public void setPortNumber(int portNumber)

Description copied from interface: `ISQLServerDataSource`
Sets the port number to be used to communicate with SQL Server.

Specified by:
  `setPortNumber` in interface `ISQLServerDataSource`
Parameters:
  `portNumber` - An int value that contains the port number.

#### getPortNumber

    public int getPortNumber()

Description copied from interface: `ISQLServerDataSource`
Returns the current port number that is used to communicate with SQL Server.

Specified by:
  `getPortNumber` in interface `ISQLServerDataSource`
Returns:
  An int value that contains the current port number.

#### setSelectMethod

    public void setSelectMethod(String selectMethod)

Description copied from interface: `ISQLServerDataSource`
Sets the default cursor type that is used for all result sets that are created by using this SQLServerDataSource object.

Specified by:
  `setSelectMethod` in interface `ISQLServerDataSource`
Parameters:
  `selectMethod` - A String value that contains the default cursor type.

#### getSelectMethod

    public String getSelectMethod()

Description copied from interface: `ISQLServerDataSource`
Returns the default cursor type used for all result sets that are created by using this SQLServerDataSource object.

Specified by:
  `getSelectMethod` in interface `ISQLServerDataSource`
Returns:
  A String value that contains the default cursor type.

#### setResponseBuffering

    public void setResponseBuffering(String respo)

Description copied from interface: `ISQLServerDataSource`
Sets the response buffering mode for connections created by using this SQLServerDataSource object.

Specified by:
  `setResponseBuffering` in interface `ISQLServerDataSource`
Parameters:
  `respo` - 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: `ISQLServerDataSource`
Returns the response buffering mode for this SQLServerDataSource object.

Specified by:
  `getResponseBuffering` in interface `ISQLServerDataSource`
Returns:
  A String that contains a lower-case full or adaptive.

#### setApplicationIntent

    public void setApplicationIntent(String applicationIntent)

Description copied from interface: `ISQLServerDataSource`
Sets the application intent.

Specified by:
  `setApplicationIntent` in interface `ISQLServerDataSource`
Parameters:
  `applicationIntent` - A String that contains the application intent.

#### getApplicationIntent

    public String getApplicationIntent()

Description copied from interface: `ISQLServerDataSource`
Returns the application intent.

Specified by:
  `getApplicationIntent` in interface `ISQLServerDataSource`
Returns:
  A String that contains the application intent.

#### setSendTimeAsDatetime

    public void setSendTimeAsDatetime(boolean sendTimeAsDatetime)

Description copied from interface: `ISQLServerDataSource`
Modifies the setting of the sendTimeAsDatetime connection property.

Specified by:
  `setSendTimeAsDatetime` in interface `ISQLServerDataSource`
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: `ISQLServerDataSource`
This method was added in SQL Server JDBC Driver 3.0. Returns the setting of the sendTimeAsDatetime connection property.

Specified by:
  `getSendTimeAsDatetime` in interface `ISQLServerDataSource`
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.

#### setSendStringParametersAsUnicode

    public void setSendStringParametersAsUnicode(boolean sendStringParametersAsUnicode)

Description copied from interface: `ISQLServerDataSource`
Sets a boolean value that indicates if sending string parameters to the server in UNICODE format is enabled.

Specified by:
  `setSendStringParametersAsUnicode` in interface `ISQLServerDataSource`
Parameters:
  `sendStringParametersAsUnicode` - true if string parameters are sent to the server in UNICODE format. Otherwise, false.

#### getSendStringParametersAsUnicode

    public boolean getSendStringParametersAsUnicode()

Description copied from interface: `ISQLServerDataSource`
Returns a boolean value that indicates if sending string parameters to the server in UNICODE format is enabled.

Specified by:
  `getSendStringParametersAsUnicode` in interface `ISQLServerDataSource`
Returns:
  true if string parameters are sent to the server in UNICODE format. Otherwise, false.

#### setServerNameAsACE

    public void setServerNameAsACE(boolean serverNameAsACE)

Translates the serverName from Unicode to ASCII Compatible Encoding (ACE)

Parameters:
  `serverNameAsACE` - if enabled the servername will be translated to ASCII Compatible Encoding (ACE)

#### getServerNameAsACE

    public boolean getServerNameAsACE()

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

Returns:
  if enabled, will return true. Otherwise, false.

#### setServerName

    public void setServerName(String serverName)

Description copied from interface: `ISQLServerDataSource`
Sets the name of the computer that is running SQL Server.

Specified by:
  `setServerName` in interface `ISQLServerDataSource`
Parameters:
  `serverName` - A String that contains the server name.

#### getServerName

    public String getServerName()

Description copied from interface: `ISQLServerDataSource`
Returns the name of the SQL Server instance.

Specified by:
  `getServerName` in interface `ISQLServerDataSource`
Returns:
  A String that contains the server name or null if no value is set.

#### setServerSpn

    public void setServerSpn(String serverSpn)

Description copied from interface: `ISQLServerDataSource`
Sets the server spn

Specified by:
  `setServerSpn` in interface `ISQLServerDataSource`
Parameters:
  `serverSpn` - A String that contains the server spn

#### getServerSpn

    public String getServerSpn()

Description copied from interface: `ISQLServerDataSource`
Returns the server spn

Specified by:
  `getServerSpn` in interface `ISQLServerDataSource`
Returns:
  A String that contains the server spn

#### setFailoverPartner

    public void setFailoverPartner(String serverName)

Description copied from interface: `ISQLServerDataSource`
Sets the name of the failover server that is used in a database mirroring configuration.

Specified by:
  `setFailoverPartner` in interface `ISQLServerDataSource`
Parameters:
  `serverName` - A String that contains the failover server name.

#### getFailoverPartner

    public String getFailoverPartner()

Description copied from interface: `ISQLServerDataSource`
Returns the name of the failover server that is used in a database mirroring configuration.

Specified by:
  `getFailoverPartner` in interface `ISQLServerDataSource`
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: `ISQLServerDataSource`
Sets the value of the multiSubnetFailover connection property.

Specified by:
  `setMultiSubnetFailover` in interface `ISQLServerDataSource`
Parameters:
  `multiSubnetFailover` - The new value of the multiSubnetFailover connection property.

#### getMultiSubnetFailover

    public boolean getMultiSubnetFailover()

Description copied from interface: `ISQLServerDataSource`
Returns the value of the multiSubnetFailover connection property.

Specified by:
  `getMultiSubnetFailover` in interface `ISQLServerDataSource`
Returns:
  Returns true or false, depending on the current setting of the connection property.

#### setUser

    public void setUser(String user)

Description copied from interface: `ISQLServerDataSource`
Sets the user name that is used to connect the data source.

Specified by:
  `setUser` in interface `ISQLServerDataSource`
Parameters:
  `user` - A String that contains the user name.

#### getUser

    public String getUser()

Description copied from interface: `ISQLServerDataSource`
Returns the user name that is used to connect the data source.

Specified by:
  `getUser` in interface `ISQLServerDataSource`
Returns:
  A String that contains the user name.

#### setWorkstationID

    public void setWorkstationID(String workstationID)

Description copied from interface: `ISQLServerDataSource`
Sets the name of the client computer name that is used to connect to the data source.

Specified by:
  `setWorkstationID` in interface `ISQLServerDataSource`
Parameters:
  `workstationID` - A String that contains the client computer name.

#### getWorkstationID

    public String getWorkstationID()

Description copied from interface: `ISQLServerDataSource`
Returns the name of the client computer name that is used to connect to the data source.

Specified by:
  `getWorkstationID` in interface `ISQLServerDataSource`
Returns:
  A String that contains the client computer name.

#### setXopenStates

    public void setXopenStates(boolean xopenStates)

Description copied from interface: `ISQLServerDataSource`
Sets a Boolean value that indicates if converting SQL states to XOPEN compliant states is enabled.

Specified by:
  `setXopenStates` in interface `ISQLServerDataSource`
Parameters:
  `xopenStates` - true if converting SQL states to XOPEN compliant states is enabled. Otherwise, false.

#### getXopenStates

    public boolean getXopenStates()

Description copied from interface: `ISQLServerDataSource`
Returns a boolean value that indicates if converting SQL states to XOPEN compliant states is enabled.

Specified by:
  `getXopenStates` in interface `ISQLServerDataSource`
Returns:
  true if converting SQL states to XOPEN compliant states is enabled. Otherwise, false.

#### setFIPS

    public void setFIPS(boolean fips)

#### getFIPS

    public boolean getFIPS()

#### setFIPSProvider

    public void setFIPSProvider(String fipsProvider)

#### getFIPSProvider

    public String getFIPSProvider()

#### setURL

    public void setURL(String url)

Description copied from interface: `ISQLServerDataSource`
Sets the URL that is used to connect to the data source.

Specified by:
  `setURL` in interface `ISQLServerDataSource`
Parameters:
  `url` - A String that contains the URL.

#### getURL

    public String getURL()

Description copied from interface: `ISQLServerDataSource`
Returns the URL that is used to connect to the data source.

Specified by:
  `getURL` in interface `ISQLServerDataSource`
Returns:
  A String that contains the URL.

#### setDescription

    public void setDescription(String description)

Description copied from interface: `ISQLServerDataSource`
Sets the description of the data source.

Specified by:
  `setDescription` in interface `ISQLServerDataSource`
Parameters:
  `description` - A String that contains the description.

#### getDescription

    public String getDescription()

Description copied from interface: `ISQLServerDataSource`
Returns a description of the data source.

Specified by:
  `getDescription` in interface `ISQLServerDataSource`
Returns:
  A String that contains the data source description or null if no value is set.

#### setPacketSize

    public void setPacketSize(int packetSize)

Description copied from interface: `ISQLServerDataSource`
Sets the current network packet size used to communicate with SQL Server, specified in bytes.

Specified by:
  `setPacketSize` in interface `ISQLServerDataSource`
Parameters:
  `packetSize` - An int value containing the network packet size.

#### getPacketSize

    public int getPacketSize()

Description copied from interface: `ISQLServerDataSource`
Returns the current network packet size used to communicate with SQL Server, specified in bytes.

Specified by:
  `getPacketSize` in interface `ISQLServerDataSource`
Returns:
  An int value containing the current network packet size.

#### setQueryTimeout

    public void setQueryTimeout(int queryTimeout)

#### getQueryTimeout

    public int getQueryTimeout()

#### setEnablePrepareOnFirstPreparedStatementCall

    public void setEnablePrepareOnFirstPreparedStatementCall(boolean enablePrepareOnFirstPreparedStatementCall)

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

    public boolean getEnablePrepareOnFirstPreparedStatementCall()

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

    public void setServerPreparedStatementDiscardThreshold(int serverPreparedStatementDiscardThreshold)

This setting 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

    public int getServerPreparedStatementDiscardThreshold()

This setting 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.

Returns:
  Returns the current setting per the description.

#### setSocketTimeout

    public void setSocketTimeout(int socketTimeout)

#### getSocketTimeout

    public int getSocketTimeout()

#### setJASSConfigurationName

    public void setJASSConfigurationName(String configurationName)

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

Parameters:
  `configurationName` -

#### getJASSConfigurationName

    public String getJASSConfigurationName()

Retrieves the login configuration file for Kerberos authentication.

Returns:

#### getReference

    public Reference getReference()

Specified by:
  `getReference` in interface `Referenceable`

#### isWrapperFor

    public boolean isWrapperFor(Class<?> iface)
                         throws SQLException

Specified by:
  `isWrapperFor` in interface `Wrapper`
Throws:
  `SQLException`

#### unwrap

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

Specified by:
  `unwrap` in interface `Wrapper`
Throws:
  `SQLException`