Re: [cx-oracle-users] Installation of cx_Oracle-4.1.2 for py2.5b1
Brought to you by:
atuining
From: Henning v. B. <H.v...@t-...> - 2006-07-06 07:40:07
|
> Anthony Tuininga wrote: >=20 > Oracle generally does not recommend setting the > environment variable ORACLE_HOME on Windows as it can interfere with > multi-homing on that platform and can occasionally cause weirdnesses > of various sorts to appear. All that is needed is for the directory to > be in the PATH environment variable and Oracle does the rest. >=20 If you need multiple Oracle installations on WINDOWS (say, 10g client, 9.2 client and developer 6i runtime client), and you want to be sure that your program always runs in the correct environment, then you can do it like this: After you have installed everything: - export your registry key HKLM\Software\Oracle to a .reg file. - rename your registry key HKLM\Software\Oracle to HKLM\Software\Oracle.bak - take a backup of your PATH (i.e. "set > c:\environment.txt" on the cmd line) - (optionally) remove all oracle entries from PATH - for each Oracle home: - write a CMD script that sets all needed Oracle settings like this: set ORACLE_HOME=3Dc:\oracle\ora92_client set PATH=3D%ORACLE_HOME%\bin;%WINDIR%\System32;%WINDIR%;%WINDIR%\System32\wbe= m set TNS_ADMIN=3Dc:\ora_network\admin set NLS_LANG=3DGERMAN_GERMANY.WE8MSWIN1252 ... and save it as c:\ora_environment\ora92_client.cmd (replace the file name for other oracle homes) for each oracle program that you run, - make sure that you run the CMD script that sets the oracle variables first, like this: @echo off setlocal call c:\ora_environment\ora92_client.cmd set LOCAL=3DOTEST cd /d g:\myproject\sql sqlplus scott/tiger endlocal Since now you do not have anything oracle-related in the registry, all Oracle settings come from the environment variables, and you have full control. Note: This concept does not work for Windows services like the Application Server etc. Henning |