MS SQL Server and JDBC: closed connection

前端 未结 3 1165
南笙
南笙 2021-01-17 23:25

Im getting

I/O Error: DB server closed connection.

while connecting to MS SQL server 2008 from java code .

3条回答
  •  情书的邮戳
    2021-01-17 23:47

    You have problems in your connection strings

    For jTDS:

    jdbc:jtds:sqlserver://machineName:1433;databaseName=DB;useNTLMv2=tru‌​e;domain=workgroup

    You may read http://jtds.sourceforge.net/faq.html#windowsAuth for the required Single-Sign-On library for NTLM to work.

    "integratedSecurity=true" that you supplied for jdts is valid when using the JDBC driver

    jdbc:sqlserver://machine:1433;instance=SQLEXPRESS;databaseName=db;integratedSecurity=true

提交回复
热议问题