Thursday, September 6, 2007

Ora-12203 SQL*PLUS CONNECTS ON SERVER, FAILS FROM CLIENT

Problem Description:
====================

You can connect through tnsnames on the server, and you can tnsping the
server's alias, but connection and tnsping fails when you attempt to connect
from a client machine.

Example:
--------

On server:
~~~~~~~~~~
tnsping ... OK.
expands properly, shows server name, connecting to proper port.
sqlplus uid/pwd@... connects.

On client:
~~~~~~~~~~~
sqlplus uid/pwd@... fails with
ORA-12203, "TNS:unable to connect to destination"

tnsping ... fails with
TNS-12541, "TNS:no listener"

Problem Explanation:
====================
One of simple reason might be firewall on server machine is enabled.
Disable the firewall and check the client connection.


Problem Explanation:
====================

You have multiple Network Interface Cards (NICs) on the server, and the server
name resolves to different IP addresses based on where it is pinged from: hence
the server has one IP address when pinged from itself, but another when pinged
from the network.


Search Words:
=============

sqlnet, NIC, IP, dual, ethernet, card, FDDI, configured, listen, binding,
/etc/hosts

Solution Description:
=====================

You must ensure that the IP address mapped to the server is consistent. If
there are two network cards, one should be primary to the server: this should
be the one that the DNS name of the server resolves to, from the server AND
from the network.

When using TCP/IP 'ping', the server name must resolve to the same IP address
from all locations. Test by using ping from the server, and from the client,
and ensure that the IP addresses match.

If not, check the "/etc/hosts" file for incorrect entries, and check the
bindings on the cards on the server.

Check for unusual situations: in one case, this was solved because the server
was configured with two NIC cards, one on Ethernet, the other FDDI. The
Ethernet card was configured as the default card - even though it was not
connected to the network! When it was removed, the problem was resolved.


Solution Explanation:
=====================

The listener registers the IP address of the server when it starts up. This is
based on how the DNS name or IP address is resolved on the server.

When a client attempts to connect, it connects to the IP address of the server,
as resolved from the client. If the IP address resolves differently on the
server and the client (even if the name is the same) then the client will not
be able to find the server

No comments: