解決 Oracle 連結 TNS:no appropriate service handler found 報錯
阿新 • • 發佈:2020-12-10
解決 Oracle 連結 TNS:no appropriate service handler found 報錯
1. 原因
連線全部被佔用導致.
-- 登入
sqlplus / as sysdba
-- 檢視當前連線數
select count(*) from v$process;
-- 檢視允許最大連線數 (預設為 150)
select value from v$parameter where name = 'processes';
2. 解決
-- 修改最大連線數
alter system set processes = 500 scope = spfile;
重啟資料庫
格外
-- 檢視當前有哪些使用者正在使用資料
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;