This content has been marked as final. Show 5 replies
I don't believe you can retrieve the Oracle TNS information from the registry. However, you can download tools to parse TNSNAMES.ORA and give you a list of SIDs/services you can then use when generating the DSN.
A free Oracle SID enumerator can be found at:
Hope that helps.
Thanks for the reply.
I need to use Oracle 10g client which does not have a registry key namely "ORACLE_HOME". That is the problem for me to get the installed path of Oracle.
On Oracle 10g client, i need to know the installation path of the Oracle, so that I can create the TNS information in the TNSNAMES.ORA
Thanks in advance.
Doesn't it set a registry key? Something like HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_OraDb10g_client? Then you can pull the ORACLE_HOME out of it.
Are you checking the ORACLE_HOME environment variable? Is it just not being set?
I am not checking for the environment variable. I am checking the registry only.
It's generally accepted to first check the environment, then the registry, and finally a brute-force search. But, if the registry-only method is best for your app, by all means use it.