如何修改Oracle並發串連數的設定

來源:互聯網
上載者:User

   不能串連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;

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.