Hi guys,

We had today a very strange problem regarding db links.
Platform - HP-UX
Oracle version - 8.0.5

All the db links have suddenly stopped working.
for example:

SQL> select count (*) from tab@ORG_PROD;
select count (*) from tab@ORG_PROD
*
ERROR at line 1:
ORA-12545: Connect failed because target host or object does not exist

SQL> select owner,DB_LINK ,USERNAME,HOST
2 from dba_db_links
3 where db_link like 'ORG_PROD%';

OWNER DB_LINK USERNAME HOST
---------- ------------------ ------------------------------ ----------
PUBLIC ORG_PROD.WORLD ORG_PROD_OREN metarp

in the tnsnames:
-----------------
metarp =
(DESCRIPTION =
(ADDRESS = (PROTOCOL= TCP)(Host=hp19a)(Port= 1521))
(CONNECT_DATA = (SID = prod2))
)

sqlplus from the host has worked:
-----------------------------------
hp66 61: sqlplus system/manager@metarp

SQL*Plus: Release 8.0.5.0.0 - Production on Sun Jul 20 15:13:57 2003

(c) Copyright 1998 Oracle Corporation. All rights reserved.


Connected to:
Oracle8i Enterprise Edition Release 8.1.7.3.0 - 64bit Production
With the Partitioning option
JServer Release 8.1.7.3.0 - 64bit Production

SQL>

I've found a case in the metalink that changing the hostname from a name to IP number would have solved the problem.I havn't found an explanation.
I've changed the hostname in the tnsnames.ora from a name to ip number:

metarp =
(DESCRIPTION =
(ADDRESS = (PROTOCOL= TCP)(Host=139.135.27.121)(Port= 1521))
(CONNECT_DATA = (SID = prod2))
)

Now the db link works:
SQL> select count (*) from user_objects@ORG_PROD;

COUNT(*)
----------
463

The question is why ip number works and hostname does not?
Has anyone faced this kind of problem?


Thanks in advance,
Nir