Network Topology   «Prev  Next»

TNS Names.ora File - Exercse

The sqlnet.ora file in further Detail

Working with sqlnet.ora and tnsnames.ora files

Question: Which basic knowledge should an Oracle consultant have regarding the sqlnet.ora and tnsnames.ora files?
An Oracle consultant must have robust foundational knowledge about the sqlnet.ora and tnsnames.ora files as these are vital components for client-server communication in an Oracle networked environment.
  1. sqlnet.ora: The sqlnet.ora file is a configuration file that contains SQL*Net (Net8), the foundation of Oracle's network architecture, parameters. It is used to determine:
    1. The client's domain to append to unqualified service names or net service names.
    2. Logging and tracing features to use for Oracle Net Services.
    3. Preferred Oracle Names servers.
    4. Wallet location for SSL.
    5. The order of naming methods the client should use when resolving a name.

    An Oracle consultant should understand the nuances of configuring these parameters to optimize SQL*Net behavior and troubleshoot connectivity issues.
  2. tnsnames.ora: The tnsnames.ora file is a SQL*Net configuration file that contains net service names mapped to connect descriptors. A connect descriptor contains the location of the database and the name of the database service. This file is used to:
    1. Set up connection addresses for the Oracle Database.
    2. Define the protocol (TCP, IPC) used for communication.
    3. Specify the host and port.
    4. Provide the service name of the database to connect to.

The tnsnames.ora file is fundamental for setting up connections to an Oracle Database. It allows for aliasing of long and complex service names to shorter, more manageable names.
For any Oracle consultant, understanding these files and their parameters are paramount in efficiently managing and resolving any network-related issues in Oracle. They should also be well-versed with tools like TNSPING and TNSENLSTNR that aid in diagnosing network issues. Knowledge of how to securely configure these files to protect sensitive data from network threats is also critical.
Objective:Define a sqlnet.ora and a tnsnames.ora file.

Exercise scoring

This exercise is worth a total of 20 points. To receive full credit, you will need to supply a complete tnsnames.ora entry for the new databases.

Background

Given the class project, you are now ready to define a master tnsnames.ora file and sqlnet.ora file. Let us review our connectivity rules:
Corporate headquarters ( $ORACLE_SID=HQ, hostname=abq) has identified a need to capture daily summary information on the total number of orders at each remote site
($ORACLE_SID=ORDER, raleigh_host=raleigh, colorado_host=dilbert). 
They also want to know the total production volumes for each product ( $ORACLE_SID=MFG, hostname=fred) at the Rochester plant. In addition, each of the sales offices needs to check the inventory levels at Rochester to ensure that the product for each order is in stock.

Instructions

Given the sample template below, create a tnsnames.ora file that can be used by all clients at ABC Corporation.
location=
(DESCRIPTION=
       (ADDRESS=
       (PROTOCOL=TCP)
       (HOST=host_name)
       (PORT=1527)
       )       
       (CONNECT_DATA=
       (SID=site_identifier)
       )
)

Hint

Remember that both Raleigh and Colorado Springs are running identical databases.

Submitting the exercise

Type or paste your answer into the text box below. Then click the Submit button to submit your answer and view a results page.