ORACLE修改会话连接数及进程连接数

查看当前数据库的最大会话连接数:

  select count(*) from v$session;

查看当前数据库的最大进程连接数:

  select count(*) from v$process;

查看数据库允许的最大会话连接数:

  select value from v$parameter where name = 'sessions';

查看数据库允许的最大进程连接数:

  select value from v$parameter where name = 'processes';

修改最大会话连接数及进程连接数:

  alter system set processes=2000 scope=spfile;
  alter system set sessions=2205 scope=spfile;

sessions与process有关,它们的关系如下: 
  sessions=(1.1*process+5) 

重启生效:

  shutdown immediate
  startup

手动杀连接:杀掉两小时以上不活动的会话

select 'alter system kill session ''' || sid || ',' || serial# ||
''' immediate;'
from v$session
where status = 'INACTIVE'
AND LAST_CALL_ET >= 60 * 60 * 2

原文地址:https://www.cnblogs.com/taihao/p/14046939.html