To All,
So based on this post, what I came across so far is that most
of developers think that in order to connect to oracle, you need
oracle client installed. This is not correct as I just across this
issue where we couldn't install anything on client becasue of security
reasons.
So now I'm gonna share this knowledge so that you guys won't have
to go thru the trouble I had to.
1 - Download the Oracle Instant Clent (you only need the lite version)
and extract it somewhere
http://www.oracle.com/technology/software/htdocs/client_lic.html?url=http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winsoft.html
2 - You have two options. You can either user System.Data.OracleCleint
or Oracle.DataAccess. I am using System.Data.OracleCleint. So to use
System.Data.OracleClient, define your configuration like this
<property
name="connection.driver_class">NHibernate.Driver.OracleClientDriver</
property>
3 - Copy the following files from the oracle instant client direction
you downloaded where your executable file is
oci.dll
orannzsbb11.dll
oraocci11.dll
oraociicus11.dll
4 - Add a new file named Oracle.Key and add this in that file
SOFTWARE\ORACLE\KEY_OraOdac11g_home2
That's it. You are all set. Remember that I'm using
system.Data.OracleCleint not Oracle.DataAccess.
Hope this helps.