SQLException: this driver is not configured for integrated authentication tomcat

后端 未结 2 1236
执笔经年
执笔经年 2020-12-07 02:05

Am trying to connect MS SQL server through java web applications.

Class.forName(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\");

connection= DriverManager         


        
2条回答
  •  庸人自扰
    2020-12-07 02:58

    The JDBC driver supports the use of Type 2 integrated authentication on Windows operating systems through the integratedSecurity connection string property. To use integrated authentication, copy the sqljdbc_auth.dll file to a directory on the Windows system path on the computer where the JDBC driver is installed.

    Alternatively you can set the java.libary.path system property to specify the directory of the sqljdbc_auth.dll. For example, if the JDBC driver is installed in the default directory, you can specify the location of the DLL by using the following virtual machine (VM) argument when the Java application is started:

    -Djava.library.path=c:/sqljdbc_/enu/auth/x86
    

    or

    -Djava.library.path=c:/sqljdbc_/enu/auth/x64
    

    Please read more about in the original documentation: https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-2017

提交回复
热议问题