Network Topology   «Prev  Next»

Lesson 10 (TNS): Transparent Network Substrate
Objective Describe Oracle's TNS architecture.

Oracle TNS (Transparent Network Substrate)

The actual task of moving the data between two machines is left to the services provided by the networking software. Oracle software uses these underlying services to establish the communication between the components. Oracle uses a common set of services known as Transparent Network Substrate (TNS) to handle communication within Oracle components. It is important to remember this model of network communication. The acronym TNS occurs in many places, especially in error messages. TNS uses the underlying protocol, which could be TCP/IP, SPX/IPX, DECNET, AppleTALK, etc. This combination of TNS and the underlying networking protocol makes the diagnosis of problems quite challenging, but Oracle does provide some tracing facilities to make it easier. The Oracle Transparent Network Substrate (TNS) facilitates simple inter-database communication. To implement TNS, Oracle has built a management layer over the standard network topology.

Oracle management layer
Oracle management layer

Implement Oracle Net Services

To implement Oracle Net Services, several Oracle files must be present on the server:
  1. tnsnames.ora defines outgoing database requests. It contains all database names (SIDs) running on the processor.
    When a new database is added to a box, the file /etc/tnsnames.ora must be updated. This file also describes each domain name, including protocol, host, and port information.
  2. Listener.ora contains a list of destinations for incoming database connections. When a new destination database is added to a box, it must be added to /etc/listener.ora and the listener must be bounced.
In addition, TNS uses several server files to resolve host and service names. On UNIX, these files include:
  1. /etc/HOSTS lists all the host names and their corresponding IP addresses.
  2. /etc/SERVICES lists the SQL*Net services and their IP addresses.
The following series of images illustrates how a connection is made.

1) A request is made in SQL with a database link
1) A request is made in SQL with a database link

2) Oracle dictionary takes the link names and supplies the TNS service name
2) Oracle dictionary takes the link names and supplies the TNS service name

3) Service name is looked up in the tnsnames.ora file, and the host name, port number, SID
3) Service name is looked up in the tnsnames.ora file, and the host name, port number, SID

4) Host name is passed to the /etc/hosts file where it is used to get the IP address
4) Host name is passed to the /etc/hosts file where it is used to get the IP address

5) The network packet is shipped to the remote database using the IP address, port number, and protocol.
5) The network packet is shipped to the remote database using the IP address, port number, and protocol.

6) Remote listener intercepts the request and bequeaths a UNIX process
6) Remote listener intercepts the request and bequeaths a UNIX process

7) UNIX process connects to the remote database using the SID
7) UNIX process connects to the remote database using the SID, User ID and password

  1. A request is made in SQL with a database link name
  2. Oracle dictionary takes the link names and supplies the TNS service name, the USER ID, and password
  3. Service name is looked-up in the tnsnames.ora file, and the host name, port number, SID and protocol are supplied
  4. Host name is passed to the /etc/hosts file where it is used to get the IP address
  5. The network packet is shipped to the remote database using the IP address, port number, and protocol.
  6. Remote listener intercepts the request and bequeaths a UNIX process
  7. UNIX process connects to the remote database using the SID, User ID and password


Inter Database Communication
In the next lesson, two ways to connect to remote databases will be discussed.

Ad  Oracle Network Services