howto:oramxclient

Mixed Oracle 32/64-Bit Client

It is easy to install a mixed 32-/64-bit oracle client which will allow you to use both, 32- and 64-bit BPS installations side by side on the same PC.

  • First, if you are still using the full blown commercial Oracle client, uninstall it. Just save tnsnames.ora.
  • Create folder C:\oracle
  • Copy your old tnsnames.ora to C:\oracle
  • Unpack the downloaded instant clients in the folder C:\oracle
  • Rename the unpacked folders in C:\oracle:
    • instantclient-basiclite-nt-19.6.0.0.0dbru → 32
    • instantclient-basiclite-windows.x64-19.6.0.0.0dbru → 64
  • Now copy the following code and paste it into the file C:\oracle\makelinks.bat:
@echo off
setlocal
rem Check or get admin privileges
>nul 2>&1 "%SystemRoot%\system32\cacls.exe" "%SystemRoot%\system32\config\system"
if '%errorlevel%' NEQ '0' (
    echo Requesting administrative privileges...
    goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
    echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
    "%temp%\getadmin.vbs"
    exit /b
:gotAdmin
    if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
 
rem Create links
call :makelink oraclient C:\oracle\32\instantclient_19_6 C:\oracle\64\instantclient_19_6
pause
goto :eof
 
:makelink
if exist %SystemRoot%\SysWOW64\%1 rmdir /q %SystemRoot%\SysWOW64\%1
if exist %SystemRoot%\System32\%1 rmdir /q %SystemRoot%\System32\%1
mklink /d %SystemRoot%\SysWOW64\%1 %2
mklink /d %SystemRoot%\System32\%1 %3
  • Run makelinks.bat to create the links.
  • Add to PATH in system environment variables: %SystemRoot%\System32\oraclient
  • Add the system environment variable: TNS_ADMIN=C:\oracle

You can now run 32- and 64-bit BPS installations side by side.

  • howto/oramxclient.txt
  • Last modified: 2020/06/19 15:33
  • by ibk