1.当前的数据库连接数
select count(*) from v$process where program='ORACLE.EXE(SHAD)';
2.数据库允许的最大连接数
select value from v$parameter where name ='processes'
3.修改最大连接数,需要重启数据库才能生效:
alter system set processes = 300 scope = spfile;
4.重启数据库
shutdown immediate;
startup;
5.查看当前有哪些用户正在使用数据
SELECT osuser, a.username,cpu_time/executions/1000000||'s',b.sql_text,machine
from v$session a, v$sqlarea b
where a.sql_address =b.address order by cpu_time/executionsdesc;
6.当前的session连接数
select count(*) from v$session
7.并发连接数
select count(*) from v$session where status='ACTIVE'
8.最大连接
show parameter processes