TNS_ADMIN Environment not recognized
TNS_ADMIN Environment not recognized
hello,
We tested Odac 6.25 in combination with oracle instant client 10.2.0.4. When we used a own tnsnames.ora in the instant client directory and setup an environment variable TNS_ADMIN which point's to this directory sqlplus and other oracle tools seem to work. Odac also work if there is only the instant client on the workstation. But if there is also installed a fat client (registry settings for it), there is always used the tnsnames.ora out of this directory.
Do we miss some odac settings?
How possible to use our own tnsnames.ora instead of an already installed one.
thx and br, klaus.
We tested Odac 6.25 in combination with oracle instant client 10.2.0.4. When we used a own tnsnames.ora in the instant client directory and setup an environment variable TNS_ADMIN which point's to this directory sqlplus and other oracle tools seem to work. Odac also work if there is only the instant client on the workstation. But if there is also installed a fat client (registry settings for it), there is always used the tnsnames.ora out of this directory.
Do we miss some odac settings?
How possible to use our own tnsnames.ora instead of an already installed one.
thx and br, klaus.
-
Challenger
- Devart Team
- Posts: 925
- Joined: Thu 17 Nov 2005 10:53
-
Challenger
- Devart Team
- Posts: 925
- Joined: Thu 17 Nov 2005 10:53
hi challanger,
we tested your exe and the outcome is, that your exe recognises the tns_admin variable we set before in a bat-file. when we use the same bat-file and just replace the project1.exe with our exe, the connect still fails.
- we use oracle instant client for our application to be independent from unpredictable registry settings
- the connect fails (with unable to resolve service name) on clients with an additionaly installed non instant-oracle client (but your project1.exe recognises the correct tns_admin variable)
- we use TOraSession with the default settings and don't use direct connection
- we set the connectstring at application start (value adjusted in an ini-file)
- our start script:
set TNS_ADMIN=%PIT_BG_BDE_PATH%\OraClient\tns_admin
set ORACLE_HOME=%PIT_BG_BDE_PATH%\OraClient
set PATH=%PIT_BG_BDE_PATH%\OraClient
cd %PIT_BG_BDE_PATH%\Client
start /D%PIT_BG_BDE_PATH% %PIT_BG_BDE_PATH%\client\bde.exe
it seems that for some reason(s) the registry settings are used instead of the environment variables.
are there some special settings of the TOraSession object we have overseen till now?
thx and best regards, klaus eckhardt.
we tested your exe and the outcome is, that your exe recognises the tns_admin variable we set before in a bat-file. when we use the same bat-file and just replace the project1.exe with our exe, the connect still fails.
- we use oracle instant client for our application to be independent from unpredictable registry settings
- the connect fails (with unable to resolve service name) on clients with an additionaly installed non instant-oracle client (but your project1.exe recognises the correct tns_admin variable)
- we use TOraSession with the default settings and don't use direct connection
- we set the connectstring at application start (value adjusted in an ini-file)
- our start script:
set TNS_ADMIN=%PIT_BG_BDE_PATH%\OraClient\tns_admin
set ORACLE_HOME=%PIT_BG_BDE_PATH%\OraClient
set PATH=%PIT_BG_BDE_PATH%\OraClient
cd %PIT_BG_BDE_PATH%\Client
start /D%PIT_BG_BDE_PATH% %PIT_BG_BDE_PATH%\client\bde.exe
it seems that for some reason(s) the registry settings are used instead of the environment variables.
are there some special settings of the TOraSession object we have overseen till now?
thx and best regards, klaus eckhardt.
When several clients are installed, ODAC requeres the correct path to oci.dll. This path cannot be received from the TNS_ADMIN or ORACLE_HOME environment variables.
The current version of ODAC uses only registry to select the default Oracle home. To make ODAC use instant client you should add a value like the following
OCIDLL=C:\InstantClient\oci.dll
to the HKEY_LOCAL_MACHINE\Software\Oracle.
The current version of ODAC uses only registry to select the default Oracle home. To make ODAC use instant client you should add a value like the following
OCIDLL=C:\InstantClient\oci.dll
to the HKEY_LOCAL_MACHINE\Software\Oracle.
hi plash,
thx for your answer. this are really bad news. we currently run applications which are requiring different versions of the oracle client. the oldest version of oracle client we are using is 8.0.6 (for a oracle forms application). we have had many problems in the past with multiple oracle homes (clients) on the windows workstations of our users. and so we are quite sure, that if we set this registry key, we are running into big troubles with already existing applications. for our new application the idea is to rollout it with the instant client and get all settings via environment variables. could you please change the behaviour of odac to primary get oracle setting from the environment and if the environment is not set get the oracle setting from the registry?
br, klaus.
thx for your answer. this are really bad news. we currently run applications which are requiring different versions of the oracle client. the oldest version of oracle client we are using is 8.0.6 (for a oracle forms application). we have had many problems in the past with multiple oracle homes (clients) on the windows workstations of our users. and so we are quite sure, that if we set this registry key, we are running into big troubles with already existing applications. for our new application the idea is to rollout it with the instant client and get all settings via environment variables. could you please change the behaviour of odac to primary get oracle setting from the environment and if the environment is not set get the oracle setting from the registry?
br, klaus.