不能串連Oracle資料庫了,提示相關的錯誤
OERR: ORA-12519 TNS:no appropriate service handler found
用戶端串連間歇性失敗,報錯ORA-12519
Cause: the listener could not find any available service handlers that are
appropriate for the client connection.
Action: run "lsnrctl services" to ensure that the instance(s) have registered
with the listener, and are accepting connections. 檢查lsnrctl service ,instance已經註冊,
狀態顯示ready時,可以串連。
When the listener believes the current number of connections has reached maximum load,
it may set the state of the service handler for an instance to "blocked" and begin refusing
incoming client connections with either of the following errors: ora-12519 or ora-12516
採用服務動態註冊的方式,由PMON 通過SERVICE_UPDATE 來得到目前串連情況,但SERVICE_UPDATE 有時間間隔,
所以,listener顯示的串連數和當前實際的串連數可能不同。
查詢解決方案:
查看一下資料庫現有的進程數,是否已經達到參數processes的大小。
1.select count(*) from v$process; 取得資料庫目前的進程數。
2.select value from v$parameter where name = 'processes'; 取得進程數的上限。
3.如已達到上限,修改initSID.ora中的processes的大小。
4.重新啟動資料庫到nomount狀態下,執行create spfile from pfile; 並startup open。
查詢資料庫自啟動以來最大的並發數量
修改最大串連數:
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;