The user is not connected to a reliable SQL Server connection

I wrote code like this to connect sqlserver database.i to load the driver, but I am not getting the connection.

Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); System.out.println("class Loaded"); connection = DriverManager.getConnection( "jdbc:sqlserver://10.171.160.114:2001", "XXXXXX", "XXXXXX"); System.out.println("connected"); 

iam getting this error "The user is not connected to a reliable SQL Server connection" .. Please help me with this help. Thank you very much.

+4
source share
2 answers

The SQL server is configured to operate in "Windows Authentication Mode (Windows Authentication)" and does not allow the use of SQL accounts. Right-click on your SQL Server node in Management Studio and select Properties. In the dialog that appears, go to the security tab and make sure that "SQL Server and Windows Authentication mode" is selected

+10
source

This is likely due to the authentication mechanism used. See question for details.

For more information read here .

0
source

All Articles