首页 > 代码库 > 查看oracle连接数和会话情况

查看oracle连接数和会话情况

select  b.MACHINE, b.PROGRAM , 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 order by count(*) desc

或者

查看session:
  select * from v$session where username is not null
  select username,count(username) from v$session where username is not null group by username
  当前连接数:
  select count(*) from v$process

查看oracle连接数和会话情况