Configuring Authentication

Connections to SQL Server require authentication. You can authenticate the connection using your SQL Server user account, the Kerberos protocol, or the NTLM protocol.

You can set the connection properties described below in a connection string or in a DSN (in the odbc.ini file). Settings in the connection string take precedence over settings in the DSN.

Note: For some of the connection properties mentioned in the instructions below, the connector accepts variant spellings of the property name. Specifically:
  • The connector accepts both Integrated_Security and Integrated Security.
  • The connector accepts both Server_SPN and ServerSPN.

Using a User Account

You can authenticate the connection by providing your user name and password for accessing the SQL Server instance.

To configure authentication using a user account:

  1. Set the Trusted_Connection property to false.
  2. Set the Integrated_Security property to false.
  3. Set the UID property to an appropriate user name for accessing the server.
  4. Set the PWD property to the password corresponding to the user name that you provided above.

Using Kerberos

You can authenticate the connection by using the Kerberos protocol.

To configure authentication using Kerberos:

  1. Set the Trusted_Connection property to true.
  2. Set the Integrated_Security property to true.
  3. Set the Server_SPN property to the service principal name of the SQL Server instance.
    Note: If you do not set the Server_SPN property, the connector uses MSSQLSvc/[HostName]:[Port] as the service principal name, where [HostName] is the IP address or host name of the server and [Port] is the number of the port that you are connecting to.

Using NTLM

You can authenticate the connection by using the NTLM protocol.

To configure authentication using NTLM:

  1. Set the Trusted_Connection property to NTLM or to NTLMv2 for NTLMv2.
  2. Set the Integrated_Security property to true.
  3. Set the UID property to an appropriate user name for accessing the server.
  4. Set the PWD property to the password corresponding to the user name that you provided above.