oracle 处理Session不够用

1.查看现在的链接数

select count(*) from v$process    --当前正在使用的

2.查看session的参数值

show parameter sessions

3.查看历史session

select to_char(SAMPLE_TIMe, 'yyyymmdd hh24:mi'),session_type,module,PROGRAM ,machine,
count(*)
from sys.GV_$ACTIVE_SESSION_HISTORY s
where SAMPLE_TIMe >=sysdate-30
and SAMPLE_TIMe < sysdate
and session_type<>'BACKGROUND'
group by to_char(SAMPLE_TIMe, 'yyyymmdd hh24:mi'),session_type,module,PROGRAM,machine
order by 1;

4. 查看procress参数值

show parameter processes
或
select value from v$parameter where name = 'processes' --数据库允许的最大连接数

5.执行语句

 alter system set processes=1000 scope=spfile;
 alter system set sessions=1105 scope=spfile;

6. 修改完成后重启数据库:

shutdown  immediate; -- abort;
startup;

 

 
posted @ 2019-05-08 16:47  leolzi  阅读(812)  评论(0)    收藏  举报