Solved

ORA-12560 TNS:protocol adapter error in oracle 9i

Posted on 2003-11-13
6
2,781 Views
Last Modified: 2008-03-10
I have Installed 1 Server and 2 client of Oracle 9i, in one client I can connect to my database BUT in another client I can't Connect and this message occures.

the path of tnsnames.ora file is already correct and the synatx of service name is true.

I had reinstalled the oracle client CD on my client Machine, but this didn't resolved my problem.

I don't Know what to do?
0
Comment
Question by:abbas_najafizadeh
  • 2
6 Comments
 
LVL 2

Expert Comment

by:AvalonSA
Comment Utility
This is a high level error reporting that an error occurred in the transport layer.
Since the 12560 is the end result of another problem and not necessarily the  
cause look at the accompanying errors in the error stack. To get an  error  
stack, a SQL*Net trace should be obtained.  Note 39774.1  describes how to  
set up SQL*Net tracing. Once you have the trace, you should be able to locate
the other errors accompanying the 12560. Note 39662.1 shows the SQL*Net  
components that take part during a connection.
 
Example of stack trace where a ORA-12560 appeared:
 
 -<ERROR>- nsres: id=0, op=13, ns=12545, ns2=12560; nt[0]=515, nt[1]=0,nt[2]=0
  Call failed...
  Exiting NRICALL with following termination result -1
  -<ERROR>- error from nricall
  -<ERROR>- nr err code: 12206
  -<ERROR>- ns main err code: 12545
  -<ERROR>- ns (2) err code: 12560
  -<ERROR>- nt main err code: 515
  -<ERROR>- nt (2) err code: 0
  -<ERROR>- nt OS err code: 0
  -<ERROR>- Couldn't connect, returning 12545
 
These lines show all of the errors that have been compiled up to the session  
layer within SQL*Net. 'ns' and 'ns2' are the primary and secondary error codes  
for the session layer. 'nt[]' is the error code given back by SQL*Net&#65533;s  
transport layer. Keep in mind that it is not the error code given by the  
specific transport protocol below SQL*Net. The nt[0], nt[1] and nt[2] are the  
primary, secondary, and tertiary error codes for the NT layer. The NT error  
codes are not available through the Oracle UNIX 'oerr' tool, but are available  
in the Oracle Network Products Troubleshooting Guide error documentation.
 
ORA-12560 ON WINDOWS NT:
 
Oracle errors are not visible if you try to start up the services  
(listener or Instance) via the Control Panel. Start the listener or start the  
database from the DOS command line to get more detailed information.  The Event Viewer  
(found in Windows NT's Administrative Tools) is another place to check for errors.




ORA-12560 CONNECTING TO THE SERVER ON UNIX - TROUBLESHOOTING
------------------------------------------------------------
 
ORA-12560: TNS:protocol adapter error
Cause:  A generic protocol adapter error occurred.
Action: Check addresses used for proper protocol specification. Before
        reporting this error, look at the error stack and check for lower
        level transport errors.  For further details, turn on tracing and
        re execute the operation. Turn off tracing when the operation
        is complete.
 
This is a high-level error just reporting an error occurred in the actual
transport layer. Look at the next error down the stack and process that.
 
 
1. ORA-12500 ORA-12560 MAKING MULTIPLE CONNECTIONS TO DATABASE  
 
   Problem:
   Trying to connect to the database via listener and the ORA-12500 are  
   prompted. You may see in the listener.log ORA-12500 and ORA-12560:
 
    ORA-12500:  TNS:listener failed to start a dedicated server process
        Cause:  The process of starting up a dedicated server process
                failed.  The executable could not be found or the
                environment maybe set up incorrectly.
       Action:  Turn on tracing at the ADMIN level and re execute the
                operation.  Verify that the ORACLE Server executable is
                present and has execute permissions enabled.  Ensure that
                the ORACLE environment is specified correctly in
                LISTENER.ORA. If error persists, contact Worldwide
                Customer Support.
 
   In many cases the error ORA-12500 is caused due to leak of resources in the  
   Unix Box, if you are enable to connect to database and randomly you get
   the error your operating system is reached the maximum values for some  
   resources. Otherwise, if you get the error in first connection the problem
   may be in the configuration of the system.
 
   Solution:
   Finding the resource which is been reached is difficult, the note 2064862.102
   indicates some suggestion to solve the problems.  
 
   
2. ORA-12538/ORA-12560 connecting to the database via SQL*Net
   
   Problem:
   Trying to connect to database via SQL*Net the error the error ORA-12538  
   is prompted. In the trace file you can see:
 
      nscall: error exit
      nioqper:  error from nscall
      nioqper:    nr err code: 0
      nioqper:    ns main err code: 12538
      nioqper:    ns (2)  err code: 12560
      nioqper:    nt main err code: 508
      nioqper:    nt (2)  err code: 0
      nioqper:    nt OS   err code: 0
 
   Solution:
   - Check the protocol used in the TNSNAMES.ORA by the connection string
   - Ensure that the TNSNAMES.ORA you check is the one that is actually being
     used by Oracle. Define the TNS_ADMIN environment variable to point to the
     TNSNAMES directory.  
   - Using the $ORACLE_HOME/bin/adapters command, ensure the protocol is
     installed. Run the command without parameters to check if the protocol is
     installed, then run the command with parameters to see whether a  
     particular tool/application contains the protocol symbols e.g.:
 
     1. $ORACLE_HOME/bin/adapters
     2. $ORACLE_HOME/bin/adapters $ORACLE_HOME/bin/oracle
        $ORACLE_HOME/bin/adapters $ORACLE_HOME/bin/sqlplus
 
    Explanation:
    If the protocol is not installed every connection attempting to use it will  
    fail with ORA-12538 because the executable doesn't contain the required  
    protocol symbol/s.
 
Error ORA-12538 may also be caused by an issue with the
'$ORACLE_HOME/bin/relink all' command. 'Relink All' does not relink the sqlplus
executable. If you receive error ORA-12538 when making a sqlplus connection, it
may be for this reason.
 
    To relink sqlplus manually:
    $ su - oracle
    $ cd $ORACLE_HOME/sqlplus/lib  
    $ make -f ins_sqlplus.mk install
    $ ls -l $ORACLE_HOME/bin/sqlplus --> should show a current date/time stamp
 
3. ORA-12546 ORA-12560 connecting locally to the database  
 
   Problem:
   Trying to connect to database locally with a different account to the  
   software owner, the error the error ORA-12546 is prompted. In the trace file  
   you can see:
 
     nioqper:  error from nscall
     nioqper:    nr err code: 0
     nioqper:    ns main err code: 12546
     nioqper:    ns (2)  err code: 12560
     nioqper:    nt main err code: 516
     nioqper:    nt (2)  err code: 13
     nioqper:    nt OS   err code: 0
 
   Solution:
   Make sure the permissions of oracle executable are correct, this should be:
 
   52224 -rwsr-sr-x   1 oracle dba  53431665 Aug 10 11:07 oracle
 
   
   Explanation:
   The problem occurs due to an incorrect setting on the oracle executable.
 
 
4. ORA-12541 ORA-12560 TRYING TO CONNECT TO A DATABASE
 
   Problem:
   You are trying to connect to a database using SQL*Net and receive the  
   following error ORA-12541 ORA-12560 after change the TCP/IP port in the  
   listener.ora and you are using PARAMETER USE_CKPFILE_LISTENER in  
   listener.ora.  
 
    The following error struct appears in the SQLNET.LOG:
 
    nr err code: 12203
    TNS-12203: TNS:unable to connect to destination
    ns main err code: 12541
    TNS-12541: TNS:no listener
    ns secondary err code: 12560
    nt main err code: 511
    TNS-00511: No listener
    nt secondary err code: 239
    nt OS err code: 0
 
   Solution:
   Check [NOTE:1061927.6] to resolve the problem.
 
   Explanation:
   If TCP protocol is listed in the Listener.ora's ADDRESS_LIST section and  
   the parameter USE_CKPFILE_LISTENER = TRUE, the Listener ignores the TCP  
   port number defined in the ADDRESS section and listens on a random port.
0
 
LVL 8

Expert Comment

by:baonguyen1
Comment Utility
If the fisrt client works so the problem should be on the second client setting. Please double check the tnsname.ora to ensure the connection string is correct. You can copy over that file from the fisrt machine. You may also need to check the sqlnet.ora file to see the different.

Can use try tnsping from the failed machine ? Check IP setting, subnet ... and ensure the second machi can see the server.

Hope it works for you.
0
 
LVL 2

Author Comment

by:abbas_najafizadeh
Comment Utility
how can I see the error Stack in Oracle?
0
 
LVL 2

Accepted Solution

by:
AvalonSA earned 175 total points
Comment Utility
You have to turn on the SQL*NET trace and then check the *.TRC files.

This table will help you to find the trace files.
--------------------------------------------------------------------
| Trace Parameters        | Configuration         |                        |
| Corresponding to        | File                  | Output Files           |
|-----------------------|-----------------------|------------------      |  
|                         |                       |                        |
| Client                  | SQLNET.ORA            | SQLNET.TRC             |
| Server                  |                       | SQLNET.TRC             |
| TNSPING Utility         |                       | TNSPING.TRC            |
| Names Control           |                       |                        |
|   Utility               |                       | NAMESCTL.TRC           |
|-----------------------|-----------------------|------------------      |
| Listener                | LISTENER.ORA          | LISTENER.TRC           |
|-----------------------|-----------------------|------------------      |
| Interchange             | INTCHG.ORA            |                        |
|   Connection            |                       |                        |  
|     Manager             |                       | CMG.TRC                |
|   Pumps                 |                       | PMP.TRC                |
|   Navigator             |                       | NAV.TRC                |
|-----------------------|-----------------------|------------------      |
| Names server            | NAMES.ORA             | NAMES.TRC              |
|_______________________|_______________________|__________________      |


0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
SSN Format in Oracle 2 59
Number Format 1 43
alter database link to change the password 2 30
Dataware house query tuning 9 29
Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now