日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Listener refused the connection with the following error: ORA-12519, TNS:no appr

發布時間:2023/12/8 编程问答 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Listener refused the connection with the following error: ORA-12519, TNS:no appr 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
異常:
Listener refused the connection with the following error: ORA-12519, TNS:no appropriate service handler found The Connection descriptor used by the client was: localhost:1521:orcl
Hibernate operation: Cannot open connection; uncategorized SQLException for SQL [???]; SQL state [null]; error code [0]; Listener refused the connection with the following error: ORA-12519, TNS:no appropriate service handler found The Connection descriptor used by the client was: localhost:1521:orcl ; nested exception is java.sql.SQLException: Listener refused the connection with the following error: ORA-12519, TNS:no appropriate service handler found The Connection descriptor used by the client was: localhost:1521:orcl


[quote]查詢數據庫當前進程的連接數:

 select count(*) from v$process;

  查看數據庫當前會話的連接數:

  elect count(*) from v$session;

  查看數據庫的并發連接數:

  select count(*) from v$session where status='ACTIVE';

  查看當前數據庫建立的會話情況:

  select sid,serial#,username,program,machine,status from v$session;

  查詢數據庫允許的最大連接數:

  select value from v$parameter where name = 'processes';

  或者:show parameter 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;

  備注:UNIX 1個用戶session對應一個操作系統process,而Windows體現在線程。

  啟動oracle

  su - oracle

  sqlplus system/pwd as sysdba //進入sql

  startup //啟動數據庫

  lsnrctl start //啟動監聽

  sqlplus "/as sysdba"

  shutdown immediate;

  startup mount;

  alter database open;

--

web應用連接oracle數據庫時,經常在查詢數據時發生

Listener refused the connection with the following error: ORA-12519, TNS:no appropriate service handler found The Connection descriptor used by the client was: 127.0.0.1:1521:ORCL

這種錯誤,網上查了很多,都說是ip地址改變之后的問題,要把tnsnames.ora中的實例配置中改為計算機名,我試過之后問題還是不能解決,今天終于找到問題所在了,是數據庫連接數量的問題,12519錯誤為監聽不能提供服務,通常為數據庫進程達到上限導致。

可以先執行下 select count(*) from v$process ,看下現在系統有多少連接數,然后再查詢 select value from v$parameter where name = 'processes' ,看下oracle設置中設置了多少連接數,一般一個應用都會使用20個,所以如果你開了幾個應用的話(web、pl/sql、……)就會出這個問題了,這時只需要執行下

alter system set processes = 300 scope = spfile;[/quote]

就可以了,當然300可以根據實際情況設置。

總結

以上是生活随笔為你收集整理的Listener refused the connection with the following error: ORA-12519, TNS:no appr的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。