I need to connect to SQL Server using Windows Authentication with different user account in JDBC. This is the code I am using:
static final String DB_URL = "jdbc:sqlserver://IP:port; databaseName=xyz; integratedSecurity=false; domain=abc";
Connection con = DriverManager.getConnection(DB_URL,USER,PASS);
And here is the Error:
com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user 'abcd'