From: http://blog.csdn.net/pan_tian/article/details/7699599
Another Oracle product was installed in the past two days. After restarting, it was found that the listening listener could not be started. After reinstalling the product, it was normal. After configuring the network service and listening: \ oracle \ product \ 10.2.0 \ db_1
The listener cannot be found in the \ Network \ ADMIN directory. ora and tnsnames. ora is quite strange, but the configured network service can be accessed in PL \ SQL Dev, open the registration information in PL \ SQL Dev,
I found that the TNS file actually points to tnsnames. ora under a drive C, which is very strange. Google found the following explanation, so it is recorded!
========================================================== ======================================================== ======================================
Many Oracle products have their own TNS files. If multiple Oracle products are installed in your system, what is the tnsnames. ora used when the client connects to the instance? In this case, you need to check the tns_admin parameter.
Question:What is
Tns_adminParameter and how do I use
Tns_admin tO define a common location for my TNS files?
Answer:TheTns_adminParameter determines the location of the TNS administration files (e.g. tnsnames. ora and listener. ora, etc .)
TheTns_adminParameter is super useful on servers with your databases on different release levels (hence different $ ORACLE_HOME Directories) because all databasesTns_adminValues can be
Set to a single location, allowing a single set of SQL * Net files for all databases on the server.
WithoutTns_adminVariable, each instance wocould have it's own set of TNS files in the $ ORACLE_HOME/Network/Admin directory.
Command LineC: \ Documents ents and Settings \ Administrator> set tns_admintns_admin = F: \ oracle \ product \ 10.1.0 \ db_1 \ Network \ admin, which indicates that the client will be from F: read TNS settings under \ oracle \ product \ 10.1.0 \ db_1 \ Network \ admin
Modification method:You can modify the registry and system environment variables in two ways. Registry location: HKEY_LOCAL_MACHINE \ SOFTWARE \ oracle \ home0 \ tns_admin system environment variables have a higher priority than the Registry. If environment variables are set, the registry value is ignored.