oracle資料庫連接數設定方法

來源:互聯網
上載者:User

使用者的最大串連數

查看該使用者的最大串連數

select profile from dba_users where username='APP_TEST';

select * from dba_profiles where profile='PF_APP_TEST' and resource_name='SESSIONS_PER_USER';

查看該使用者當前的串連數

select count(*) from v$session where username=' APP_TEST';

查看執行個體允許的最大串連數

select sum(limit) max_allowed_sessions from dba_profiles where resource_name='SESSIONS_PER_USER' and limit not in('DEFAULT','UNLIMITED');

查看當前執行個體最大串連數

select count(*) from v$session;

修改使用者的最大串連數

alter profile PF_APP_TEST limit SESSIONS_PER_USER 20;

說明:

sessions

SESSIONS 指定資料庫允許的最大會話數,參數值的範圍是1~2的31次冪,不可以動態修改。ORACLE 11GR2中預設值為 (1.5*PROCESSES)+22。

PROCESSES 指定在作業系統層級允許串連oracle資料庫的最大並發使用者進程數。在shared server模式下這個值可以設定的比較小。

總結:

資料庫執行個體初始化時,需要給sessions、processes設定一個合適的值,避免隨著業務的增長,出現"執行個體允許的最大串連數“<”所有使用者最大串連數之和"的問題。

本欄目更多精彩內容:http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.