7 Replies Latest reply: May 21, 2013 3:56 PM by Alex.Keh .Product.Manager-Oracle RSS

    ODP.net forward compatibility not working in Oracle 11GR2

    1009407
      Hi experts,

      I have a web service application that's compiled with a specific version of oracle.dataaccess.dll, v1.102, since this application is supposed to be installed across Oracle client from 10 to 11g, and our lowest oracle client odp.net is v1.102. All work well, until we encounter the oracle client 11gr2, on which the odp.net stopped supporting .net 1.0 frame work, to be specific, there is no more 1.x folder under oracle_home/odp.net/bin, thus when my application run on it, I got the "can't load assembly oracle.dataaccess" error.

      Anyidea how to make the apps compiled with 1.0 .net framework odp dll to work on11gr2 oracle client?

      My orginal understanding about .net loading run time assembly is that, it will always go to the GAC to find the assembly matching the name, in my case, the 11gr2 server does have oracle.dataaccess.dll in GAC, with a v2.x , why the .net won't just pick it up and insist on loading v1.102 ?

      Greatly appreciated your advice!
        • 1. Re: ODP.net forward compatibility not working in Oracle 11GR2
          Alex.Keh .Product.Manager-Oracle
          The ADO.NET spec changed some fundamental APIs between .NET 1.x and 2. .NET Framework 1.x probably can't run any ADO.NET 2.0 provider. I'm not sure this scenario would work even if .NET Framework 1.x found an 11.2 version of ODP.NET. You would be using System.Data from .NET 1.x and Oracle.DataAccess from .NET 2.0.

          Whether this is the root cause of your current issue, I can't say, but I don't think it's worth investigating further because you'll hit this problem eventually. The last version of ODP.NET for .NET 1.x was shipped with ODAC 11.1.0.6.21.
          • 2. Re: ODP.net forward compatibility not working in Oracle 11GR2
            1009407
            Hi Alex,

            Thanks for your kind response.

            Then, what would you suggest, if our apps have to be ablIe to run across multiple Oracle client, the lowest being Oracle 10.0.2, which only comes with 1.0 .net framework support, and highest so far is 11gR2.
            We had the impression that ODP.net is forward compatible, and it seems this across .net framework upgrade is breaking it:(

            Any advice would be greatly appreciated!
            • 3. Re: ODP.net forward compatibility not working in Oracle 11GR2
              Alex.Keh .Product.Manager-Oracle
              Just run each app with a different ODP.NET version. Many ODP.NET applications already do that.

              Part of the Oracle Client is unmanaged. Chapter 2 in the ODP.NET book describes how to make sure each .NET app will use the correct version of its unmanaged files with the DllPath property. If you use DllPath, you can use multiple ODP.NET versions on the same machine without any problems.

              ODP.NET is generally forward compatible with .NET versions. However, when an underlying app server or OS component makes a significant change in the next release, Oracle cannot ensure forward compatibility. Between ADO.NET 1.x and 2.0, Microsoft made significant changes. This is not unique to ODP.NET. It applies to all ADO.NET software. SqlClient 1.x will have the same problems as ODP.NET 1.x using .NET 2.0 libraries.
              • 4. Re: ODP.net forward compatibility not working in Oracle 11GR2
                gdarling - oracle
                Just to add to what Alex said, the ODP FAQ has good information on running multiple versions at once:
                http://www.oracle.com/technetwork/database/windows/faq-093106.html#policy
                • 5. Re: ODP.net forward compatibility not working in Oracle 11GR2
                  1009407
                  Hi Alex,

                  If our app has to be compiled against the .net 1.0 Oracle.DataAccess, and in order to make it run as well on a Oracle client with 11gr2 installed, would it work, if I install the odp.net 1.0 on top of the 11gr2 oracle client?

                  Any advice would be greatly appreciated!
                  • 6. Re: ODP.net forward compatibility not working in Oracle 11GR2
                    gdarling - oracle
                    There's simply no support for .NET 1.x in 11.2 ODP. Further, if you try to use the 10.x/11.1 1.x ODP stuff on the 11.2 client, you'll get a TypeInitializationException "provider is not compatible with version of the client."

                    Your only options here really are to recompile the 1.x app with 2.x or higher so you can use 2.x ODP and 11.2 client, or to have an 11.1 or older client installed in addition to 11.2.

                    Theoretically it may be possible to use 11.2 odp with a 1.x app if you supply a binding redirect in your app/web.config, but I'm not sure I should even mention it for fear that you'll actually do it, and it's in no way shape or form a supported configuration by Oracle even if you get it to work. I mostly mention it to avoid a follow up "what if i do that" question :)

                    Greg
                    • 7. Re: ODP.net forward compatibility not working in Oracle 11GR2
                      Alex.Keh .Product.Manager-Oracle
                      You may have to use the OraOpsX.dll from ODP.NET for .NET 1.x as well. That combination may work, but it's not supported. If you hit a problem, Oracle Support cannot provide a software fix for you.