from http://blog.163.com/[email protected]/blog/static/277581982011117112119826/
有時候連得上資料庫,有時候又連不上.
可能是資料庫上目前的連接配接數目已經超過了它能夠處理的最大值.
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;