Re: oracle error

From: Scott Stefick (sstefick@HARPER.CC.IL.US)
Date: Fri Oct 25 2002 - 17:27:10 EDT


Justin,

This information is from metalink.oracle.com:

------------SNIP------------------------------------------------------------
----------------------------------------------------------------------------
----------
TNS-12545
The TNS-12545 error normally occurs when the TCP/IP protocol cannot resolve a
given hostname either when initiating a connection, or when resolving a
hostname
from a redirect packet. (NOTE: SQL*Net does not resolve hostnames).
TNS-12545, "Connect failed because target host or object does not exist"
Cause: The address specified is not valid, or the program being
connected to does not exist.
Action: Ensure the ADDRESS parameters have been entered correctly; the
most likely incorrect parameter is the node name. Ensure that the
executable for the server exists (perhaps "oracle" is missing.)

Diagnosing the Error
1. Create a level 16 trace file and reproduce the problem
a. edit the sqlnet.ora file
b. add the parameter TRACE_LEVEL_CLIENT=16
c. reconnect in order to receive the TNS-12545 error again
d. exit the connecting application (i.e. SQL*Plus)

2. Open the client trace (probably cli.trc) in a text editor
a. search for the line:
"nttbnd2addr: *** hostname lookup failure! ***"
b. The line above this line reveals the hostname trying to be resolved
by TCP/IP (NOTE: SQL*Net does not resolve hostnames).

3. Solutions:
a. Verify this hostname is spelled correctly
b. Verify this hostname actually exists by executing the OS command
"nslookup [hostname]" where [hostname] is the value of the HOST parameter
defined for the Net service name being used for the connection.
c. Add the hostname, returned by the trace, to the local hosts file and
assign it
the correct IP address (NOTE: this hostname may be a secondary network card
on the server or in some cases you need to add the 'Hostname.DomainName'
of the server in the etc/Hosts file at the client side).
d. Using the IP address of the server for the HOST value in the tnsnames.ora
file may also be a solution. This avoids Host to IP resolution.

[Optional] Further Diagnosis
4. Search for a redirect packet
a. From within the client trace file at the line "nttbnd2addr: *** hostname
lookup failure! ***", search upward for the word "NSPTRD"
b. If "NSPTRD" is found, then the failure is due to a Multi-threaded Server
dispatcher returning the hostname of an alternate network card on the server.
This is not a bug as dispatchers listen on what is defined as the primary
network card bound to the operating system.

5. Solutions:
a. Force MTS dispatchers to listen on the correct network card on the server -
thereby returning a valid redirect address. Redefine the MTS syntax in the
init.ora file (NOTE: this example is for Oracle9i):
dispatchers="(address=(protocol=tcp)(host=[correct_host/ip]))(dispatchers=3)"
b. Add a hosts file entry for the hostname being returned from the redirect
packet.
TNS-12545 when starting the listener
The hostname value for the HOST parameter in the listener.ora file could
not be resolved
by TCP/IP (NOTE: SQL*Net does not resolve hostnames). Verify it's accuracy,
or replace the
hostname value with the IP address, and retry the operation.
Resolving a TNS-12545 when TCP/IP is not being used
TNS-12154 errors can occur when making a local Bequeath connection on the
Oracle server.
A TNS-12154 can occur if the ORACLE_HOME is not set correctly, if the
ORACLE_SID is not set
correctly, or if the application (such as SQL*Plus) is not linked with
correctly. See the
appropriate product documentation on linking Oracle correctly (usually
/usr/ccs/bin/make
is the correct linker to use).
Other Situations that Produce a TNS-12545
· Verify the oracle_home/bin 'oracle' executable exists. If it is not
there, relink or reinstall Oracle.
· On Unix, ensure that the oracle user has access rights to etc/hosts.
· On Unix, the permissions on resolv.conf may be incorrect. Login as
root and change the permissions:
% chmod 755 /etc/resolv.conf
· With the 3rd party tool CATII, add a \ in front of the @ symbol in
the connect string:
For example: user/password\@alias
· On NT, verify LOCAL does not exist in registry.
System Key: [HKEY_LOCAL_MACHINE\Software\Oracle\Home(x)]
Value Name: LOCAL
· This note also pertains to
WinNT error 1067
WinNT error 2140

------------SNIP------------------------------------------------------------
----------------------------------------------------------------------------
----------

Hope this helps!

-Scott

At 04:20 PM 10/25/02 -0400, you wrote:
>Oracle question again. I had my test database working great then I rebooted
>my AIX system now I get this when I try to start the listener back up for
>Oracle:
>
>$ bin/lsnrctl
>
>LSNRCTL for IBM/AIX RISC System/6000: Version 8.1.6.0.0 - Production on
>25-OCT-2
>002 16:11:16
>
>(c) Copyright 1998, 1999, Oracle Corporation. All rights reserved.
>
>Welcome to LSNRCTL, type "help" for information.
>
>LSNRCTL> start
>Starting tnslsnr: please wait...
>
>TNS-12545: Connect failed because target host or object does not exist
> TNS-12560: TNS:protocol adapter error
> TNS-00515: Connect failed because target host or object does not exist
> IBM/AIX RISC System/6000 Error: 2: No such file or directory
>LSNRCTL> quit
>
>Here are the contents of my listener.ora file:
>
>$ more listener.ora
># LISTENER.ORA Configuration
>File:/home/oracle/OraHome1//network/admin/listener.
>ora
># Generated by Oracle configuration tools.
>
>LISTENER =
> (DESCRIPTION_LIST =
> (DESCRIPTION = dragonlf database
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
> )
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = TCP)(HOST = tsmtest)(PORT = 1521))
> )
> )
> (DESCRIPTION =
> (PROTOCOL_STACK =
> (PRESENTATION = GIOP)
> (SESSION = RAW)
> )
> (ADDRESS = (PROTOCOL = TCP)(HOST = 168.162.31.49)(PORT = 2481))
> )
> )
>
>SID_LIST_LISTENER =
> (SID_LIST =
> (SID_DESC =
> (SID_NAME = PLSExtProc)
> (ORACLE_HOME = /home/oracle/OraHome1/)
> (PROGRAM = extproc)
> )
> (SID_DESC =
> (GLOBAL_DBNAME = dragonlf)
> (ORACLE_HOME = /home/oracle/OraHome1/)
> (SID_NAME = dragonlf)
> )
> )
>
>$
>
>Here are the contents of my tnsnames.ora file:
>
>
>$ more tnsnames.ora
># TNSNAMES.ORA Configuration
>File:/home/oracle/OraHome1//network/admin/tnsnames.
>ora
># Generated by Oracle configuration tools.
>
>DRAGONLF =
> (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = TCP)(HOST = tsmtest)(PORT = 1521))
> )
> (CONNECT_DATA =
> (SERVICE_NAME = dragonlf)
> )
> )
>
>EXTPROC_CONNECTION_DATA =
> (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
> )
> (CONNECT_DATA =
> (SID = dragonlf)
> (PRESENTATION = RO)
> )
> )
>
>$
>
>Any suggestions would be appreciated thanks!.
>
>--Justin

******************************************
Scott Stefick
UNIX Systems Administrator
Oracle Certified Professional DBA
Wm. Rainey Harper College
847.925.6130
******************************************



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:17 EDT