unable to connect to Oracle DB..TNS operation timed out error..

I am unable to connect an Oracle database from my machine. The following entry is there in the tnsnames.ora file.

      (ADDRESS = (PROTOCOL = TCP)(HOST = YYY.com)(PORT = 1521))

There is another db in the same server, which has a similar database, and I am able to connect to it with no problem.

When I try to tnsping XXX, I get
TNS-12535 : TNS: operation timed out error.

Any ideas why this error is happening?


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

slightwv (䄆 Netminder) Commented:
99% of the time a TNS-12535 is caused by a firewall between the client machine and database server.  Can you confirm this?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
LubomirMasarAuthor Commented:

Thanks..I may have to ask my sys admin about this..But he is unavailable for the rest of the week..that is the problem..
Is there a way I can check this myself? How do I know if there is a firewall between my machine and server?
slightwv (䄆 Netminder) Commented:
I don't know a way to detect a firewall.  If a single person in your organization is the only one that knows how things are put together, you had better keep him REAL happy...  Someone else should know.  They may not know what ports are allowed through the firewall but they should now the layout of the network.

You might post a question over in one of the network zones to see if they know a way.
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

what is the result if you try to PING the db server?
I can not believe that the DBA has running firewall on the Oracle server
but this is a brand new installation.
Investigate if other colleagues can connect that server.
If yes, try to find the firewall on your machine.
Keep in mind that Windows XP SP2 by default starts a firewall.
Find it in Control Panel and shut it down. Sort out hidden firewalls
(in PROCESSES - e.g. MicroTrend Personal Firewall)

If more users complain that they cannot connect the server
you have to investigate the server machine:
1. If the Listener is running
2. If the Oracle Instance is bounced
3. If the server machine is visible on the network

In Oracle 10g this also happens because of failed dynamic registration of the Oracle Instance
by the Listener. So you have post here the LISTENER.ORA file from the server machine.
slightwv (䄆 Netminder) Commented:
>>what is the result if you try to PING the db server?

I don't think ping will tell you anything here.  A TNS-12535 typically means that the Listener responded and the client was waiting for the server to talk on the new pipe created by the listener.

Most shops that don't fully understand Oracle networking, allow the listener port through the firewall thinking that's all they need.  The Firewall blocks the random high port that the listener creates and generates the 12535.
1. Find out if you are going through any Firewalls or Routers.
2. Try to "ping" the ip address or hostname from the client.
   Check the timing response and see if it is acceptable.
   If it is not, then you need to request assistance from your System or
   Network Administrator.

   With 8i and earlier, you can increase the listener.ora file parameter
   CONNECT_TIMEOUT_<listener_name> and make it a higher value.
   Doing this, however, will correct the connectivity problem but will be
   masking the real problem of the physical network.

   (See the Sqlnet / Net8 Administrators guide for details on how to make these

   With 9i and 10g, the CONNECT_TIMEOUT_<listener_name> parameter is
   obsoleted. You should consult the Net Services Administrator's Guide
   for your version to find out what connection timeout parameters are

3. With 10.1 and 10.2, an ORA-12535 or ORA-12170 can be received by the client
   if the time to connect is too slow. This can be true if the listener's
   parameter INBOUND_CONNECT_TIMEOUT_<listener_name> and/or Server's sqlnet.ora
   parameter SQLNET.INBOUND_CONNECT_TIMEOUT are set too low. This is especially
   true for 10.2 (see Note 345197.1).
   The corresponding error on the Server side may be an ORA-3136 in the
   alert log and the sqlnet.log may contain an ORA-12170.

You can check the below note from Metalink

Troubleshooting Guide TNS-12535 & ORA-12535 Errors
        Doc ID:       Note:119706.1
Forced accept.

EE Admin
Adding INBOUND_CONNECT_TIMEOUT value is a only workaround but what could be the possible reason to occur WARNING: inbound connection timed out (ORA-3136).
Slow connection of course.
Defect NIC card, defect LAN card, dual home mess on the server ....
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.