Is ODP.NET required for Oracle 11g Client?

后端 未结 6 2244
-上瘾入骨i
-上瘾入骨i 2020-12-16 21:26

I may be asking the wrong question here, I\'m willing to change it if so.

I have a project that is using the Microsoft.NET Oracle provider (our plan is to change to

相关标签:
6条回答
  • 2020-12-16 21:58

    I think the message "System.Data.OracleClient requires Oracle client software version 8.1.7 or greater" it's similar to "Oracle client not installed, installed but not found or installed but it's needed 8.1.7 or greater".

    Check on regedit if the values are right under the key:

     HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_OraOdac11g_home1
    

    Where OraOdac11g_home1 depends on the Oracle Home name for your installation.

    Also, try to connect through Visual Studio to see if its possible.

    0 讨论(0)
  • 2020-12-16 22:08

    I'm adding a new answer since as of this fall (2012) the ODP Managed Code Beta is available. See this link for more information. It is for us highly stable and we are using it in production, mainly because of these reasons:

    • No installation (except for entity framework where a simple registration is needed)
    • It is smaller than the unmanaged version, the footprint is approx 6 MB.
    • It is NOT "bit sensitive", ie Any CPU will finally work with ODP :)
    • More intuitive mapping C# types <-> Oracle types (and it solved some problems with EF and model generation from database)
    • Supports EZCONNECT (all versions of the unmanaged ODP did not), ie no more tnsnames.ora hassles.

    But for transitioning to 64 bit, download the managed ODP driver and change the Oracle.DataAccess reference to Oracle.ManagedDataAccess and recompile :)

    0 讨论(0)
  • 2020-12-16 22:09

    I have found many times that the error "requires Oracle client software version 8.1.7 or greater" is a notoriously misleading error. From distant memory I seem to remember that this usually indicates a file IO permissions problem. I think it may be that the ASP.NET worker process (or whichever identity an application is running under) requires some sort of read or write permission to a folder in the oracle client folder hierarchy...

    0 讨论(0)
  • 2020-12-16 22:11

    I have had an issue which could relate to what you are seeing.

    I initially had the just the Oracle 10g client installed on my machine and the .Net Oracle.DataAccess component version number was 10.2.0.100 - this was for .Net runtime v1.0.3705

    I installed ODP.Net and the Oracle.DataAccess component version is now v2.102.2.20 and runs on .Net runtime v2.0.50727 - I cant find the reference as to why Oracle did this - it was something to do with bringing version numbers in line with the runtime version

    It took me a day to work this out. We dont use the 11g client yet and I havent used the 8i client for ages so I dont know what the version numbers would be for those clients, but I'd check it if I were you what.

    In short, Oracle back-tracked the component version numbers which could be making your 11g component appear out-of-date as opposed to Oracle 8i components

    0 讨论(0)
  • 2020-12-16 22:18

    When it comes to Oracle, I like to use Oracle Instant Client :

    • You don't have to install anything on the target machines (including dev boxes !).
    • You can make sure that your application will run with the specific client you picked.
    • You could even easily have multiple applications work with different client versions on the same computer.
    • As a downside, it adds a significant weight to your application (~19Mb minimum).

    Check What is the minimum client footprint required to connect C# to an Oracle database? for more information. To know how to set up a Visual Studio project that will work on x86 as well as x64 machines, check my blog post Oracle Instant Client in Visual Studio.

    0 讨论(0)
  • 2020-12-16 22:22

    This can be a cause of multiple oracle homes in the environment. Remove the older version oracle home in your build system. try generating the build again with the single home. There are some issues with 9i version ODP.NET and 10G/11G connectivity

    0 讨论(0)
提交回复
热议问题