Note: I have transferred this blog from my old blog site: http://dcarapic.blogspot.com/ so I am reposting most of the stuff from there
Recently I have encountered a strange kind of error while setting up an application on the client computer(s). Application (.NET) connects to an Oracle 11g database (via Microsoft Oracle database provider and Oracle InstantClient 188.8.131.52) which is on a central server. All client computers are on remote locations with a Cisco router and a permanent VPN connection with NAT translation.
On some clients the application would report ORA-12545 error few times while attempting to connect to a database. Once the connection was established the application worked fine. Needless to say I was baffled by the error and could not locate the problem. Finally, after several hours of googling, I have determined that the problem was that we specified the database server with an IP address and there was no DNS name for it.
It would seem that the OCI connected via IP address, and then someone (I am not sure if it is the Cisco router or the Oracle database) returned the real DNS name of the server. This apparently confused the OCI driver which then reported ORA-12545: Connect failed because target host or object does not exist. After adding the real name of the server to the
windows\system32\drivers\etc\hosts file the problem was resolved.
Edit: After googling some more I have found this blog post which might shed more light into the problem: http://tardate.blogspot.com/2007/06/check-locallistener-if-you-run-rac.html