当前位置:  数据库>oracle

ORA-12537: TNS:connection closed错误处理过程

    来源: 互联网  发布时间:2017-06-21

    本文导语: 1,同事说Oracle测试换了连接不上了,报错如下 [oracle@pldb236 admin]$ rlwrap sqlplus powerdesk/pd141118@PD236 SQL*Plus: Release 11.2.0.1.0 Production on Mon Nov 23 14:16:31 2015 Copyright (c) 1982, 2009, Oracle. All rights reserved. ERROR: ORA-12537: TNS:connection closed ...

1,同事说Oracle测试换了连接不上了,报错如下
[oracle@pldb236 admin]$ rlwrap sqlplus powerdesk/pd141118@PD236

SQL*Plus: Release 11.2.0.1.0 Production on Mon Nov 23 14:16:31 2015

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

ERROR:
ORA-12537: TNS:connection closed


Enter user-name: 

检查监听正常,Oracle服务也是正常启动的,但是登录不进去

[oracle@pldb236 admin]$ tnsping PD236

TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 23-NOV-2015 14:17:22

Copyright (c) 1997, 2009, Oracle.  All rights reserved.

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.180.236)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = powerdes)))
OK (10 msec)
[oracle@pldb236 admin]$ 
2,解决方案
[oracle@pldb236 bin]$ cd $ORACLE_HOME/bin/
[oracle@pldb236 bin]$ 
[oracle@pldb236 bin]$ 
[oracle@pldb236 bin]$ ll oracle
-rwsr-s--x. 1 oracle oinstall 210823844 Jul 31 13:21 oracle
[oracle@pldb236 bin]$ 
[oracle@pldb236 bin]$ chmod 6571 oracle
[oracle@pldb236 bin]$ 
[oracle@pldb236 bin]$ ll oracle
-r-srws--x. 1 oracle oinstall 210823844 Jul 31 13:21 oracle
[oracle@pldb236 bin]$ 



[oracle@pldb236 bin]$ rlwrap sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Mon Nov 23 14:20:09 2015

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


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

SQL> 
SQL> 

ok可以连接上了,问题初步解决

3,不过3分钟后,又不行了,登录不上去。

SQL*Plus: Release 11.2.0.1.0 Production on Mon Nov 23 14:29:17 2015

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

ERROR:
ORA-12537: TNS:connection closed

Enter user-name:

去查看lsnrctl状态:
[oracle@pldb236 bin]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 23-NOV-2015 14:30:33

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.180.236)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                23-NOV-2015 14:30:19
Uptime                    0 days 0 hr. 0 min. 13 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /oracle/app/oracle/diag/tnslsnr/pldb236/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.180.236)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "powerdes" has 1 instance(s).
  Instance "powerdes", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@pldb236 bin]$ 

看到后台alert的日志报错如下:

        Mon Nov 23 14:32:00 2015
        ORA-00020: maximum number of processes 150 exceeded
        ORA-20 errors will not be written to the alert log for
         the next minute. Please look at trace files to see all
         the ORA-20 errors.
        Mon Nov 23 14:32:47 2015
        Process m000 submission failed with error = 20
        Mon Nov 23 14:33:02 2015
        ORA-00020: maximum number of processes 150 exceeded
        ORA-20 errors will not be written to the alert log for
         the next minute. Please look at trace files to see all
         the ORA-20 errors.
        Mon Nov 23 14:34:03 2015
        ORA-00020: maximum number of processes 150 exceeded
        ORA-20 errors will not be written to the alert log for
         the next minute. Please look at trace files to see all
         the ORA-20 errors.

解决方案1:
lsnrctl stop 5分钟后,再lsnrctl start起来,问题解决了,是应用程序一直不停的连接数据库,占满了连接池导致的。

解决方案2:
查看oracle的连接数,果然为150

SQL> show parameter processes;

NAME                     TYPE    VALUE
------------------------------------ ----------- ------------------------------
aq_tm_processes              integer     0
db_writer_processes          integer     2
gcs_server_processes             integer     0
global_txn_processes             integer     1
job_queue_processes          integer     1000
log_archive_max_processes        integer     4
processes                integer     150
SQL> 
SQL> 
SQL> 

分析原因:

SQL> select count(1) from v$session t where t.status='INACTIVE' and t.username='PLAS';
  COUNT(1)
----------
        88

SQL> 
SQL> 
SQL> select count(1) from v$session t where t.status='INACTIVE' and t.username='PLAS';
  COUNT(1)
----------
         5

SQL> 

修改配置文件:

[oracle@pldb236 ~]$ find /oracle -name *init.ora*
/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/init.ora
/oracle/app/oracle/product/11.2.0/dbhome_1/srvm/admin/init.ora
/oracle/app/oracle/admin/powerdes/pfile/init.ora.7112015171232
[oracle@pldb236 ~]$ 

改动连接数,并且写入参数文件

alter system set processes=500 scope = spfile;
SQL> alter system set processes=500 scope=spfile;

System altered.

SQL> create pfile from spfile;

File created.

SQL> 

关闭重启oracle实例,启动就可以看到最大连接数已经变成了500,问题解决

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@pldb236 ~]$ rlwrap sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Mon Nov 23 23:09:00 2015

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

Connected to an idle instance.

SQL> startup;
ORACLE instance started.

Total System Global Area 6680915968 bytes
Fixed Size          2213936 bytes
Variable Size        4362078160 bytes
Database Buffers     2281701376 bytes
Redo Buffers           34922496 bytes
Database mounted.
Database opened.
SQL> 
SQL> 
SQL> show parameter processes;

NAME                     TYPE    VALUE
------------------------------------ ----------- ------------------------------
aq_tm_processes              integer     0
db_writer_processes          integer     2
gcs_server_processes             integer     0
global_txn_processes             integer     1
job_queue_processes          integer     1000
log_archive_max_processes        integer     4
processes                integer     500
SQL> 


    
 
 

您可能感兴趣的文章:

  • zilong28提问:Tomcat3.2报错内容是Error occurs when connecting DB: ORA-00020: maximum number of processes(59) exceeded 我应该如何解决,先谢了
  • 出现ORA-01401和ORA-01008错误?
  • Eclipse连接Oracle数据库的ORA-00604 ORA-12705错误
  • oracle ORA-01114、ORA-27067错误解决方法
  • Oracle不能删除表 ORA-00604 ORA-01422 错误
  • ORA-12514及ORA-28547错误解决方案
  • plsql连接oracle数据库报ora 12154错误解决方法
  • oracle 11g导出数据时报ORA 1455错误的处理方法
  • Oracle 数据库闪回功能设置出现ORA-19809和ORA-19804错误
  • 为什么我读取数据库时出现:ORA-00600: 内部错误代码,参数: [ttcgcshnd-1], [0], [],错误?
  • ORACLE出现错误1033和错误ORA-00600的解决方法
  • Linux 下数据库oracle出现ORA-27102错误的解决办法
  • PHP连接Oracle错误ORA-24324服务句柄未初始化的解决方法
  •  
    本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
    本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。












  • 相关文章推荐
  • 如何得到带有ora的行的下一行
  • 如何配置 linux 下 oracle 的 listener .ora 和
  • 浅析如何在tnsnames.ora中配置监听
  • Orcle的package中访问其它Schema的表报错ORA-00942解决方法
  • oracle远程连接服务器出现 ORA-12170 TNS:连接超时 解决办法
  • [Oracle] 浅析令人抓狂的ORA-01555问题
  • 解决报错ora-32035的方法分析
  • aq.executeQuery: ORA-00020: maximum number of processes (59) exceeded
  • ORA-00947:Not enough values (没有足够的值)的深入分析
  • solaris10 安装 ora9.2.0.1 时报错
  • 在UNIX下,我的ORA817该怎么样才可以自己启动呀?
  • 基于ORA-12170 TNS 连接超时解决办法详解
  • 安装oracle出现error:ora-01031:insufficient privilleges的解决
  • 谁能帮忙解释一下: ORA-01000 : maximun open cursors exceeded
  • 关于Oracle游标的问题(ORA-01000: maximum open cursors exceeded)
  • 我在Linux7。3下面装了一个Oracle8i,但是现在启动不起来了,总是报错ORA-01031: insufficient privileges
  • ORA-28002 Oracle 11g存在密码过期问题解决方案
  • Oracle ORA-22908(NULL表值的参考)异常分析与解决方法
  • oracle报错(ORA-00600)问题处理
  • 如何解决ORA-01843与NLS_DATE_FORMAT问题


  • 站内导航:


    特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

    ©2012-2021,,E-mail:www_#163.com(请将#改为@)

    浙ICP备11055608号-3