0

I created an C# application which needs to connect to an oracle database and I want to use the OBDC connection to achieve this. The version of the database is Oracle Database 11g Release 11.1.0.7.0 - 64bit Production.

I read this post: How can I deploy a .NET application that uses ODAC without installing the whole component to the user?

I know that I do not need to install the oracle client but only the driver for OBDC. I spent much time searching for a step-by-step tutorial (which is up-to-date) on how to install and use the right drivers.

So here are my questions:

Community
  • 1
  • 1
Thomas
  • 330
  • 2
  • 13
  • I have edited your title. Please see, "[Should questions include “tags” in their titles?](http://meta.stackoverflow.com/questions/19190/)", where the consensus is "no, they should not". – John Saunders May 05 '14 at 13:31
  • @anbuj I tried it now and saw that the oracle database that can be selected there is deprecated. – Thomas May 07 '14 at 09:59

1 Answers1

0

You must understand the ODBC principles: if you use ODBC, you don't have to do anything with oracle. The Oracle end-user db/interface will be hidden by ODBC. You will just provide the connection string (3 params: service, user, passwd)

If you want to use oracle with ODBC:

John Saunders
  • 160,644
  • 26
  • 247
  • 397
norisknofun
  • 859
  • 1
  • 8
  • 24
  • I installed the ODAC_xCopy (all components) as it is described in the readme.html. It seemed to work as the install directory was created as expected. I added the two directories oracle and oracle/bin to the system "Path" variable and made a restart. Unfortunately there wasn't any new driver which I could select in your second step. Drivers available are "SQL Server: SQLSRV32.DLL" and "SQL Server native client 11.0: SQLNCLI11.DLL" – Thomas May 07 '14 at 09:55
  • Very curious. Try via Excel : "data / import external data / New database query / ". Set a name and try to look for your oracle driver on the list. – norisknofun May 07 '14 at 12:36
  • There is a _Microsoft OLE DB Provider for Oracle_ available. But when I type in the credentials and test the connection an error message appears: _Oracle Client- and Network connection were not found [..] You have to install the components_ – Thomas May 07 '14 at 12:48
  • Ok. The driver oracle should be named "Oracle 12g blabla" and should be last one of the list. I know Oracle client historically had problems with 64bits versions. May be you could try to install 1) the same package but 32-bits or 2) the instant client. This should not be necessary but it may work. – norisknofun May 07 '14 at 13:13
  • I installed the instant client (basic + odbc) and I see now the Oracle instant client driver in ODBC Data sources. But I cannot create a data source from this driver because it says that the file sqoras32.dll is missing in C:\oracle\instantclient_12_1 even though the file IS there?! – Thomas May 12 '14 at 11:28
  • Add the place of dlls in the PATH variable (C:\oracle\instantclient_12_1 I guess). – norisknofun May 12 '14 at 19:01
  • I already had added the directory with the DLLs to the PATH variable. I controlled it again now: _C:\oracle\instantclient_12_1_ is the directory and _C:\oracle\instantclient_12_1;_ is at the beginning of PATH variable. – Thomas May 14 '14 at 08:53
  • Do you have a ORACLE_HOME ver set up ? – norisknofun May 15 '14 at 09:19