How do I resolve connection errors generated while using Toad

I am trying to connect to a database server that is using port 1522. Whenever I try to connect from Toad on my laptop I get the following error: ORA-12170: TNS:Connect timeout occurred
When I tnsping from my laptop I get the following message: TNS-12535: TNS:operation timed out
When I connect to the database using Putty and tnsping the connection is instantaneous and the tnsping returns back the tns string and OK (0 msec)
There is no firewall on the database server I am trying to connect to. My laptop has Oracle installed and the listener is configured for port 1521. Can someone help me to resolve this issue?
sikyalaSenior Database AdministratorAsked:
Who is Participating?
 
mozzisCommented:
The results using putty mean that you can connect to server via ssh (port 22) but not via Oracle protocol on port 1521. Are you quite certain there is no firewall on the server? That would be very unusual (as well as unwise.)
0
 
sikyalaSenior Database AdministratorAuthor Commented:
I should have been more precise. There is no firewall blocking me from connecting to the database server.
0
 
johnsoneSenior Oracle DBACommented:
You say that the database is on port 1522.  What is the entry in the tnsnames.ora file for the database?  Does it reference port 1522?

You also say you have client installed on your laptop and the listener is configured for port 1521.  Are you running a listener on your laptop?  That wouldn't be required for a client connection.

I would also look in your putty setup.  You may have some port changes set up within putty that are redirecting your connection when you are connected through putty that you are not aware of.
0
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.

 
sikyalaSenior Database AdministratorAuthor Commented:
TNSNAMES.ORA entry:
<sid>.usae.<system name>.com =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = backupdb)(PORT = 1522))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = <sid>.usae.<system name>.com)
    )
  )

Yes I have a listener on my laptop configured for port 1521 which is a part of the database server on my laptop.

0
 
slightwv (䄆 Netminder) Commented:
TNSPING only talks to the listener. It doesn't not actually open up a connection to the database.

I know you've already said there is not a firewall between your laptop and the database server but 99.9% of the time when I see that error, it is some piece of network gear restricting the high ports.

Is the windows firewall on the laptop configured?

There are two ways around the random high-port issue with Oracle networking:  
- Configure Multi-Threaded server and you can limit the ports used to a few defined ones.
-Tell the Listener to not pick a random high port and keep everything on the listener port with the USE_SHARED_SOCKET variable.

Both of these work-arounds have negatives.
0
 
johnsoneSenior Oracle DBACommented:
Then the listener on the laptop does not enter into the picture.

If you use tnsping to get to the database from your laptop without an established putty connection what happens?  What happens with a putty connection established?

If tnsping works in at least one case above, then...  same questions for a database connection.

What I am thinking here is that port 1522 is allowed through the firewall and tnsping will work in all cases.  The database connection will fail without a putty connection, but due to some port forwarding or tunnelling set up in putty it will work with putty connected.

As slightwv said, these are typically firewall issues.  Something is probably letting through only port 1522.  This would allow tnsping to work in all cases, but the database connections wouldn't work in all cases.  An additional method around the port issues is to use connection manager.
0
 
mozzisCommented:
OP already says tnsping does not work from laptop
0
 
sikyalaSenior Database AdministratorAuthor Commented:
johnsone you are right I had to create a  tunnel in putty and open a connection then open toad and it allowed me to log in successfully. slightwv i contacted the SAs and found out while there is no firewall on the server that is restricting connections there are some firewall restrictions based on the subnet that exist based on the location of the server if that makes any sense.
0
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.

All Courses

From novice to tech pro — start learning today.