I have to develop a tool in C# that retrieves some data from an Oracle DB. Since our IT support is having some trouble with installing the Oracle client, I want to be able to connect to the database without the client installed. The idea is to just install (and maybe register) an additional library together with the app.
Which alternatives to the Oracle client exist, and what are their pros and cons?
This is for a small application (1 form, 2 or 3 queries, the result displayed in a DataGrid, probably no more than 10-20 data sets), but I am also interested in scalability issues, since we may also move away from the Oracle client with bigger future projects.
Of course a freeware solution would be nice, but we are not limited to that.
Your task can be achieved without the need of any third party software:
Allow your application to connect without the use of TNSNAMES.ORA. To do so, you have to include the connect descriptor in the connection string:
"user id=scott;password=tiger;data source=" + "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)" + "(HOST=sales-server)(PORT=1521))(CONNECT_DATA="+ "(SERVICE_NAME=sales.us.acme.com)))"
Since you are including the connect descriptor in the connection string, the thin client is not required in the targeted computers.
Happy deployment.
There are a couple different flavors of the Oracle ODP.Net driver. Which version are you trying to use?
It sounds like you want the Oracle 11g ODAC 11.1.0.6.21 with Xcopy Deployment, which allows you to deploy the Oracle Instant Client and the ODP.Net driver just by copying a few DLLs over and registering them. That doesn't require a full-blown Oracle client installation.
Oracle currently has a version of ODP.NET that is fully managed, allowing developers to connect to Oracle databases while referencing only a single DLL. There's more information here.
Current releases can be found here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With