6 Replies Latest reply: Mar 19, 2013 10:37 AM by 662798 RSS

    Want to use the Entity Framework for Oracle

    662798
      Currently our web applications are installed on Windows 2003 Server, IIS 6.0. Yes, this seems like the dark ages...years behind. They have an older version of the Oracle Client on the machine (11.0.1). This version does not support Oracle.DataAccess 4.x. .NET Framework 4.0 is installed on the Windows 2003 server. This version also does not support the Entity Framework.

      However, my development environment does not have any Oracle Client installed. I am just using the latest version of ODAC/ODP.NET with Visual Studio 2010. I am able to create apps locally with the Entity Framework but unfortunately cannot get them to work on the server because there of the older Oracle Client on that machine. Also there are approx. 50 applications on that server that are accessing this old version of OracleDataAccess 2.116.0 with references hard coded in the web.config. What's the best practice for dealing with legacy applications that are accessing older versions of Oracle?

      In short, what do I need to do in order to upgrade to the version of Oracle that will support the Entity Framework while still supporting legacy apps? Do I go for an Oracle Client upgrade or I just merely get the latest version of ODAC/ODP.NET installed on that server?

      Thanks!

      Edited by: imterpsfan2 on Mar 7, 2013 12:01 PM
        • 1. Re: Want to use the Entity Framework for Oracle
          662798
          What I would probably like to do is somehow set the dll directory to my local bin directory and just put all the .dlls for the most recent ODP.NET in my app and leave the existing applications as they are until I can migrate them.

          I've seen examples of this but doesn't seem to work for me.
          • 2. Re: Want to use the Entity Framework for Oracle
            995550
            You'll need at least 11.2.0.3 Oracle Client to with work EF so unless you upgrade your Oracle Database to that version, you won't be able to use EF at all.

            For the other 50 apps that hard coded to use old Oracle, you'll have no way to bite the bullet to upgrade them to use the new Oracle Client. In most cases, that should be just a recompile.
            • 3. Re: Want to use the Entity Framework for Oracle
              Tridus
              imterpsfan2 wrote:
              What I would probably like to do is somehow set the dll directory to my local bin directory and just put all the .dlls for the most recent ODP.NET in my app and leave the existing applications as they are until I can migrate them.

              I've seen examples of this but doesn't seem to work for me.
              You can do that by having both Oracle clients installed, and using the DLLPath configuration option to force the applications to use the one you want.

              That said, the next version of the managed client is going to support working in Entity Framework, and that is just an assembly you can include in the project with no Oracle installation at all. So really, the best answer is going to be to use that once they release it.

              (Also - most of the time something compiled for Oracle 11.x will work in 11.2.0.3 without doing anything. The 11.2.0.3 installer adds binding redirects to itself from older versions, provided you were loading from the GAC.)
              • 4. Re: Want to use the Entity Framework for Oracle
                662798
                After doing some research and some trial and error, it appears a good solution is to merely set the DllPath in the web.config. I don't think you actually need a full blown Oracle client installed on the IIS server anyway. You're good as long as you have the Instant Client that comes with the ODAC installation.

                I downloaded the XCOPY version of the ODAC and only installed the components I needed. This installation came to only about 100 MB. The XCOPY install doesn't seem to touch the registry at all (which may be good or bad).

                I found a How To in the ODP.NET Developer's Guide. I just have to create an oracle.dataaccess.client element in my web config, set the DllPath and that works nicely. This allows me to keep the other applications on the server untouched until I want to migrate them.
                • 5. Re: Want to use the Entity Framework for Oracle
                  Tridus
                  The instant client is an Oracle client. :)
                  • 6. Re: Want to use the Entity Framework for Oracle
                    662798
                    True but it's a stripped down client. Huge difference in installation size.