title: Using windows authentication in sqlserver with a different user than the logged in user
body: <p>I have been so far using jtds driver for sqlserver using the following connection string.</p>
  
  <pre><code>jdbc:jtds:sqlserver://hostname:15001;databaseName=MYDB1;useNTLMv2=true;domain=CORP;
  </code></pre>
  
  <p>Note that database is using windows authentication. However the domain, username and password will be supplied.</p>
  
  <p>However jtds driver had some issues saving in varchar(MAX) field using hibernate. Hence decided to switch to Microsoft's sqljdbc4.jar driver.</p>
  
  <p>I have tried the format using "Integrated Security=true;" however it uses the logged in user where the application is running. I am not able to specify a different domain and user. </p>
  
  <p>Is there a solution for this?</p>