ORA - 12537: TNS: connection closed 오류 처리 과정

13737 단어 OacleORA-12537
1. 동료 가 Oacle 테스트 가 바 뀌 어서 연결 이 되 지 않 는 다 고 했 습 니 다. 다음 과 같이 잘못 보 고 했 습 니 다.
[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: 

도청 이 정상 인지 확인 하고 Oacle 서비스 도 정상적으로 시 작 됐 지만 로그 인 이 되 지 않 았 습 니 다.
[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]$ 

PS: 원래 블 로그 주소:http://blog.csdn.net/mchdba/article/category/3254519, 원래 csdn 의 블 로 거 mchdba 허락 없 이 전재 거부
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: Oacle 의 연결 수 를 보 니 과연 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> 

Oacle 인 스 턴 스 를 다시 시작 하면 최대 연결 수가 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> 

좋은 웹페이지 즐겨찾기