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.  [ 5 posts ] 
Author Message
 Post subject: how can i configure hibernate with Microsoft SQL Server
PostPosted: Wed Nov 16, 2005 7:12 am 
Newbie

Joined: Sat Nov 12, 2005 1:12 am
Posts: 4
Location: Islamabad, Pakistan
can anyone guide me how can i configure my project so hibernate can work with Microsoft SQL Server as it is working fine with Oracle, I am using Tomcat 5.0.18 and Hibernate 3.0.3.

i mean changes in server.xml and hibernate.cfg.xml

Thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 16, 2005 7:21 am 
Regular
Regular

Joined: Wed Feb 02, 2005 6:33 am
Posts: 70
Documentation:

Configure JDBC Connections

[url=http://www.hibernate.org/hib_docs/v3/reference/en/html/session-configuration.html#configuration-optional-dialects]DB Dialects available in Hibernate[url]


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 16, 2005 7:22 am 
Regular
Regular

Joined: Wed Feb 02, 2005 6:33 am
Posts: 70
Forgot slash

DB Dialects available in Hibernate


Top
 Profile  
 
 Post subject: thanks but this gies only dialect what about server.xml
PostPosted: Wed Nov 16, 2005 7:51 am 
Newbie

Joined: Sat Nov 12, 2005 1:12 am
Posts: 4
Location: Islamabad, Pakistan
thanks sir,
but this is only dialect for Microsoft SQL Server. now how to set the Server.xml following prperties parameters

1) factory
2) driverClassName
3) url

thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 16, 2005 8:07 am 
Regular
Regular

Joined: Wed Feb 02, 2005 6:33 am
Posts: 70
Using tomcat datasource or hibernate managed connections? If the latter, then see the first link above.

If using tomcat datasource, some examples for other databases are at Tomcat Documentation

The format for MSSql values using the MS JDBC driver is:

Code:
url=jdbc:microsoft:sqlserver://host:1433;DatabaseName=dbname;SelectMethod=cursor
driverclass=com.microsoft.jdbc.sqlserver.SQLServerDriver


If you're using other drivers, consult the driver documentation for these values.

(If this helped, please rate)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.