.netoracleenterprise-libraryodp.netgac

Oracle.DataAccess.dll for .NET 4.0 in 32 bit Oracle Client install?


Below are two paths and the files present in the installation of Oracle client 32 bit (win32_11gR2_client.zip) for .NET 2.X and 4.X. When I installed the Oracle client, I chose not to take the default in two of the windows during the Install Wizard. I chose to install the "Runtime" and I also changed the install path from c:\apps{user}\ to c:\oracle because our Oracle DBA at my organization gave me those instructions.

C:\oracle\product\11.2.0\client_1\ODP.NET\bin\2.x\ C:\oracle\product\11.2.0\client_1\ODP.NET\bin\2.x\Oracle.DataAccess.dll C:\oracle\product\11.2.0\client_1\ODP.NET\bin\2.x\OraProvCfg.exe

C:\oracle\product\11.2.0\client_1\ODP.NET\bin\4\ C:\oracle\product\11.2.0\client_1\ODP.NET\bin\4\OraProvCfg.exe

I'm interested in referencing Oracle.DataAccess.dll assembly in a .NET 4.X application. I found these instructions to add the dll file to the GAC for the 64 bit installation.

http://devblog.rayonnant.net/2011/04/oracle-11g-r2-x64-client-with-odac.html

Four questions.

1.) If I run this command (which I modified slightly for the path I have), for my 32 bit installation, what will happen?

cd C:\oracle\product\11.2.0\client_1\ODP.NET\bin\4

OraProvCfg.exe /action:gac /providerpath:C:\oracle\product\11.2.0\client_1\ODP.NET\bin\4\Oracle.DataAccess.dll

2.) How can I get a list of the contents in the GAC before I run #1?

3.) Is this the correct command to undo #1?

cd C:\oracle\product\11.2.0\client_1\ODP.NET\bin\4

OraProvCfg.exe /action:ungac /providerpath:C:\oracle\product\11.2.0\client_1\ODP.NET\bin\4\Oracle.DataAccess.dll

4.) Rather than adding it to the GAC, how can I generate the dll file instead? What is the correct "action" argument for that? The reason I'd like to do this is because I was not able to see the dll in the "4" folder. I only saw the dll in the "2.x" folder.

Here is the help contents of this file if interested.

C:\oracle\product\11.2.0\client_1\ODP.NET\bin\4>OraProvCfg.exe

Oracle Providers for .NET Configuration Utility for .NET Framework 4 : Release 4 .112.3.0 Production on Thu Jul 23 12:09:37 2015 Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.

Usage: OraProvCfg /action: [/force] [/product:] [/component:] [/productversion:] [/frameworkversion:<.NET framework version>] [/providerpath:] [/verbose:] [/log:]

Example: Installing an assembly in the GAC: OraProvCfg /action:gac /providerpath:

Example: Uninstalling an assembly from the GAC: OraProvCfg /action:ungac /providerpath:

Assembly name can be specified as "Oracle.DataAccess, Version=2.111.5.10"
to uninstall a specific version of assembly.

Example: Configuring machine.config for ODP.NET: OraProvCfg /action:config /product:odp /frameworkversion:v2.0.50727 /providerpath:

OraProvCfg  /action:config  /force /product:odp
            /frameworkversion:v2.0.50727
            /providerpath:<Oracle.DataAccess.dll full path>

Example: Unconfiguring machine.config for ODP.NET: OraProvCfg /action:unconfig /product:odp /frameworkversion:v2.0.50727

Example: Registering ODP.NET Performance Counters: OraProvCfg /action:register /product:odp /component:perfcounter /providerpath:

Example: Unregistering ODP.NET Performance Counters: OraProvCfg /action:unregister /product:odp /component:perfcounter /providerpath:

Example: Configuring ODP.NET OraclePermission for Web Applications: OraProvCfg /action:config /product:odp /component:oraclepermission /frameworkversion:v2.0.50727 /providerpath:

OraProvCfg  /action:config  /product:odp /component:oraclepermission
            /frameworkversion:v2.0.50727
            /productversion:<Oracle.DataAccess.dll product version>

Example: Unconfiguring ODP.NET OraclePermission for Web Applications: OraProvCfg /action:unconfig /product:odp /component:oraclepermission /frameworkversion:v2.0.50727 /providerpath:

OraProvCfg  /action:unconfig  /product:odp  /component:oraclepermission
            /frameworkversion:v2.0.50727
            /productversion:<Oracle.DataAccess.dll product version>

Example: Configuring machine.config for ASP.NET: OraProvCfg /action:config /product:aspnet /component: /frameworkversion:v2.0.50727 /providerpath:

OraProvCfg  /action:config  /force /product:aspnet
            /component:<provider name>
            /frameworkversion:v2.0.50727
            /providerpath:<Oracle.Web.dll full path>

<provider name> valid values: all, membership, profile, rolemanager,
personalization, webevent, sitemap or a combination thereof
("membership | profile", for example). Default value is all.

Example: Unconfiguring machine.config for ASP.NET: OraProvCfg /action:unconfig /product:aspnet /component: /frameworkversion:v2.0.50727

<provider name> valid values: all, membership, profile, rolemanager,
personalization, webevent, sitemap or a combination thereof
("membership | profile", for example). Default value is all.

C:\oracle\product\11.2.0\client_1\ODP.NET\bin\4>


Solution

  • That "gac" action depends on the file already existing in the file (providerpath is the input file for this command). So it didn't even run.

    I had to download the odp.net package separately from the oracle site.

    ODAC112040Xcopy_32bit.zip (53MB)

    And then I referenced the dll from here, since it wasn't included in the oracle client 32 bit install (win32_11gR2_client.zip).

    C:\Users\{user}\Downloads\ODAC112040Xcopy_32bit\odp.net4\odp.net\bin\4\