--获取当前的连接数
select count(*) from v$process;
--获取最大连接数
select value from v$parameter where name='processes';
select value from v$parameter where name='sessions';
--查询当前哪些用户正在使用数据
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;
转载于:https://my.oschina.net/u/3702584/blog/1547108