3 Replies Latest reply: Jun 14, 2012 12:29 PM by gdarling - oracle RSS

    OracleDataAccess Issues - 32bit/64bit????


      I appear to be having an issue with relation to ODP .NET ( Oracle.DataAccess).
      We have migrated an existing COM+ Enterprise Service application component to .NET Framework 4.0 using ODP
      This is from the .NET Framework 1.1 and ODP 9.2.
      The only third party reference that this component uses is the ODP .NET ( Oracle.DataAccess 32bit version) which has been
      set as CopyLocal to False. This DLL component has been initally set to target to x86 build.

      When we register the component under COM+ (using regsvcs), it works fine on our development/build machine.
      However, as soon as we register this within the production machine we get the following error:

           An unknown exception occurred during installation:
           1: System.IO.FileNotFoundException - Could not load file or assembly 'Oracle.Dat
           aAccess, Version=, Culture=neutral, PublicKeyToken=89b483f429c47342' or
           one of its dependencies. The system cannot find the file specified.

      Our machine/software setup is as follows

                Development Machine
                     32bit XP
                     .NET 4.0
                     32bit Oracle Client with same version of ODP .NET

                     64bit Windows Server 2008 R2
                     .NET 4.0
                     64bit Oracle Client with same version of ODP .NET

      Btw, I have read that if you target the build to ANY from x86 (and assume copylocal is false on the Oracle.DataAccess)
      Then this should work? But base on the error message is still looks to be searching for the 32bit version of the Oracle.DataAccess?
      I have tried this and get the same error message when registering the COM+ component.

      I have search around, and have unable to find much guidance on such development across 32bit and 63bit setups.

      Can advise on the best way forward i.e.

      1) Should we remove the the 64bit Oracle client on the 2008 server and replace this with the same 32bit Oracle client that i'm using
      on our development/build machine? I suspect this would resolve the issues?


      2) Should we install the 32bit ODP along with the existing 64bit Oracle client?
      Would this cause more problems or clashes? And would be best to just do (1)?
        • 1. Re: OracleDataAccess Issues - 32bit/64bit????
          gdarling - oracle
          I don't see anything in the error message to indicate it's looking for 32 bit pieces rather than 64. It's certainly possible, and if it does you'll get that sort of error.

          Is the 11203 x64 install working fine otherwise? Have you tested it or used it from a different x64 process?

          With respect to x86 and x64 co-existing, yes you can do that, it's a common thing to do, and there should be no issues. Just make sure to install it into a separate Oracle Home.

          Hope it helps,
          • 2. Re: OracleDataAccess Issues - 32bit/64bit????

            I managed to fix my problem :)
            I mistakenly registered my com+ component using the regsvcs from the 32bit framework 4 folder, instead of using the regsvcs from the 64bit framework folder!
            As it was registered using the 32bit regsvcs, my com+ component was being registered as a 32bit assembly. I believe this in turn carried out dependency checks on the 32bit version of the oracle.dataaccess I.e checking for this in the bin folder which don't exist cause of copy local false. And similarly don't exit in the GAC as our 2008 server only has the 64bit version registered.
            Hence the error message I got.
            As soon as I reregistered it via the 64bit regsvcs....the com+ assembly went in fine.
            Now happily running this component under 64bit using the relevant odp.

            Only issue now is that theres slight differences in the results of our number crunching application (several decimal places)...must be to do with it operating under 64bit mode.

            If we were to go back to 32bit.
            Do we just need to install the 32bit ODAC for the same oracle/odp version
            And does the effectively create another oracle client on our server. So we need to manage another set of tnsnames ?

            • 3. Re: OracleDataAccess Issues - 32bit/64bit????
              gdarling - oracle
              Yes, if you want to run 32 bit apps with ODP, you'd need a 32 bit home, and 32 bit 11203 is what you'd want to use.

              Yes, you'd have then two homes and they'd both need to have tnsnames.

              Or, you can set TNS_ADMIN as an environment variable on the box, and then all Oracle clients will look in that folder for sqlnet, tnsnames, etc.