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.
- The connector accepts both
Integrated_SecurityandIntegrated Security. - The connector accepts both
Server_SPNandServerSPN.
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:
- Set the
Trusted_Connectionproperty tofalse. - Set the
Integrated_Securityproperty tofalse. - Set the
UIDproperty to an appropriate user name for accessing the server. - Set the
PWDproperty 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:
- Set the
Trusted_Connectionproperty totrue. - Set the
Integrated_Securityproperty totrue. - Set the
Server_SPNproperty to the service principal name of the SQL Server instance.Note: If you do not set theServer_SPNproperty, the connector usesMSSQLSvc/[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:
- Set the
Trusted_Connectionproperty toNTLMor toNTLMv2for NTLMv2. - Set the
Integrated_Securityproperty totrue. - Set the
UIDproperty to an appropriate user name for accessing the server. - Set the
PWDproperty to the password corresponding to the user name that you provided above.