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

### Method Summary

All Methods Instance Methods Concrete Methods
`String` `getAccessToken()`
`String` `getApplicationIntent()`
`String` `getApplicationName()`
`String` `getAuthentication()`
`String` `getColumnEncryptionSetting()`
`Connection` `getConnection()`
`Connection` `getConnection(String username, String password)`
`String` `getDatabaseName()`
`String` `getDescription()`
`boolean` `getEncrypt()`
`String` `getFailoverPartner()`
`String` `getHostNameInCertificate()`
`String` `getInstanceName()`
`String` `getKeyStoreAuthentication()`
`String` `getKeyStoreLocation()`
`boolean` `getLastUpdateCount()`
`int` `getLockTimeout()`
`int` `getLoginTimeout()`
`PrintWriter` `getLogWriter()`
`boolean` `getMultiSubnetFailover()`
`int` `getPacketSize()`
`Logger` `getParentLogger()`
`int` `getPortNumber()`
`Reference` `getReference()`
`String` `getResponseBuffering()`
`String` `getSelectMethod()`
`boolean` `getSendStringParametersAsUnicode()`
`boolean` `getSendTimeAsDatetime()`
`String` `getServerName()`
`boolean` `getServerNameAsACE()`
`String` `getServerSpn()`
`boolean` `getTransparentNetworkIPResolution()`
`boolean` `getTrustServerCertificate()`
`String` `getTrustStore()`
`String` `getURL()`
`String` `getUser()`
`String` `getWorkstationID()`
`boolean` `getXopenStates()`
`boolean` `isWrapperFor(Class<?> iface)`
`void` `setAccessToken(String accessToken)`
`void` `setApplicationIntent(String applicationIntent)`
`void` `setApplicationName(String applicationName)`
`void` `setAuthentication(String authentication)`
`void` `setAuthenticationScheme(String authenticationScheme)`
`void` `setColumnEncryptionSetting(String columnEncryptionSetting)`
`void` `setDatabaseName(String databaseName)`
`void` `setDescription(String description)`
`void` `setEncrypt(boolean encrypt)`
`void` `setFailoverPartner(String serverName)`
`void` `setHostNameInCertificate(String host)`
`void` `setInstanceName(String instanceName)`
`void` `setIntegratedSecurity(boolean enable)`
`void` `setKeyStoreAuthentication(String keyStoreAuthentication)`
`void` `setKeyStoreLocation(String keyStoreLocation)`
`void` `setKeyStoreSecret(String keyStoreSecret)`
`void` `setLastUpdateCount(boolean lastUpdateCount)`
`void` `setLockTimeout(int lockTimeout)`
`void` `setLoginTimeout(int loginTimeout)`
`void` `setLogWriter(PrintWriter out)`
`void` `setMultiSubnetFailover(boolean multiSubnetFailover)`
`void` `setPacketSize(int packetSize)`
`void` `setPassword(String password)`
`void` `setPortNumber(int portNumber)`
`void` `setResponseBuffering(String respo)`
`void` `setSelectMethod(String selectMethod)`
`void` `setSendStringParametersAsUnicode(boolean sendStringParametersAsUnicode)`
`void` `setSendTimeAsDatetime(boolean sendTimeAsDatetime)`
`void` `setServerName(String serverName)`
`void` `setServerNameAsACE(boolean serverNameAsACE)`
`void` `setServerSpn(String serverSpn)`
`void` `setTransparentNetworkIPResolution(boolean tnir)`
`void` `setTrustServerCertificate(boolean e)`
`void` `setTrustStore(String st)`
`void` `setTrustStorePassword(String p)`
`void` `setURL(String url)`
`void` `setUser(String user)`
`void` `setWorkstationID(String workstationID)`
`void` `setXopenStates(boolean xopenStates)`
`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()

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

Specified by:
  `setApplicationName` in interface `ISQLServerDataSource`

#### getApplicationName

    public String getApplicationName()

Specified by:
  `getApplicationName` in interface `ISQLServerDataSource`

#### setDatabaseName

    public void setDatabaseName(String databaseName)

Specified by:
  `setDatabaseName` in interface `ISQLServerDataSource`

#### getDatabaseName

    public String getDatabaseName()

Specified by:
  `getDatabaseName` in interface `ISQLServerDataSource`

#### setInstanceName

    public void setInstanceName(String instanceName)

Specified by:
  `setInstanceName` in interface `ISQLServerDataSource`

#### getInstanceName

    public String getInstanceName()

Specified by:
  `getInstanceName` in interface `ISQLServerDataSource`

#### setIntegratedSecurity

    public void setIntegratedSecurity(boolean enable)

Specified by:
  `setIntegratedSecurity` in interface `ISQLServerDataSource`

#### setAuthenticationScheme

    public void setAuthenticationScheme(String authenticationScheme)

Specified by:
  `setAuthenticationScheme` in interface `ISQLServerDataSource`

#### setAuthentication

    public void setAuthentication(String authentication)

#### getAuthentication

    public String getAuthentication()

#### setAccessToken

    public void setAccessToken(String accessToken)

#### getAccessToken

    public String getAccessToken()

#### setColumnEncryptionSetting

    public void setColumnEncryptionSetting(String columnEncryptionSetting)

#### getColumnEncryptionSetting

    public String getColumnEncryptionSetting()

#### setKeyStoreAuthentication

    public void setKeyStoreAuthentication(String keyStoreAuthentication)

#### getKeyStoreAuthentication

    public String getKeyStoreAuthentication()

#### setKeyStoreSecret

    public void setKeyStoreSecret(String keyStoreSecret)

#### setKeyStoreLocation

    public void setKeyStoreLocation(String keyStoreLocation)

#### getKeyStoreLocation

    public String getKeyStoreLocation()

#### setLastUpdateCount

    public void setLastUpdateCount(boolean lastUpdateCount)

Specified by:
  `setLastUpdateCount` in interface `ISQLServerDataSource`

#### getLastUpdateCount

    public boolean getLastUpdateCount()

Specified by:
  `getLastUpdateCount` in interface `ISQLServerDataSource`

#### setEncrypt

    public void setEncrypt(boolean encrypt)

Specified by:
  `setEncrypt` in interface `ISQLServerDataSource`

#### getEncrypt

    public boolean getEncrypt()

Specified by:
  `getEncrypt` in interface `ISQLServerDataSource`

#### setTransparentNetworkIPResolution

    public void setTransparentNetworkIPResolution(boolean tnir)

#### getTransparentNetworkIPResolution

    public boolean getTransparentNetworkIPResolution()

#### setTrustServerCertificate

    public void setTrustServerCertificate(boolean e)

Specified by:
  `setTrustServerCertificate` in interface `ISQLServerDataSource`

#### getTrustServerCertificate

    public boolean getTrustServerCertificate()

Specified by:
  `getTrustServerCertificate` in interface `ISQLServerDataSource`

#### setTrustStore

    public void setTrustStore(String st)

Specified by:
  `setTrustStore` in interface `ISQLServerDataSource`

#### getTrustStore

    public String getTrustStore()

Specified by:
  `getTrustStore` in interface `ISQLServerDataSource`

#### setTrustStorePassword

    public void setTrustStorePassword(String p)

Specified by:
  `setTrustStorePassword` in interface `ISQLServerDataSource`

#### setHostNameInCertificate

    public void setHostNameInCertificate(String host)

Specified by:
  `setHostNameInCertificate` in interface `ISQLServerDataSource`

#### getHostNameInCertificate

    public String getHostNameInCertificate()

Specified by:
  `getHostNameInCertificate` in interface `ISQLServerDataSource`

#### setLockTimeout

    public void setLockTimeout(int lockTimeout)

Specified by:
  `setLockTimeout` in interface `ISQLServerDataSource`

#### getLockTimeout

    public int getLockTimeout()

Specified by:
  `getLockTimeout` in interface `ISQLServerDataSource`

#### setPassword

    public void setPassword(String password)

Specified by:
  `setPassword` in interface `ISQLServerDataSource`

#### setPortNumber

    public void setPortNumber(int portNumber)

Specified by:
  `setPortNumber` in interface `ISQLServerDataSource`

#### getPortNumber

    public int getPortNumber()

Specified by:
  `getPortNumber` in interface `ISQLServerDataSource`

#### setSelectMethod

    public void setSelectMethod(String selectMethod)

Specified by:
  `setSelectMethod` in interface `ISQLServerDataSource`

#### getSelectMethod

    public String getSelectMethod()

Specified by:
  `getSelectMethod` in interface `ISQLServerDataSource`

#### setResponseBuffering

    public void setResponseBuffering(String respo)

Specified by:
  `setResponseBuffering` in interface `ISQLServerDataSource`

#### getResponseBuffering

    public String getResponseBuffering()

Specified by:
  `getResponseBuffering` in interface `ISQLServerDataSource`

#### setApplicationIntent

    public void setApplicationIntent(String applicationIntent)

Specified by:
  `setApplicationIntent` in interface `ISQLServerDataSource`

#### getApplicationIntent

    public String getApplicationIntent()

Specified by:
  `getApplicationIntent` in interface `ISQLServerDataSource`

#### setSendTimeAsDatetime

    public void setSendTimeAsDatetime(boolean sendTimeAsDatetime)

Specified by:
  `setSendTimeAsDatetime` in interface `ISQLServerDataSource`

#### getSendTimeAsDatetime

    public boolean getSendTimeAsDatetime()

Specified by:
  `getSendTimeAsDatetime` in interface `ISQLServerDataSource`

#### setSendStringParametersAsUnicode

    public void setSendStringParametersAsUnicode(boolean sendStringParametersAsUnicode)

Specified by:
  `setSendStringParametersAsUnicode` in interface `ISQLServerDataSource`

#### getSendStringParametersAsUnicode

    public boolean getSendStringParametersAsUnicode()

Specified by:
  `getSendStringParametersAsUnicode` in interface `ISQLServerDataSource`

#### setServerNameAsACE

    public void setServerNameAsACE(boolean serverNameAsACE)

#### getServerNameAsACE

    public boolean getServerNameAsACE()

#### setServerName

    public void setServerName(String serverName)

Specified by:
  `setServerName` in interface `ISQLServerDataSource`

#### getServerName

    public String getServerName()

Specified by:
  `getServerName` in interface `ISQLServerDataSource`

#### setServerSpn

    public void setServerSpn(String serverSpn)

Specified by:
  `setServerSpn` in interface `ISQLServerDataSource`

#### getServerSpn

    public String getServerSpn()

Specified by:
  `getServerSpn` in interface `ISQLServerDataSource`

#### setFailoverPartner

    public void setFailoverPartner(String serverName)

Specified by:
  `setFailoverPartner` in interface `ISQLServerDataSource`

#### getFailoverPartner

    public String getFailoverPartner()

Specified by:
  `getFailoverPartner` in interface `ISQLServerDataSource`

#### setMultiSubnetFailover

    public void setMultiSubnetFailover(boolean multiSubnetFailover)

Specified by:
  `setMultiSubnetFailover` in interface `ISQLServerDataSource`

#### getMultiSubnetFailover

    public boolean getMultiSubnetFailover()

Specified by:
  `getMultiSubnetFailover` in interface `ISQLServerDataSource`

#### setUser

    public void setUser(String user)

Specified by:
  `setUser` in interface `ISQLServerDataSource`

#### getUser

    public String getUser()

Specified by:
  `getUser` in interface `ISQLServerDataSource`

#### setWorkstationID

    public void setWorkstationID(String workstationID)

Specified by:
  `setWorkstationID` in interface `ISQLServerDataSource`

#### getWorkstationID

    public String getWorkstationID()

Specified by:
  `getWorkstationID` in interface `ISQLServerDataSource`

#### setXopenStates

    public void setXopenStates(boolean xopenStates)

Specified by:
  `setXopenStates` in interface `ISQLServerDataSource`

#### getXopenStates

    public boolean getXopenStates()

Specified by:
  `getXopenStates` in interface `ISQLServerDataSource`

#### setURL

    public void setURL(String url)

Specified by:
  `setURL` in interface `ISQLServerDataSource`

#### getURL

    public String getURL()

Specified by:
  `getURL` in interface `ISQLServerDataSource`

#### setDescription

    public void setDescription(String description)

Specified by:
  `setDescription` in interface `ISQLServerDataSource`

#### getDescription

    public String getDescription()

Specified by:
  `getDescription` in interface `ISQLServerDataSource`

#### setPacketSize

    public void setPacketSize(int packetSize)

Specified by:
  `setPacketSize` in interface `ISQLServerDataSource`

#### getPacketSize

    public int getPacketSize()

Specified by:
  `getPacketSize` in interface `ISQLServerDataSource`

#### 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`