Why am I receiving the ORA-12535 error when using a remote database?

An Oracle user asks why they are receiving the error ORA-12535: TNS: operation timed out when using a remote database.

I have two databases. One local (in domain ad.xyz.com) and a remote database (domain us.oracle.com). I am logging in to these from a client machine and I do not have DBA access.

I am able to TNSPING and connect using SQL*Plus to both of these databases. I have created a private DBlink in...

my local DB pointing to the remote DB. However, when I try to refer any object in the remote DB using this DBlink, I get the "ORA-12535: TNS:operation timed out " error. Since I am able to TNSPING and connect to the DBs, the .ora files are correct.

I have referred to all of the articles I could find on the Internet but these did not help in solving the issues. Can you please let me know what I may have missed out?

I have created the DBlink using the following -

us.oracle.com)(PROTOCOL = TCP)(HOST =ora10g)(PORT =
1521)))(CONNECT_DATA = (SID = TESTDB)))';

The only thing TNSPING tells you is that the database listener is up and is configured for the SID defined in your tns string. It does not indicate whether or not you can actually connect to the Oracle instance. The most common reason why you are receiving the ORA-12535 error is due to a firewall configuration issue. While the Listener is listening on port 1521, the connection will use a different port. The firewall could be blocking this other port. You may need to work with your network administrators to resolve this issue.

For more solutions to common Oracle errors, check out our Solving common Oracle errors guide.

Next Steps

How to avoid common Oracle TNS pratfalls

Dig Deeper on Oracle database administration

Data Management
Business Analytics
Data Center
Content Management