Intermittent ORA-12545 with oracle RAC database

Problem: Client suffers intermittent ORA-12545 “Connect failed because target host or object does not exist” trying to connect to oracle RAC database.
Solution: Edit server side (not client side) listener.ora and tnsnames.ora files to have fully qualified hostnames.

Thanks to David Yahalom for flagging this – it doesn’t appear to be covered in metalink/my oracle support.

RAC servers were configured to resolve each others host names with – so ‘racserver1’ resolved to the same IP address as did the fully qualified name ‘’.

Client machine (web servers in my case) were not configured in that way. So they could resolve ‘’ ok, but could not resolve ‘racserver1’.

You might think that simply specifying the fully qualified hostnames in the client connect string (only) would be enough to resolve this. But no. Server side load balancing will every so often redirect the client to a new hostname. The client has to be able to resolve that new hostname, or it will report an ORA-12545. And that new hostname is supplied by the server, based on what is in the server listener and tnsnames settings. This behaviour is the default (at least in Oracle 11gR1).

This is especially likely with web servers, where security considerations might mean they don’t see exactly the same DNS as other servers do, so is often seen with jdbc, java, php oci8. But really it is a general oracle client issue – sql*plus would do the same from a client which could not resolve all of the server specified host names.

Bottom line – use fully qualified hostnames in RAC installation/DBCA, even when you think you don’t have to.

May 9, 2011

Leave a Reply

Your email address will not be published. Required fields are marked *