title: connecting sql server using jtds windows authentication from java
body: <p>I am facing problem with below connection string for java program to connect to windows authenticated login for sql server.
  My system is 64 bit , so added the ntlmauth.dll from x64/sso/ to classpath</p>
  
  <pre><code>jdbc:jtds:sqlserver://192.168.180.12:1433/product;useNTLMv2=true;user=sql_user;password=sql_pass;domain=SQLEXPRESS
  </code></pre>
  
  <p>It throws "<strong>java.sql.SQLException: Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.</strong>" exception.</p>
  
  <p>I verified lot of Q&amp;A from StackOverflow : changing 127.0.0.1 to localhost,using useNTLMv2 nothing helps me .</p>
  
  <p><strong>PS:</strong><br>
  Please use <strong>sql_user</strong> for mentioning sql username <strong>sql_pass</strong> for sql password. <strong>win_user</strong> for windows username and <strong>win_pass</strong> for windows password.
  Its confusing in lot of post what to use at where.</p>