ORA-12516:TNS:listener could not find available handler with matching protocol stack

Posted code4app

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ORA-12516:TNS:listener could not find available handler with matching protocol stack相关的知识,希望对你有一定的参考价值。

登陆时报:

ORA-12516:TNS:listener could not find available handler with matching protocol stack

解决方法:

1.切换到oracle用户下:

su - oracle

2.停止数据库监听器:

 lsnrctl stop

3.等连接数下来后,登陆数据库:

sqlplus / as sysdba 

4.修改processes和sessions参数:

1)查看processes和sessions参数

SQL> show parameter processes;

SQL>show parameter sessions ;

2)修改processes和sessions参数

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

SQL>alter system set sessions=335 scope=spfile ;

SQL>commit ;

3)重启数据库

重启Oracle服务器才能生效

4)相关说明

ORACLE的连接数(sessions)与其参数文件中的进程数(process)有关,它们的关系:sessions=(1.1*process+5)

5)相关查询

a.查询数据库当前进程的连接数:select count(*) from v$process;

b.查看数据库当前会话的连接数:elect count(*) from v$session;

c.查看数据库的并发连接数:select count(*) from v$session where status=‘ACTIVE‘;

d.查看当前数据库建立的会话情况:select sid,serial#,username,program,machine,status from v$session;

e.查询数据库允许的最大连接数:select value from v$parameter where name = ‘processes‘; 或者:show parameter processes;

f.修改数据库允许的最大连接数:alter system set processes = 300 scope = spfile;

g.查看当前有哪些用户正在使用数据:

select osuser,a.username,cpu_time/executions/1000000||‘s‘,sql_fulltext,machine
from v$session a,v$sqlarea b
where a.sql_address = b.address
order by cpu_time/executions desc;

 

以上是关于ORA-12516:TNS:listener could not find available handler with matching protocol stack的主要内容,如果未能解决你的问题,请参考以下文章

ORA-12516:TNS:listener could not find available handler with matching protocol stack

Oracle报错ORA-12516 TNS:listener could not find available handler with matching protocol stack

Oracle报错ORA-12516 TNS:listener could not find available handler with matching protocol stack

ORA-12516, TNS: 侦听器找不到可用的处理程序

ORA-12516 TNS监听程序找不到符合协议堆栈要求的可用处理程序

ORA-12516: TNS: 监听程序找不到符合协议堆栈要求的可用处理程”的异常