-->
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.  [ 4 posts ] 
Author Message
 Post subject: NHibernate with Oracle
PostPosted: Thu Mar 30, 2006 5:07 pm 
Newbie

Joined: Thu Mar 30, 2006 5:01 pm
Posts: 1
Can anyone help me with Connection string and settings that are required for Oracle 9i

Thanks in advance..

indrani.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 30, 2006 6:19 pm 
Expert
Expert

Joined: Mon Jan 09, 2006 5:01 pm
Posts: 311
Location: Sacramento, CA
put in your hibernate.properties:

#hibernate.dialect=org.hibernate.dialect.Oracle9Dialect
hibernate.dialect=org.hibernate.dialect.OracleDialect
hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver
hibernate.connection.username=jt
hibernate.connection.password=xxx
hibernate.connection.url=jdbc:oracle:thin:@
hibernate.show_sql=true

_________________
-JT

If you find my replies helpful, please rate by clicking 'Y' on them. I appreciate it.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 31, 2006 12:18 am 
Contributor
Contributor

Joined: Thu May 12, 2005 8:45 am
Posts: 226
I don't think a jdbc driver is going to help NHibernate. :D

Sorry I couldn't give a helpful answer, but it's been 6 months + since I used Oracle and I don't have the code in front of me.

http://www.connectionstrings.com/


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 31, 2006 4:13 am 
Newbie

Joined: Thu May 19, 2005 6:04 am
Posts: 14
Location: Glasgow, UK
Here's what I use onto Oracle 9:

<nhibernate>
<add key="hibernate.connection.provider" value="NHibernate.Connection.DriverConnectionProvider" />
<add key="hibernate.dialect" value="NHibernate.Dialect.Oracle9Dialect" />
<add key="hibernate.connection.driver_class" value="NHibernate.Driver.OracleDataClientDriver" />
<add key="hibernate.connection.connection_string" value="Data source=(TNSNAMEHERE);User Id=(USERID);Password=(PASSWORD);" />
</nhibernate>

This is using the Oracle ODP client, change OracleDataClientDriver to OracleClientDriver to use the MS variety.


Hope this helps

Mark


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