ORA-12537: TNS:connection closed – When Nothing Else Works!

Posted in: Oracle, Technical Track

When you’re sure all the TNS listener (SID_LIST_LISTENER in this case) services and db_domain are fine, but you still face the ORA-12537: TNS:connection closed error when trying to remotely access an open database, what can you do next?

[[email protected] admin]$ sqlplus sys/******@MYDB as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Wed Feb 3 17:45:29 2021

Copyright (c) 1982, 2013, Oracle. All rights reserved.

ERROR:
ORA-12537: TNS:connection closed

Here’s a quick tip — if you’ve been an Oracle DBA for long enough, you’ll know this workaround solves a variety of issues:

[[email protected] admin]$ cd $ORACLE_HOME/bin
[[email protected] bin]$ ls -lrt oracle
-rwxr-x--x. 1 oracle oinstall 242993632 Dec 18 19:20 oracle
[[email protected] bin]$ chmod 6751 oracle
[[email protected] bin]$ ls -lrt oracle
-rwsr-s--x. 1 oracle oinstall 242993632 Dec 18 19:20 oracle

As you can see, the CHMOD 6751 did it again!

The reason this happened to me is, somehow, these permissions were wrong in my LOCAL host (the one I was trying to use the SQLPlus* from).

I hope my experience helps you. If you have any questions or anything to add, please leave me a comment.

email
Want to talk with an expert? Schedule a call with our team to get the conversation started.

About the Author

Lead Database Consultant
Well known in the Oracle community in Latin America and Europe where he participates regularly in technology events, Matheus is actually the youngest Oracle ACE Director in the world. Lead Database Consultant at Pythian, Matheus is a Computer Scientist by PUCRS and has been working as an Oracle DBA for the last 10 years.

2 Comments. Leave new

Hi I’m using secure_control_listername param in listener.ora and when I give it it gives tns connection closed. After removing this param the error goes

Reply
Andre Moreira
July 1, 2022 5:09 am

I’m migrating my oracle 12 to 19.
Created new DBs with oracle 19. I’m able to access then with sysdba but unable to access with the assigned user to that db. I have this error.
Following your indication, I already had the oracle binary with those permissions.
The strange thing is that Oracle 12 DBs are still running and accessible as expected but only oracle 19 DBs have the issue.

Any tip?

Reply

Leave a Reply

Your email address will not be published. Required fields are marked *