Page 473
NOTE |
Oracle has a document that will provide a list of all DLLs needed for SQL*Net versions up to 2.2. The document is Problems Resolution Number 1015204.4, and can be accessed using Metalink or provided to you through Oracle World Wide Customer Support.n |
There are also several tools available on the client that will help in determining the cause of connection problems:
TNSPINGThis utility allows a user to see whether the SQL*Net connection is working properly or whether another underlying problem exists. The utility will attempt to connect to a Listener on a database server, and return a successful connection attempt if the Listener responds. Note that this will not give you any idea whether database connections are working, but it will reassure you that you are able to connect to the target database server. To use this utility, you use the TNS alias (as defined in your tnsnames.ora file) as an argument to the command. For example, TNSPING PROD01.
PINGThis utility is a TCP/IP tool, rather than an Oracle networking tool. It will test your connectivity to a networked computer. If you are able to use PING to establish a connection to a host, you can be assured your TCP/IP networking software is properly configured and that the physical route to the host is established. To use this utility, use the computer name of the host you are attempting to contact. For example, ping dbprod.acme.com.
TRCROUTEThis is another utility that will display the route taken by a packet from your computer to the target host. TRCROUTE shows the route the connection is taking and can pinpoint the exact location where a problem exists. The output produced is similar to Listing 20.1.
Page 474
Listing 20.1Output of TRCROUTERoute of TRCROUTE: ------------------ Node: Client Time and address of entry into node: ------------------------------------------------------------ 28-NOV-97 22:01:15 ADDRESS= PROTOCOL=TCP Host=hpdev Port=1521 Node: Server Time and address of entry into node: ------------------------------------------------------------ 28-NOV-97 22:02:07 ADDRESS= PROTOCOL=TCP Host=hpdev Port=1521 In the event of an unsuccessful connection, the output would be similar to the following: Route of TRCROUTE: ------------------ Node: Client Time and address of entry into node: ------------------------------------------------------------ 28-NOV-97 22:01:15 ADDRESS= PROTOCOL=TCP Host=hpdev Port=1521 TNS-12203: TNS:unable to connect to destination TNS-12541: TNS:no listener TNS-12560: TNS:protocol adapter error TNS-03601: Failed in route information collection
This output gives more information than TNSPING. Here, it shows that the connection failed and where the problem most likely resides. In this case, it is likely that the listener is not up.
If errors or problems occur at the server, ask the following questions:
TIP |
In order to more easily identify and isolate problem connections, set the trace to a new file. To do this, use the following: |
Page 475
This places the trace file in the same default directory as the current trace files. As with all tracing activity, there will be a reduction in performance while tracing. It should be used for troubleshooting only.
As the complexity of your Oracle network increases, the time and degree of difficulty involved in managing the network also increases. The Oracle Names server provides Oracle administrators with a more robust and centralized method of administering naming information previously stored only in the tnsnames.ora filesthe database aliases. The Names server provides the means to store SQL*Net V2 and Net8 database aliases in a central database repository, rather than in physical files maintained on individual clients or shared network directories. In a Names server environment, database aliases are passed from the client to the Oracle Names server, which consults its internal lookup map and passes the complete connect string back to the client. This lookup map of aliases and complete addresses can be stored in an Oracle database, or in memory of the Names server computer. In a Names server environment the only configuration the client needs is the name and address of the Oracle Names serverall other configuration information can be stored and retrieved from the Names server. As an added benefit, version 2 of the Names server introduced the capability of discovering network resources automatically. This functionality is extended in Net8, where Net8 resources will announce their availability to the Names server when they are started.
A Names server can either replace or supplement the tnsnames.ora name resolution mechanism. Clients can be configured to consult any number of available directory services, moving on to the next if the current service fails to resolve the requested name. For example, production database aliases can be stored in the central Names server, and individual development or testing database aliases can be maintained by developers on their own clients in their personal tnsnames.ora files. When a production application runs, the Names server will provide the TNS lookup information; when the developer attempts to connect to a test database not stored in the Names server, his or her personal tnsnames.ora file will resolve the alias.
The creation and configuration of a Names server can add complexity and overhead to your overall environment, and the decision to go with one or the other should be made carefully. However, the ease of administration and the headaches saved by managing your database resource information centrally can be well worth the initial costs of installation. Environments with many databases, or frequent configuration or naming changes, would be well served by investigating Oracle Names. The capability for the Names server of automatically discovering resources is also a strong point in favor of opting for installation.
The configuration information for the Oracle Names server is stored in the names.ora file in $ORACLE_HOME/network/admin. Parameters affecting the Names server can also be found in sqlnet.ora. The recommended method for generating these files is through Network