Q
Problem solve Get help with specific problems with your technologies, process and projects.

"TNS:connection closed" error

I created a database link to link two Oracle databases. When I queried the remote database, I got "Error: ORA-12537: TNS:connection closed." How can I resolve this?

I created a database link to link two Oracle databases. When I queried the remote database, I got "Error: ORA-12537: TNS:connection closed." How can I resolve this?
The first thing to check is to ensure that your configuration is set up correctly. Look in your tnsnames.ora config file and verify that the hots, port and service name for your TNS alias match the information configured for the remote server's listener.

Another problem might be a firewall issue. If there is a firewall between the database servers, your firewall may be configured to allow connections to remain open for a certain period of time, and you are past that period of time. The firewall terminates the connection and your local side receives this error.

You may also have a protocol.ora conifiguration file that is causing your problems. Many people do not need such a file. Rename the file (on the remote server) to something else and restart the listener. Then try your operation again. If you get the following query to work:

SELECT sysdate FROM dual@link_name;

Then you'll know everything is just fine. Those are the first places to look.

This was last published in July 2005

Dig Deeper on Oracle database design and architecture

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close