Connect to SQL Server from Linux via JDBC using integratedSecurity (Windows authentication)?

前端 未结 4 1804
情话喂你
情话喂你 2020-12-15 22:30

Hey I am having trouble connecting to an SQL Server with Java code that is running on Linux.

If I set integratedSecurity=true, then the java code fails

4条回答
  •  感情败类
    2020-12-15 23:01

    If you dont want Integrated Security connection, then set that parameter to false and instead provide user and password in the connURL as below:

    String connectionUrl = "jdbc:sqlserver://localhost:port;databaseName=DB_NAME;integratedSecurity=false;user=login_user;password=login_pwd;";
    

提交回复
热议问题