http://java-xp.iteye.com/blog/1682532
ORA-12519: TNS:no appropriate service handler found 解決
數據源換成c3p0后,發現在跑多個測試時出現錯誤ORA-12519,懷疑是多人同時跑測試時造成連接數過多,又不釋放,導致數據庫上當前的連接數目已經超過了它能夠處理的最大值。
select count(*) from v$process; --當前的連接數
select value from v$parameter where name = 'processes'; --數據庫允許的最大連接數
修改最大連接數:
select * from v$license; 查詢數據庫自啟動以來最大的並發數量
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;