show parameter processes; 然后 更改系统连接数 alter system set processes=1000 scope=spfile; 下面是具体的操作步骤与说明 问题描述:客户端连接数据库报错 ORA-12516: TNS: 监听程序无法找到匹配协议栈的可用句柄 解决过程: 1。查看当前会话数、processes和sessions值,发现session数和2个参数的值已经非常逼近 SQL*Plus: Release 10.2.0.1.0 - Production on 星期一 10月 9 15:50:21 2006 Copyright (c) 1982, 2005, Oracle. All rights reserved. SQL> conn / as sysdba 已连接。 SQL> select count(*) from v$session; COUNT(*) ---------- 45
SQL> show parameter processes NAME TYPE VALUE ------------------------------------ ----------- ---------------------- aq_tm_processes integer 0 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_max_sessionspace_size integer 0 java_soft_sessionspace_limit integer 0 license_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=300 scope=spfile; 系统已更改。
3。查看processes和sessions参数,但更改并未生效 SQL> show parameter processes NAME TYPE VALUE ------------------------------------ ----------- ---------------------- aq_tm_processes integer 0 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_max_sessionspace_size integer 0 java_soft_sessionspace_limit integer 0 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 immediate
SQL> startup
SQL> show parameter processes NAME TYPE VALUE ------------------------------------ ----------- ---------------------- aq_tm_processes integer 0 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_max_sessionspace_size integer 0 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 最后测试加大连接数到50,100都没报ORA-12516错误。