select count(*) from v$process --當前的鏈接數
select value from v$parameter where name = 'processes' --數據庫容許的最大鏈接數
修改最大鏈接數:
alter system set processes = 300 scope = spfile;
重啓數據庫:
shutdown immediate;
startup;
--查看當前有哪些用戶正在使用數據
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;sql