oracle使用服务名链接报错ORA-12537: TNS:connection closed

数据库连接如下:

[oracle@rxrac02 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sun Feb 1 15:41:30 2026

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL> SHOW PARAMETER service_names;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
service_names                        string      orcl
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
[oracle@rxrac02 ~]$ sqlplus system/oracle@orcl

SQL*Plus: Release 11.2.0.4.0 Production on Sun Feb 1 15:41:58 2026

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

ERROR:
ORA-12537: TNS:connection closed


Enter user-name: ^C^C

 

检查监听状态

[oracle@rxrac02 ~]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 01-FEB-2026 15:43:00

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

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                01-FEB-2026 15:37:47
Uptime                    0 days 0 hr. 5 min. 13 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/11.2.0/grid/network/admin/listener.ora
Listener Log File         /u01/app/grid/diag/tnslsnr/rxrac02/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.112.112)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.112.114)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM2", status READY, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
  Instance "orcl2", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
  Instance "orcl2", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@rxrac02 ~]$

 

报错google查询

文章如下:

https://doyensys.com/blogs/ora-12537-while-connecting-to-database/

 

检查oracle文件权限

 

rac集群两个节点更改oracle文件权限

[root@rxrac02 ~]# ls /u01/app/oracle/product/11.2.0/db_1/bin/oracle
/u01/app/oracle/product/11.2.0/db_1/bin/oracle
[root@rxrac02 ~]# ls -l /u01/app/oracle/product/11.2.0/db_1/bin/oracle
-rwxrwsr-x 1 oracle asmadmin 239501488 2月   1 00:08 /u01/app/oracle/product/11.2.0/db_1/bin/oracle
[root@rxrac02 ~]# chmod 6751  /u01/app/oracle/product/11.2.0/db_1/bin/oracle
[root@rxrac02 ~]# ls -l /u01/app/oracle/product/11.2.0/db_1/bin/oracle
-rwsr-s--x 1 oracle asmadmin 239501488 2月   1 00:08 /u01/app/oracle/product/11.2.0/db_1/bin/oracle
[root@rxrac02 ~]# ssh rxrac01
Last login: Sun Feb  1 15:32:55 2026 from rxrac02
[root@rxrac01 ~]# chmod 6751  /u01/app/oracle/product/11.2.0/db_1/bin/oracle
[root@rxrac01 ~]#

发现oralce组权限多了一个w,修改后链接成功

[root@rxrac01 ~]# su - oracle
上一次登录:日 2月  1 15:27:46 CST 2026pts/0 上
[oracle@rxrac01 ~]$
[oracle@rxrac01 ~]$
[oracle@rxrac01 ~]$
[oracle@rxrac01 ~]$ sqlplus system/oracle@orcl

SQL*Plus: Release 11.2.0.4.0 Production on Sun Feb 1 15:51:15 2026

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL>
SQL>
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
[oracle@rxrac01 ~]$ sqlplus system/oracle@rac-scan:1521/orcl

SQL*Plus: Release 11.2.0.4.0 Production on Sun Feb 1 15:51:31 2026

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL>
SQL>
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

 

posted @ 2026-02-01 15:56  IT杂物铺  阅读(1)  评论(0)    收藏  举报