Determines which authentication method the driver uses when establishing a connection. If the specified authentication method is not supported by the database server, the connection fails and the driver throws an exception.
Valid Values
auto | kerberos | ntlm | ntlmjava | userIdPassword
Behavior
If set to auto, the driver uses SQL Server authentication, Kerberos authentication, or NTLM authentication when establishing a connection. The driver selects an authentication method based on a combination of criteria, such as whether the application provides a user ID, the driver is running on a Windows platform, and the driver can load the DLL required for NTLM authentication. See Using the AuthenticationMethod Property for more information about using the default value.
If set to kerberos, the driver uses Kerberos authentication. The driver ignores any user ID or password specified. This value is supported only when connecting to Microsoft SQL Server 2000 or higher.
If set to ntlm, the driver uses NTLM authentication if the DLL required for NTLM authentication can be loaded. If the driver cannot load the DLL, the driver throws an exception. User ID and password are optional. If user ID and password are specified, those credentials will be used. Otherwise, the current OS user credentials will be used. This value is supported for Windows clients only.
If set to ntlmjava, the driver uses NTLM authentication, but requires a user ID and password to be specified. This value is supported for Windows and UNIX/Linux clients.
If set to userIdPassword, the driver uses SQL Server authentication when establishing a connection. If a user ID is not specified, the driver throws an exception.
Notes
If you specify AuthenticationMethod=ntlmjava, you must specify the name of the domain server that administers the database. You can specify the domain server using the Domain property. If the Domain property is not specified, the driver tries to determine the domain server from the User property. If the driver cannot determine the domain server name, it throws an exception.
The User property provides the user ID. The Password property provides the password.
The values type4, type2, and none are deprecated, but are recognized for backward compatibility. Use the kerberos, ntlm, and userIdPassword value, respectively, instead.
NTLM authentication requires Microsoft SQL Server 2000, Service Pack 3 or higher.