Home E-mail Us Oracle Articles New Oracle Articles Oracle Training Oracle Tips Oracle Forum Class Catalog Remote DBA Oracle Tuning Emergency 911 RAC Support Apps Support Analysis Design Implementation Oracle Support SQL Tuning Security Oracle UNIX Oracle Linux Monitoring Remote support Remote plans Remote services Application Server Applications Oracle Forms Oracle Portal App Upgrades SQL Server Oracle Concepts Software Support Remote Support Development Implementation Consulting Staff Consulting Prices Help Wanted! Oracle Posters Oracle Books Oracle Scripts Ion Excel-DB |
Question: I have just finished installing Oracle. I want to update my tnsnames.ora file, but I cannot find a tnsnames.ora file on my system. I thought the tnsnames.ora file would be created when I created the database. How do I create the tnsnames.ora? Answer: The tnsnames.ora is a SQL*Net configuration file that normally resides in the ORACLE_HOME/network/admin directory. Specifically, the tnsnames.ora defines databases addresses so that connections can be made to them. The creation of the database itself will not necessarily create the tnsnames.ora. It is created along with the sqlnet.ora and listener.ora as part of the network configuration. Normally, the Network Configuration Assistant (NETCA) is started at the end of the installation process; however, if NETCA fails or you exit before completing, the tnsnames.ora and the other files will not be created. The tnsnames.ora and the other NETCA created files are not necessary for connecting to the database locally from the server. They are just for client access, so it is possible for the database to be created properly and the files not exist. The tnsnames.ora file is located on both the client and server systems, but there will be only one tnsnames.ora on each server regardless of how many database instances exist. If you have run NETCA and cannot locate the tnsnames.ora file, check to see if the tns_admin parameter has been set to specify a different directory. If you have not run NETCA, do so to create the tnsnames.ora file. The easiest way for experienced users to edit the tnsnames.ora file is by using a text editor to manually update the file; however, the SQL*Net Easy Configurator GUI can also be used. It has wizards the help guide users through the process of configuring as many connections as they want. The basic format of the tnsnames.ora file is: net_service_name= (description= (address=(protocol_address_information)) (connect_data= (service_name=service_name))) A sample tnsnames.ora entry might look like the following: ORATST= (description= (address_list= (address = (protocol = TCP)(host = fu.bar)(port = 1521)) ) (connect_data = (service_name=oratst) ) ) Where the following parameters are used:
For multiple addresses, the following description section parameters are also available for the tnsnames.ora file:
More information on tnsnames.ora is available HERE. Also see the additional information on creating and editing listener.ora and sqlnet.ora.
| |||
|