Using JDBC just by passing integrated security=true in connection string, i am able to connect to database even without username and password.
I have also tried datadirect, jtds drivers, they r working in jdbc but not in hibernate . Any suggestions on this??
in jdbc
Connection C = DriverManager.getConnection("jdbc:jtds:sqlserver://192.111.1.1:1433;DatabaseName=XXX");
Connection C = DriverManager.getConnection("jdbc:jtds:sqlserver://192.111.11:1433;DatabaseName=XXX;integrated security=true");
this worked but in hibernate i have tried the following tags
<property name="hibernate.connection.url">jdbc:jtds:sqlserver://192.111.1.1:1433;databaseName=XXX;useNTLMv2=true;</property>
<property name="hibernate.connection.url">jdbc:jtds:sqlserver://192.111.1.1:1433;databaseName=XXX;Integrated Security=true;</property>
Datadirect driver <property name="hibernate.connection.url">jdbc:datadirect:sqlserver://192.111.1.1:1433;databaseName=XXX;AuthenticationMethod=Type4</property> or AuthenticationMethod=auto
Please suggest how to implement in hibernate
I use Hibernate for connecting the MsSql DB. Normally we give the User Name and Password in hibernate.cfg.xml file for connecting to db. Here i need to use the Windows Authentication. If the Windows Authentication is on I need to get the Un & Pw of the windows and access the db. How to achieve this?
This should be just like "Use Windows Authentication or Use SQL Server Authentication" options in Copy Data Base Wizard for SQL server .
I use tomcat 6 server
|