Question: I'm trying to connect to Oracle and I get the ORA-12537: TNS: connection closed error. How do I fix an ORA-12537?
Answer: The ORA-12537 is an informational error, and the "real" error is the secondary error message.
ORA-12537 TNS:connection closed
Cause: Normal "end of file" condition has been reached; partner has disconnected.
Action: None needed; this is an information message.
The ORA-12537 error sometimes relates configuration issues in the sqlnet.ora, protocol.ora and listener.ora files. Verify that you service names match between your listener and remote client connect strings.
This ORA-12537 can also happen if your firewall has disconnected idle connections.
这里专家说了,检查 1. client连接的service name与服务器上是否一致.
Also, the ORA-12537 sometimes happens in these cases:
1. You have a path name that is too long for the Oracle TNS client. See MOSC note:263489.1.
Since the iORA-12537 ssue is caused by a large connection string there are several workarounds for the issue.
1. Install the exe in a shorter named directory.
2. Modify the TNS Names entry so that it is shorter.
3. Replace domain names with IP Addresses if that shortens and vice versa.
4. Remove any parameters from the entry that are not needed.
5. Patch the database Listener to the most recent version.
这里是说连接字符串内容太长, 将所有可配置的名称 缩短~缩短
2. Bug:1566794: CONNECTIONS FAIL WITH ORA-12537 WHEN USE_SHARED_SOCKET IS SET IN 8.1.7. Resolution is to set USE_SHARED_SOCKET to FALSE.
3. Tnsping Net Service Name fails with TNS-12537: TNS:connection closed or Sqlplus connection errors out with Ora-12537
* In the Sqlnet.ora file the parameter TCP.VALIDNODE_CHECKING is enabled and TCP.INVITEDNODES is set to some specific IP's of the Client Machine.
* If trying to connect to the Apps database, by default, with Oracle Apps Installation the parameter TCP.VALIDNODE_CHECKING is enabled and TCP.INVITEDNODES is set to Server Machines IP or Hostname.
* You can disable these parameters in the Sqlnet.ora
* Or add the client machines ip address in the TCP.INVITEDNODES list.
客户端ip被限制了, TCP.VALIDNODE_CHECKING 修改为false或在 TCP.INVITEDNODES 加入可信ip
4. For ORA-12537 relating from inter-version connections.
You can get the ORA-12537 error if you listed 10g database SID with 9i listener.
5. In Oracle Apps 11i, you can get the ORA-12537 because of an eBusiness Suite security feature (See MOSC note 291897.1). The fix is to edit your sqlnet.ora file to include the client IP address in the tcp.invited_nodes = (x.x.x.x, hostname, ...).