查询数据库连接数

查看不同用户的连接数--

  

select username, count(username)
  from v$session
 where username is not null
 group by username;

查询终端用户使用数据库的连接情况--

select osuser,  count(*) conn
  from v$session
 group by  osuser
 order by conn desc;

 

posted @ 2017-12-26 11:12  BeforeYou  阅读(618)  评论(0编辑  收藏  举报