Oracle中限制使用者的會話數量(session)

來源:互聯網
上載者:User
  1 建立每個使用者只允許一個會話的配置

SQL> create profile one_session limit sessions_per_user 1;

設定檔已建立

經過時間: 00: 00: 00.03

2 指定給要限制的使用者

SQL> alter user scott profile one_session;

使用者已更改。

經過時間: 00: 00: 00.01

3 啟用系統的資源限制

SQL> alter system set resource_limit=true;

系統已更改。

經過時間: 00: 00: 00.14

4 測試第一次登陸

SQL> connect scott/tiger

已串連。

5 測試再次登陸

SQL> host sqlplus scott/tiger

SQL*Plus: Release 10.2.0.1.0 - Production on 星期日 1月 4 17:37:05 2009

Copyright (c) 1982, 2005, Oracle. All rights reserved.

ERROR:

ORA-02391: exceeded simultaneous SESSIONS_PER_USER limit

請輸入使用者名稱:

ERROR:

ORA-01017: 使用者名稱/口令無效; 登入被拒絕

請輸入使用者名稱:

ERROR:

ORA-01017: 使用者名稱/口令無效; 登入被拒絕

SP2-0157: 在 3 次嘗試之後無法串連到 ORACLE, 退出 SQL*Plus

SQL>

SQL>

測試結果成功

聯繫我們

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