Windows Authentication for SQL Server using JBDC on a Mac

后端 未结 6 895
小蘑菇
小蘑菇 2021-02-01 07:21

Is it possible to connect to SQL Server using Windows authentication/integrated security from a Mac? I am using the type 4 JDBC driver provided by Microsoft. The front end (a fo

6条回答
  •  梦毁少年i
    2021-02-01 07:48

    I use jTDS on a mac (10.9).

    Using this driver you need to specify the username and password like always, the only difference is that you need to specify domain=WHATEVERTHENTDOMAIN in the connection string (or connection properties if you rather).

    So a sample connection string is:

    jdbc:jtds:sqlserver://db_server:1433/DB_NAME;domain=NT_DOMAIN_NAME
    

    The jTDS driver then uses NTLM to login to the specified domain with the username and password.

提交回复
热议问题