[1].查询数据库当前进程的连接数
select count(1) from v$process;
[2].查看数据库当前会话的连接数
select count(1) from v$session;
[3].查看不同用户的连接数
select username,count(username) from v$session where username is not null group by username;
[4].查看数据库的并发连接数
select count(1) from v$session where status='ACTIVE';
[5].查看当前数据库建立的会话情况
select sid,serial#,username,program,machine,status from v$session;
[6]查看所有用户
select * from all_users;
[7].查询数据库允许的最大连接数
select value from v$parameter where name = 'processes';
或在命令窗口执行
show parameter processes
[8].修改数据库允许的最大连接数[需要重启]
alter system set processes = 300 scope = spfile;
[9].重启数据库
shutdown immediate;
startup;
[10].查看当前有哪些用户正在使用数据
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;
注:以上整理参考于http://edu.cnzz.cn/NewsInfo/28548.aspx