About Oracle tns_admin Environment Variables

Source: Internet
Author: User

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 Line
C: \ 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.