Understanding Oracle Database and ODAC Installation

I want to use Oracle XE DB in my ASP.NET MVC project. I installed Oracle 11g XE on the same machine where VS is running. Installation completed successfully in C: \ oraclexe. Everything, as expected, I was able to connect to the database through Server Explorer using the default oracle data access provider. But I want to use ODP.NET, so I installed ODP.NET + ODT in C: \ app. Here is the first confusing thing. The directory structure C: \ oraclexe .. \ server and C: \ app .. \ client_1 is similar. Both have the NETWORK \ ADMIN folder, where Tnsnames.ora is located. I understand that the client is used to connect to the database, but:

  • What Tnsname.ora will be used to connect to the database?
  • Oraclexe also contains the odp.net folder where Oracle.DataAccess.dll is located. If the server is installed with odp.net, why do I need to install ODAC? Server Explorer in VS offered me ODP.NET drivers to connect only after installing ODAC.
  • ODAC ships with Oracle Instant Client. When to use Oracle Client and Oracle Instant Client? If I decide for Oracle Client, and then I install ODAC for the connection, will it also install Instant Client, which is part of ODAC?
  • Finally, after installing the server and client, VS 2010 still does not offer me Oracle Providers in the ASP.NET configuration.
+4
source share
1 answer

Oracle XE is special in that you usually install the server and client on the same computer. It is logical that they are separated, but this complicates the understanding a little. For this reason, I will refer to other experts.

  • ORAFAQ people have information about the TNSNAMES.ORA file. My personal strategy is to make all my TNSNAMES.ORA files the same, so there is no way to be confused.

  • ODP.NET for ... .NET used, while ODAC is native (OLE) and provides more tools than you can only have with ODP.NET. Use everything that works for your needs.

  • In most cases, you will distribute the Instant Client. Full client is more useful for developers. See the documentation and frequently asked questions for more information . You can have multiple clients on the same machine, so I'm not sure what the problem is.

  • Reboot your computer? Have you added the appropriate library / libraries to your environment?

+2
source

Source: https://habr.com/ru/post/1390794/


All Articles