oracle服务器上某个数据库出现' ORA-12516: TNS: 监听程序找不到符合协议堆栈要求的可用处理程'错误,要解决该问题首先查看一下数据库现有的进程数,是否已经达到参数processes的大小。
?? a.select count(*) from v$process;???????????????????????? 取得数据库目前的进程数。
???b.select value from v$parameter where name = 'processes'; 取得进程数的上限。
1、查看当前会话数、processes和sessions值,发现session数和2个参数的值已经非常接近
SQL*Plus: Release 11.1.0.6.0 - Production on 星期一 9月?21 9:50:21 2009 Copyright (c) 1982, 2007, Oracle.? All rights reserved.
SQL> conn / as sysdba
已连接。SQL> select count(*) from v$session;
COUNT(*)----------????
? 45
SQL> show parameter processes
NAME???????????????????????????????? TYPE??????? VALUE
db_writer_processes????????????????? integer???? 1
gcs_server_processes???????????????? integer???? 0
job_queue_processes????????????????? integer???? 10
log_archive_max_processes??????????? integer???? 2
processes??????????????????????????? integer???? 50
SQL> show parameter sessions
NAME???????????????????????????????? TYPE??????? VALUE
java_soft_sessionspace_limit???????? integer???? 0l
icense_max_sessions???????????????? integer???? 0
license_sessions_warning???????????? integer???? 0
logmnr_max_persistent_sessions?????? integer???? 1
sessions???????????????????????????? integer???? 60
shared_server_sessions?????????????? integer
?
2、修改processes和sessions值
SQL> alter system set processes=300 scope=spfile;
系统已更改。
SQL> alter system set sessions=335 scope=spfile;
系统已更改。
3、查看processes和sessions参数,但更改并未生效
SQL> show parameter processes
NAME???????????????????????????????? TYPE??????? VALUE
db_writer_processes????????????????? integer???? 1
gcs_server_processes???????????????? integer???? 0
job_queue_processes????????????????? integer???? 10
log_archive_max_processes??????????? integer???? 2
processes??????????????????????????? integer???? 50
SQL> show parameter sessions
NAME???????????????????????????????? TYPE??????? VALUE
license_max_sessions???????????????? integer???? 0
license_sessions_warning???????????? integer???? 0
logmnr_max_persistent_sessions?????? integer???? 1
sessions???????????????????????????? integer???? 60
shared_server_sessions?????????????? integer
?4、重启数据库,使更改生效
SQL> shutdown
SQL> startup
SQL> show parameter processes
NAME???????????????????????????????? TYPE??????? VALUE
db_writer_processes????????????????? integer???? 1
gcs_server_processes???????????????? integer???? 0
job_queue_processes????????????????? integer???? 10
log_archive_max_processes??????????? integer???? 2
processes??????????????????????????? integer???? 300
SQL> show parameter sessions
NAME???????????????????????????????? TYPE??????? VALUE
java_soft_sessionspace_limit???????? integer???? 0
license_max_sessions???????????????? integer???? 0
license_sessions_warning???????????? integer???? 0
logmnr_max_persistent_sessions?????? integer???? 1
sessions???????????????????????????? integer???? 335
shared_server_sessions?????????????? integer