I have been so far using jtds driver for sqlserver using the following connection string.
jdbc:jtds:sqlserver://hostname:15001;databaseName=MYDB1;useNTLMv2=true;domain=CORP;
Note that database is using windows authentication. However the domain, username and password will be supplied.
However jtds driver had some issues saving in varchar(MAX) field using hibernate. Hence decided to switch to Microsoft's sqljdbc4.jar driver.
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.
Is there a solution for this?