Oracle数据库操作之如何查看并修改最大连接数

数据库最近这几天,经常报这个错误,TNS:listener could not find available handler with matching protocol stack

解决方式:修改最大连接数

--查看连接线程数
SELECT COUNT(*) FROM V$PROCESS;

--查询连接线程数配置表
select * from v$parameter where name ='processes';

--统计数据库连接的消耗情况
select  b.MACHINE, b.PROGRAM, b.USERNAME, count(*) from v$process a, v$session b where a.ADDR = b.PADDR and  b.USERNAME is not null  group by  b.MACHINE, b.PROGRAM, b.USERNAME order by count(*) desc;

--修改最大连接数,重启监听和服务后生效
alter system set processes = 1000 scope = spfile;

 

你可能感兴趣的:(工作经验总结,数据库)