Oracle configuration file DETAILS listener. ora, sqlnet. ora, tnames. ora

Source: Internet
Author: User
Tags dedicated server
The listener. ora, sqlnet. ora, and tnsnames. ora configuration files are all stored in the $ oracle_homenetworkadmin directory. Key points: Functions and functions of the three files

The listener. ora, sqlnet. ora, and tnsnames. ora configuration files are all stored in the $ oracle_home \ network \ admin directory. Key points: Functions and functions of the three files

Three configuration files
Listener. ora, sqlnet. ora, and tnsnames. ora are all stored in the $ Oracle_home \ network \ admin directory.

Key points: Functions and usage of the three files

Sqlnet. ora ----- functions similar to linux or other unix nsswitch. conf files. This file determines how to find a connection string that appears in the connection,
For example, we enter
Sqlplus sys/oracle @ orcl
Assume that my sqlnet. ora is like the following:

Sqlnet. authentication_services = (CNT)
Names. directory_path = (tnsnames, hostname)

Then, the client will first be in tnsnames. orcl records in the ora file. if there is no corresponding record, try to use orcl as a host name, resolve its ip address through the network, and then connect to the instance global_dbname = orcl on this ip address, of course, here, orcl is not a host name.
If I look like this

Names. directory_path = (tnsnames)

Then the client will only search for orcl records from tnsnames. ora
There are other options in brackets, such as ldap, which are not commonly used.

Tnsnames. ora ------ this file is similar to the unix hosts file. It provides the corresponding tnsname to the host name or ip address, only when the file is similar
Names. directory_path = (tnsnames), that is, the client will try to use this file only when tnsnames is in the order in which the client parses the connection string.

In this example, there are two local IP addresses corresponding to orcl and another IP address corresponding to sales, which also defines whether to use the master server or the Shared Server Mode for connection.

# Enter tnsname when you want to connect
Orcl =
(Description =
(Address_list =
# The host, port, and Protocol corresponding to this tnsname
(Address = (protocol = tcp) (host = 127.0.0.1) (port = 1521 ))
)
(Connect_data =
# Use the dedicated server mode to connect to the server. The connection mode must match the server mode. If not, the connection mode depends on the server mode.
# Automatic Adjustment
(Server = dedicated)
# Corresponding service_name, sqlplus>; show parameter service_name;
# View
(Service_name = orcl)
)
)
# The following is similar
Sales =
(Description =
(Address_list =
(Address = (protocol = tcp) (host = 192.168.188.219) (port = 1521 ))
)
(Connect_data =
(Server = dedicated)
(Service_name = sales)
)
)

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.