-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Need to use Windows Authentication
PostPosted: Wed Jul 09, 2008 2:20 am 
Newbie

Joined: Wed Jul 09, 2008 2:10 am
Posts: 5
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


Top
 Profile  
 
 Post subject: need help windows authentication in hibernate
PostPosted: Fri Aug 29, 2008 2:04 am 
Newbie

Joined: Thu Aug 28, 2008 12:09 am
Posts: 1
Location: bangalore
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 jboss server

_________________
Thanks & Regards

Rajkiran


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.