Oracle Network Products Getting Started Release 2.3.4 for Windows Platforms Go to Product Documentation Library 
Library
Go to books for this product 
Product
Go to Contents for this book 
Contents
Go to Index 
Index


 

Go to previous file in sequence Go to next file in sequence

Troubleshooting

This appendix describes how to resolve problems that can arise when you use Oracle Network Products. Specifically, this appendix covers the following topics:

Diagnosing SQL*Net

If you just completed installing and configuring your SQL*Net product and an attempt to make a basic peer-to-peer connection returns an Oracle error, this section may help you diagnose the cause of the problem.

This section helps you determine which parts of SQL*Net do function properly rather than the parts that do not work. This section helps you determine if the problem is:

Specifically, this section covers: For more information on specific error messages or technical bulletins on errors received when performing these diagnostics test, please check the following resources available to you:

Understanding Proper SQL*Net Installation

SQL*Net is Oracle Corporation's remote data access software. It enables both client-server and server-server communication (with applications residing on different machines communicating as peer applications) across any network.

The architecture of TNS is comprised of two software components that need to be installed on both the server and all client machines:

To verify proper installation:

Follow the instructions in "Verifying Installation" in Chapter 3, "Installation Overview".

Server Diagnostics

Note: You may need assistance from the server administrator to follow the instructions in this section. 
 
Answer the questions below: If you answer yes to any of the above questions/statements, skip this section and continue to "Client Diagnostics" in this appendix. If you are not sure or answered no to any of the above questions, please continue.

Diagnosing SQL*Net on the server involves two steps:

Step 1: Verify the Database Is Running

To check that the database is up:

Log into the database using SQL*Plus or Server Manager and connect with a valid username/password. For example:

C:\>SQLPLUS SYSTEM/MANAGER
A Connected message appears.

If you receive the following errors, have your server administrator assist you:

Step 2: Perform a Loopback Test

Loopback test requirements: To perform a loopback test:
  1. Follow the instruction in "Testing the Configuration on the Server" in Chapter 4, "Configuration" to start the listener and perform a loopback test.
  2. If the loopback test continues to fail, continue to Step 2.

    If the loopback test passes, skip to Step 3.

  3. Check the Problem/Solution Database Web Site at http://support.oracle.com for more specific information on the error received or contact Oracle Worldwide Support.

Client Diagnostics

At this point, you assume or know the server's SQL*Net listener is functioning properly because you answered yes to one or more of the following statements: To perform diagnostics on the client:
  1. Check that the underlying protocol stack (such as TCP/IP) is installed and a supported version is approved for use with the Oracle Protocol Adapter of choice.
  2. On the client, Oracle Corporation has numerous supported vendors.
    Additional Information: 

    See the Problem/Solution database for bulletins on Available Network Products for your operating system, using search words "Available," "Networking," or "Products."

     
    If you have newer versions of the protocol stack, then it might still work if the vendors' API has not changed. Such versions, however, are not supported.

    If you are using a Winsock compliant vendor, verify there are no duplicate copies of the WINSOCK DLL file on the system.

  3. Check the base connectivity of the protocol stack. You may need a network administrator's assistance.
  4. SQL*Net technology is layers above the underlying network transport stack and is dependent on the underlying network for a successful connection.
    Protocol  Connectivity Instructions 
    TCP/IP  Check that you can use file transfer or terminal emulation utilities (FTP, TELNET, and PING) from the workstation to the server where the listener and database reside. 
    SPX  Check that you can perform a Netware login to the machine that the database is on. Ensure you can map drives or use other Novell services such as Print Servers and File Servers on the Network. Check that the listener service is broadcasting by doing a DISPLAY SERVERS from the Novell server or any Novell file server on the SPX/IPX network. 
    DECnet  Check that you can use file transfer and terminal sessions (NFT and SETHOST). Also, check the DECnet network control program, which is a database of connectable nodes: 
    • NCP SHOW KNOWN NODES 
    • NCP LIST KNOWN NODE 
    Named Pipes  Check that you can see other computers or servers on the Microsoft network. Ensure you are able to share drives within the Microsoft network. 
     

  5. Ensure that the SQL*Net Client and appropriate Oracle Protocol Adapter have been installed by following the instructions in section, "Understanding Proper SQL*Net Installation," in this appendix.
  6. Ensure the client machine has the following two files: TNSNAMES.ORA and SQLNET.ORA in the proper directory.
  7. For Windows 3.1x the search order for SQLNET.ORA and TNSNAMES.ORA is as follows:

    For Windows NT and Windows 95, the search order for SQLNET.ORA and TNSNAMES.ORA is as follows: If you have any other working client machines connecting to your selected Oracle7 database using SQL*Net, back up your existing files and copy both the working TNSNAMES.ORA and SQLNET.ORA files from the working machine onto the non-working client workstations. This eliminates the possibility of errors in the files.

  8. Test the SQL*Net layer with SQL*Plus or Server Manager.
  9. It is advised not to use TNSPING. TNSPING works just like the TCP/IP PING utility. A socket is never created and open. TNSPING never connects with the Oracle7 database listener. It just checks to make sure a TNS listener is running on the server side. Therefore, a working TNSPING can be misleading.

  10. If the connection still fails:

SQL*Net Logging and Tracing

Both log and trace files are available for you to use in troubleshooting your network problems.

This section covers:

For server and listener, log files are by default located in ORACLE_HOME\NETWORK\LOG and trace files are by default located in ORACLE_HOME\NETWORK \TRACE. For client, log and trace files are by default located in the current working directory.

Logging

All errors encountered in Oracle network products are appended to a log file for evaluation by a network or database administrator. The log file provides additional information for an administrator when the error message on the screen is inadequate to understand the failure. The log file, by way of the error stack, shows the state of the software at various layers.

The default log file names are:

Tracing

Tracing can be used to examine and diagnose application connections across the network. The trace facility allows a network or database administrator to obtain more information on the internal operations of the components of an Oracle application network than is provided in a log file. Tracing an operation produces a detailed sequence of statements that describe the events as they are executed. All trace output is directed to trace output files that can be evaluated to identify the event that led to an error.

Default trace file names are:

The Difference Between Logging and Tracing

Logging reveals the state of Oracle components at the time of an error; that is, when an error occurs, it is logged to the log file. However, tracing describes all software events as they occur; that is, even when an error is not occurring. Information is posted into the trace file to show what is happening in the software. Thus, tracing provides additional information about events whether or not there is an error.
Additional Information: 

For more specific details about SQL*Net logging and tracing, refer to the following documentation 

 
Tracing and logging parameters are added to the SQLNET.ORA and LISTENER.ORA files. These parameters are described in "Using SQLNET.ORA Logging and Tracing Parameters" and "Using LISTENER.ORA Control Parameters" in Appendix E, "Configuration Files".

Tracing for Oracle Names Server

In some situations, it may be necessary to set tracing on for the Oracle Names Server. Tracing is set on by adding the parameter NAMES.TRACE_LEVEL = 16 in the NAMES.ORA file on the server (this file is located in ORACLE_HOME\NETWORK\ADMIN).
Note: NAMES.ORA is not created if you are using DDO. If you are using DDO, you must create the file manually. 
 
The next time the Names Server is started, a trace file named NAMESthread_id.TRC is created in directory ORACLE_HOME\NETWORK\TRACE.

If a client connection is not properly established, client tracing can give more information. Client tracing is set by adding the TRACE_LEVEL_CLIENT = 16 parameter to the SQLNET.ORA file.

Oracle Trace for SQL*Net

SQL*Net release 2.3 includes a new, optional source of SQL*Net tracing that uses the Oracle Trace product. Oracle Trace provides a standard, supported, tracing facility for Oracle products.

Oracle Trace is a general-purpose data collection product that is part of the Oracle Enterprise Manager systems management product family. Oracle Trace allows Oracle products to collect data for a variety of uses, such as performance monitoring, diagnostics, and auditing. In addition to its use in SQL*Net release 2.3, Oracle Trace is also used to capture data for the Oracle7 database.
Additional Information: 

See Understanding SQL*Net and Oracle Enterprise Manager Oracle Trace User's Guide contained in the Oracle Enterprise Manager Performance Pack documentation set for information on using Oracle Trace.

 

Resolving Common Error Messages and Codes

The most common error messages are detailed below:

ORA-12154: Could not resolve service name

Cause: SQL*Net could not find the connect descriptor specified in the TNSNAMES.ORA file.

Action: After verifying that the database is up, check the following:

    1. Make sure the domain specified by the service_name.domain parameter in the TNSNAMES.ORA file matches the value for the NAMES.DEFAULT_DOMAIN parameter in the SQLNET.ORA file.
    2. Try setting the TNS_ADMIN configuration parameter to the directory where the configuration files are stored.
    3. If connecting from a login box, do not begin the field for the connect string with an @ sign. Only use the @ sign if specifying the connect string in command line mode:
    4. SQLPLUS SCOTT/TIGER@service_name
    5. Make sure you have a TNSNAMES.ORA file on the client if you are not using an Oracle Names Server.
    6. Check for multiple copies of the TNSNAMES.ORA file.
    7. By default, TNSNAMES.ORA is located in ORACLE_HOME\NETWORK\ADMIN.

    8. Ensure that the configuration files were created with either SQL*Net Easy Configuration or Oracle Network Manager.
    9. If these tools were not used, many syntax errors can exist. The solution is to re-create the configuration files using SQL*Net Easy Configuration or Oracle Network Manager.
    10. In the TNSNAMES.ORA file, verify:
    11. If you are not using the MultiProtocol Interchange (MPI), remove the TNSNAV.ORA file created by Oracle Network Manager.
    12. Make sure that there are no duplicate copies of SQLNET.ORA.
    13. Turn on client tracing and re-execute the operation.
    14. The client trace file shows a secondary error code. To turn on client tracing, add or modify the variable TRACE_LEVEL_CLIENT in the ORACLE_HOME\NETWORK\ADMIN\SQLNET.ORA file to TRACE_LEVEL_CLIENT = 16.

    15. If you are using domain names, check your SQLNET.ORA file for the parameter NAME.DEFAULT_ZONE.
    16. The domain name must be specified in the connect string if no parameter exists in the SQLNET.ORA file. If you are not using domain names, then comment out this parameter in the SQLNET.ORA file:

      #NAME.DEFAULT_ZONE=domain
      If you comment out this parameter, you must also comment out the NAMES.DEFAULT_DOMAIN parameter:

      #NAMES.DEFAULT_DOMAIN=domain
    17. For Windows 3.1x, the ORA-12154 error can result from:

ORA-12203:TNS:unable to connect to destination

This message can appear in the following scenarios:

Cause: An invalid TNS service name was supplied in the connect string.

Action: Verify that the TNS service name supplied in your connect string exists in your TNSNAMES.ORA file and the ADDRESS information for that TNS service name is valid:

Cause: The destination system's listener is not listening.

Action: Verify that the remote system's SQL*Net listener is running. Enter:

Cause: There are underlying network transport problems.

Action: Verify with utilities supplied with the networking protocol being used that the protocol itself is functional. For example, with TCP/IP, try to PING the remote system.

Cause: TNSNAMES.ORA file is not located in the proper directory.

Action: Make sure the TNSNAMES.ORA file is located in ORACLE_HOME\NETWORK\ADMIN (the default) directory or an alternative path, as explained in "Client Diagnostics".

Cause: The incorrect Oracle Protocol Adapter for the selected networking protocol is installed.

Action: Ensure the correct DLL is installed by viewing the RGS file in the ORACLE_HOME\ORAINST directory:
File  Operating System 
WINDOWS.RGS  Windows 3.1x 
WIN95.RGS  Windows 95 
NT.RGS  Windows NT 
 
 

Cause: The (HOST=host_name) for TCP/IP or (SERVICE=tns_application) for SPX are not consistent on the clients and server machines.

Action: Ensure the (HOST=host_name) for TCP/IP or (SERVICE=tns_application) for SPX are the same on the server and client workstations.

Cause: The descriptor in the TNSNAMES.ORA file for the Oracle LU6.2 Protocol Adapter does not have the value for PLU_LA in upper case. This is irrespective of the case used in the SIDEINFO.NSD file for the symbolic destination name. For example: Action: Change the value to uppercase. For example:

ORA-12203: TNS: unable to connect to destination and ORA-12154: TNS: could not resolve service name Using 16-bit Applications on Windows NT

Cause: SQL*Net could not find the connect descriptor specified in the TNSNAMES.ORA file.

Action: After verifying that the database is running, check the following:

    1. Verify the SQL*Net listener is running. Enter:
    2. C:\>LSNRCTL
      LSNRCTL>STATUS [listener_name]
      where listener_name is the name of the listener defined in the LISTENER.ORA file. It is not necessary to identify the listener if you are using the default listener, named LISTENER.

      If the output indicates the listener is not running, try starting it with the command:

      LSNRCTL>START [listener_name]
    3. Ensure the TNSNAMES.ORA file is in the correct location.
    4. By default, TNSNAMES.ORA is located in ORACLE_HOME\NETWORK\ADMIN.

    5. Verify that configuration files were created with either SQL*Net Easy Configuration or Oracle Network Manager.
    6. If these tools were not used, many syntax errors may exist. The solution is to re-create the configuration files using SQL*Net Easy Configuration or Network Manager.

    7. Verify you are not using 16-bit SQL*Net SPX on Windows NT, as it is not supported, by ensuring the NTS.DLL file does not exist.
    8. If connecting from a login box, make sure you are not placing an @ symbol in front of your connect service name. For example, if your valid service name is ORCL, it actually looks for @ORCL in your TNSNAMES.ORA file.

ORA-3121: No interface driver connection - function not performed on Windows NT

Cause: This is caused from using a SQL*Net version 1 prefix in the connect string.

Action: Do not use the following prefixes in the connect string.

Cause: No connect string has been specified from a client machine with no Oracle database.

Action: Specify a connect string.

Resolving Oracle Names Server Problems

Problems with Oracle Names Server occur because:

Client Connections Not Established

The NAMESCTL utility provides the QUERY command, which queries the existence or contents of an object (for example, a database) stored in the Names Server. This command can be useful in situations where a client connection is not properly established.

For example, you can query the Oracle Names Server for alias V734.world through the NAMESCTL utility:

  1. C:\>NAMESCTL
  2. Oracle Names Control for Solaris: Version 2.0.4.0.0 - Production on 28-AUG-97
    14 :44:15
    Copyright (c) Oracle Corporation 1995.  All rights reserved.
    Currently managing name server "NS453EAE"
    Version banner is "Oracle Names for Solaris: Version 2.0.4.0.0 - Production"
     
    Welcome to NAMESCTL, type "help" for information.
  3. NAMESCTL>QUERY V734.WORLD *
  4. Total response time:   0.10 Message 707 not fo
    Response status:       normal, successful completion
    Authoritative answer:  yes
    Number of answers:     3
    TTL:                   1 Message 700 not fo
    Answers:
        data type is "tos.npd.omd"
            Syntax is CTEXT: "database"
        data type is "host.nm.omd"
            Syntax is TEXT: "netsol3"
        data type is "a.smd"
            Syntax is ADDR:
            ...(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(DEV=11)(HOST=
    machine1)(PORT=1526)))(CONNECT_DATA=(SID=V732)))

The "a.smd" data type that stores the address for V734.world allows you to determine if the address is correct (that is, for TCP/IP the host name and the port number must be the same as the ones defined in the LISTENER.ORA file on the server).

Service Is Not Resolved

When a service is not resolved through an Oracle Names Server:
  1. Make sure that the parameter USE_PLUG_AND_PLAY_listener_name (is defaulted to LISTENER) is set to TRUE in the LISTENER.ORA file on the server.
  2. Make sure that the parameter GLOBAL_DBNAME is set for each database in the SID_LIST_listener_name (listener_name is defaulted to LISTENER) section in the LISTENER.ORA file on the server.
  3. Use the LSNRCTL STAT command to see if the database you are trying to connect to is registered with the Names Server. The database is registered with the Names Server if the word Registered appears next to the database SID in the Services Summary section of the output.
  4. The LSNRCTL STAT output looks something like:

  5. Query the Names Server through the NAMESCTL utility for the SQL*Net service you are using. In the output, check the address for the service you are using and make sure it is correct. See the previous section "Client Connections Not Established".

SQL*Net Troubleshooting Hints and Tips from the Field

Below are some SQL*Net tips you may find helpful when you are unable to diagnose a problem:

Questions to Ask When Troubleshooting

Below are some questions to ask yourself when diagnosing a problem:

Contacting Oracle Worldwide Customer Support

How to Contact Oracle Worldwide Customer Support

Oracle Worldwide Customer Support can be contacted as follows:
Location  Contact 
United States of America  Telephone (1) (650) 506-1500 
Europe  Telephone (1) (44) (1344) 860-160 
Outside the United States and Europe  Your Oracle sales representative 
Worldwide  Visit: http://www.oracle.com/support/ 
 
For further information on how to contact Oracle Worldwide Customer Support, please refer to the included Customer Support Information Booklet.

Before You Call for Assistance

If after reading this appendix, you still cannot resolve your problems, call Oracle Worldwide Customer Support to report the error. Please have the following information at hand:
Go to previous file in sequence Go to next file in sequence 
Prev Next
Oracle 
Copyright © 1997 Oracle Corporation. 
All Rights Reserved.
Go to Product Documentation Library 
Library
Go to books for this product 
Product
Go to Contents for this book 
Contents
Go to Index 
Index