Want to show your appreciation? Please to my charity.

Sunday, February 12, 2012

Install Oracle 10g R2 32 bit Client and ODP.Net 10.2 on Windows 7

While the latest client is 11g, you’ll still need to install 10g R2 client before the infamous bug of ODP.Net 11.x is fixed.
Note: for x64 installation see here.

Install 32 bit Oracle 10g R2 client

This client installer only include ODP.Net for .Net 1.x framework. Download Oracle Database 10g Client Release 2 (10.2.0.3) (10203_vista_w2k8_x86_production_client.zip) from http://www.oracle.com/technetwork/database/10203vista-087538.html

Update (10/21/2012): What a pity that Oracle pulled off the page and download from their website. If you are still lucky, you can get a copy here: http://www.4shared.com/zip/ydP657yQ/10203_vista_w2k8_x86_productio.html

Unzip and run setup.exe in the install sub folder. Follow the instructions to install “Runtime” to a specific folder and give a name. I used
  • Name: OraClient10g_home32
  • Path: D:\oracle\product\10.2.0\client_32

Install 32 bit OPD.Net for .Net 2.0

Download Oracle 10g Release 2 ODAC (ODAC1020221.exe) from http://www.oracle.com/technetwork/database/windows/downloads/utilsoft-087491.html
Do not run the exe, instead use 7-zip or other zip utility to unzip it to a folder.
Go to the install sub folder in the unzip location.
Edit oraparam.ini file to add 6.1 to the end of certified windows version list, and save.
[Certified Versions]
#You can customise error message shown for failure, provide value for CERTIFIED_VERSION_FAILURE_MESSAGE
Windows=4.0,5.0,5.1,5.2,6.0,6.1
run the setup.exe file.
Select to install “Oracle Data Access Components 10.2.0.2.21”
In the “Specify Home Details” step, enter the path to the previously installed 32bit Client: D:\oracle\product\10.2.0\client_32
In the “Available Product Components”, select only “Oracle Data Provider for .Net 2.0 2.0.2.20”
Then take the default and finish installation.

32 bit assembly redirect

If you want existing assemblies that depends on older version of Oracle.DataAccess to use the this version, you need to add below assembly redirect to machine.config file under C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG for .Net 2.x-3.x and C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config for .Net 4.x.
    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <dependentAssembly>
                <assemblyIdentity name="Oracle.DataAccess" publicKeyToken="89b483f429c47342" culture="neutral" />
                <bindingRedirect oldVersion="9.0.0.0-10.65535.65535.65535" newVersion="2.102.2.20"/>
            </dependentAssembly>
        </assemblyBinding>
    </runtime>

Wednesday, February 08, 2012

Install Oracle 10g R2 Client and ODP.Net 10.2 on Windows 7 64bit

11g is the only official ODP.Net on Windows 7 64bit. But we’ll still need 10g R2 client before 11g’s infamous bug is fixed.

64bit Client

Download Oracle Database 10g Client Release 2 (10.2.0.4) (10204_vista_w2k8_x64_production_client.zip) from http://www.oracle.com/technetwork/database/10204-winx64-vista-win2k8-082253.html

Update (10/21/2012): What a pity that Oracle actually pulled off the page and download. If you a lucky, you can find a copy here: http://www.4shared.com/zip/naYhO1uh/10204_vista_w2k8_x64_productio.html

unzip and open Command Prompt and change directory to the unzipped location. run:
setup.exe –ignoreSysPrereqs

Note: If you still got OS version error when starting the setup. Edit install\oraparam.ini file to add 6.1 to the end of certified windows version list, and save. Then just run setup.exe without parameter.
[Certified Versions]
#You can customise error message shown for failure, provide value for CERTIFIED_VERSION_FAILURE_MESSAGE
Windows=4.0,5.0,5.1,5.2,6.0,6.1
Select “Runtime” for installation type
w710g-installation-type
Change the installation location to where you wish and continue with default options to finish installation.
This comes with Oracle.DataAccess 2.102.4.0 for x64 platform. If you want existing assemblies that depends on older version of Oracle.DataAccess to use the this version, you need to add below assembly redirect to machine.config file under C:\Windows\Microsoft.NET\Framework64\v2.0.50727\CONFIG for .Net 2.x-3.x and C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config for .Net 4.x
   <runtime>
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
       <dependentAssembly>
         <assemblyIdentity name="Oracle.DataAccess" publicKeyToken="89b483f429c47342" culture="neutral" />
         <bindingRedirect oldVersion="9.0.0.0-10.65535.65535.65535" newVersion="2.102.4.0"/>
       </dependentAssembly>
      </assemblyBinding>
   </runtime>

32bit Client

If you want to run 32-bit .Net application that uses ODP.Net, you’ll have to install 32bit client as well. One of such application is Visual Studio’s build in development web server – Cassini.
Note: there are workarounds running development web server in 64-bit.

Install 32 bit Oracle 10g R2 client and ODP.Net 10.2

Following the instructions here.

Fix the PATH

After both x64 and x86 version of clients are installed, Oracle sets both versions of bin folder to PATH. This could be an issue for either 64bit or 32bit application depends on the order of clients installed. To fix this problem, follow the instructions here: http://realfiction.net/go/153. That page was for 11g but the concept applies to 10g installation as well.