Oracle 数据库连接数

select count(*) from v$session;--  当前数据库的会话连接数
select count(*) from v$process;--  当前数据库进程的连接数
/*数据库允许的最大连接数
processes 
sessions   
*/
select name,value from v$parameter where name in('processes','sessions'); 
/*特定用户或服务的连接情况
*/
select username,count(username) from v$session where username is not null group by username;
/*查询状态为'ACTIVE'的会话数
ACTIVE    
INACTIVE    
*/
select status,count(*) from v$session group by status; 

 

posted @ 2024-06-21 16:49  瘦瘦的猴子  阅读(35)  评论(0)    收藏  举报