Problem in accessing Oracle Database Server from Linux Machine

I am facing a strange issue in connecting to Oracle database from Linux Machine

  • The connectivity is not failing all the time , the failure to success ratio is 1:70.
  • Error "ORA-12545: Connect failed because target host or object does not exist"
  • Majority of the time the connection is successful
  • I am able to ping the target database server using the hostname defined in /etc/hosts
  • There is another Oracle server which has a seamless connectivity.

Entry in tnsnames.ora

XXX.XXXXXX.COM =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = XXX.XXX.XX.XX)(PORT = XXXX))
    )
    (CONNECT_DATA =
        (SERVER = DEDICATED)
        (SERVICE_NAME = XXXX)
       (FAILOVER_MODE =
        (TYPE = SELECT)
        (METHOD = BASIC)
        (RETRIES = 180)
        (DELAY = 5)

    )))

Does tnsping return successfully every time or is there a similar failure there?

The tnsping is not currently available in the machine, I wonder if we are allowed to use it.

Are either the DB or the client running on virtualised machines?

no both the server are not VM

Well, now we have the tnsping working.

[root@XXXXXX:xxx]# tnsping XXXX.XXXXXXXX.XX 5

TNS Ping Utility for Linux: Version 9.2.0.1.0 - Production on 25-AUG-2014 09:34:53

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

Used parameter files:
/usr/lib/oracle/11.2/client64//network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = XXX.XXX.XX.XXX)(PORT = XXXX))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XXXXXX) (FAILOVER_MODE = (TYPE = SELECT) (METHOD = BASIC) (RETRIES = 180) (DELAY = 5))))
OK (220 msec)
OK (230 msec)
OK (230 msec)
OK (230 msec)

Check Troubleshooting Guide for ORA-12545 / TNS-12545 Connect failed because target host or object does not exist (Doc ID 553328.1) on MOS.