Skip to main content

Posts

Showing posts from March, 2015

How to enable MSSQL "Integrated Security" for Hibernate

1. Hibernate config file: <property name="connection.driver_class">com.microsoft.sqlserver.jdbc.SQLServerDriver</property>         <property name="connection.url">jdbc:sqlserver://hostname;databaseName=test_DB;failoverPartner=hostname_backup\MSSQLSERVER;integratedSecurity=true;pooling=true;</property> 2. download the jdbc driver from http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=11774 3. extra the file and get {installedDir}\sqljdbc_4.0\enu\auth\x64\sqljdbc_auth.dll for my x64 pc. 4. add -Djava.library.path="{installedDir}\sqljdbc_4.0\enu\auth\x64\" when execute java command.