Reputation: 35
I am trying to connect to my database using JDBC driver. I have to use my another windows domain credential to connect and getting login failed error. Thought of testing it with my actual windows credential and it worked. I have used integratedSecurity = true.
String connectionUrl = "jdbc:sqlserver://server;databaseName=DB;integratedSecurity=true";
My desired connection string to use my another windows domain credential looks like the below:
String connectionUrl = "jdbc:sqlserver://server;databaseName=DB;user=domain\\user;password=test!123;"
I did the following things and in need of help:
Upvotes: 0
Views: 339
Reputation: 159114
Using the Microsoft JDBC driver, you can:
user
and password
integratedSecurity=true
, which will use the Windows user that is running the Java programIf you want to do a simple NTLM connect using domain
, user
and password
, then you need to use the jTDS JDBC driver.
Upvotes: 2