JG Vimalan's Blog

It is all about coding!

Re-distribute Oracle dll’s to Production/Client system via .NET setup application

I got a client requirement where a .NET setup has to be installed in several users system. This .NET setup installs a console application which connects to Oracle database and performs some action. In development environment, we have installed Oracle 11g client and it is must for connecting to Oracle database. But, it is not possible to request users, who are going to use the application to install Oracle client software in their system. So, I decided to re-distribute necessary Oracle dll’s to every user’s systems via the .NET setup project. By this way, user’s are no longer required to install Oracle client in their system to connect to Oracle database. Inorder to achieve that,

Add the following Oracle dll’s in the .NET setup project’s ‘Application Folder’.

oci.dll
oraociei11.dll
OraOps11w.dll
orannzsbb11.dll
Oracle.DataAccess.dll

I got the above dll’s from my development system where I have installed Oracle 11g client. The dll’s will be available under the “product\11.2.0\client_1” location in Oracle installation directory. After adding the dll’s, your setup project will look as shown below,

Thats all. Now, install the .NET setup in any user’s system and you will find that, the necessary oracle dll’s are copied to the installation directory and your application is able to connect to target Oracle database, even without the Oracle client installed.

Advertisements

April 1, 2011 - Posted by | .NET Installer, Oracle

6 Comments »

  1. Really useful information. Your blog contains some great posts as well! good.

    Comment by henry | April 5, 2011 | Reply

  2. i ve tried this for 64 bit application by copying above mentioned oracle dlls for 64 bit, but i’m getting the ‘Type Initializer’ error, Please advise me how to do this for 64 bit.

    Comment by Yoosuf shanij | April 6, 2011 | Reply

    • Please use the Oracle 11g client (64 bit) dll’s in your .NET setup project. Let me know if you still have issues. Also, please paste the complete error details for further analysis.

      Comment by jgvimalan | April 6, 2011 | Reply

  3. Hi,

    Thanks a lot for posting this. I was looking for the same exact solution. It worked!

    thanks,

    Comment by Muthu Kumar | April 6, 2011 | Reply

  4. I liked your article is an interesting technology
    thanks to google I found you

    Comment by google | August 21, 2011 | Reply

  5. Great idea!
    Thank you very much for writing in blog.
    regards,
    Vivek

    Comment by Vivek | August 23, 2011 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: