1 Reply Latest reply: Apr 18, 2013 2:25 PM by Alex.Keh .Product.Manager-Oracle RSS

    How to Install Oracle Data Access Components (ODAC) on Windows Server 2003?

    1003437
      I recently installed "32-bit Oracle Data Access Components (ODAC) with Oracle Developer Tools for Visual Studio" on my computer (Windows 7, 64bit). Everything seems fine and I can develop and run my application in Visual Studio 2010 and IIS 7.

      Now, when I deploy my application to the Server, it raises error:

      Exception: System.TypeInitializationException: The type initializer for 'Oracle.DataAccess.Client.OracleCommand' threw an exception. ---> Oracle.DataAccess.Client.OracleException: The provider is not compatible with the version of Oracle client

      Obviously I need to install ODAC on the server, too. My server is:
      - Windows 2003 32 bit R2 (I know, I know!)
      - IIS 6

      So. I downloaded the same installation from Oracle website (ODAC 11.2 Release 5 and Oracle Developer Tools for Visual Studio [11.2.0.3.20]) and installed it on the server. But still getting the same error.

      PS: When I was installing, I chose Oracle Data Access Component for Oracle Client 11.2.0.3.20 in Oracle Universal Installer. hmmmm. Should I choose "Oracle Server" instead? Screenshot

      Edited by: 1000434 on Apr 17, 2013 6:35 AM

      Edited by: 1000434 on Apr 17, 2013 6:36 AM
        • 1. Re: How to Install Oracle Data Access Components (ODAC) on Windows Server 2003?
          Alex.Keh .Product.Manager-Oracle
          ODP.NET, Unmanaged Driver uses unmanaged dependencies in the Oracle Client. The error you see means you have another Oracle Client installed on the Win2003 machine and ODP.NET is attempting to load the incorrect Oracle Client version, rather than the version you installed ODP.NET with.

          What you need to do is direct ODP.NET where to find the correct version of its unamanaged Oracle Client dependencies. This will be generally the bin directory of your Oracle Client home that was installed with ODP.NET.

          You can learn more about DllPath here:
          http://docs.oracle.com/cd/E20434_01/doc/win.112/e23174/InstallODP.htm#sthref94

          If you're not familiar with how to set ODP.NET settings in the Registry or .NET config files, you can read how to do that here:
          http://docs.oracle.com/cd/E20434_01/doc/win.112/e23174/featConfig.htm#sthref106