ORACLE如何查看修改串連數,進程數及使用者數,三者之間關係

來源:互聯網
上載者:User

標籤:

SQL> select count(*) from v$session #串連數
SQL> Select count(*) from v$session where status=‘ACTIVE‘ #並發串連數
SQL> show parameter processes #最大串連

process:這個參數限制了能夠串連到SGA的作業系統進程數(或者是Windows 系統中的線程數),這個總數必須足夠大,從而能夠適用於後台進程與所有的專用伺服器處理序,此外,共用伺服器處理序與調度進程的數目也被計算在內.因此,在專用伺服器環境中,這是一種限制並發串連數的方法.

Sessions:是被應用於oracle層次而非作業系統層次.在不考慮通過專用伺服器或共用伺服器進行登入的情況下,這個參數限制了對指定執行個體的並發登陸數.

 

1、查詢oracle的串連數
select count(*) from v$session;

2、查詢oracle的並發串連數
select count(*) from v$session where status=‘ACTIVE‘;

3、查看不同使用者的串連數
select username,count(username) from v$session where username is not null group by username;

4、查看所有使用者:
select * from all_users;

5、查看使用者或角色系統許可權(直接賦值給使用者或角色的系統許可權):
select * from dba_sys_privs;
select * from user_sys_privs;

6、查看角色(只能查看登陸使用者擁有的角色)所包含的許可權
select * from role_sys_privs;

7、查看使用者物件許可權:
select * from dba_tab_privs;
select * from all_tab_privs;
select * from user_tab_privs;

8、查看所有角色:
select * from dba_roles;

9、查看使用者或角色所擁有的角色:
select * from dba_role_privs;
select * from user_role_privs;

10、查看哪些使用者有sysdba或sysoper系統許可權(查詢時需要相應許可權)
select * from V$PWFILE_USERS;

修改資料庫允許的最大串連數:
alter system set processes = 300 scope = spfile;

查看遊標數量
Select * from v$open_cursor Where user_name=‘‘

查詢資料庫允許的最大串連數:
select value from v$parameter where name = ‘processes‘;
或者:show parameter processes;

查詢資料庫允許的最大遊標數:
select value from v$parameter where name = ‘open_cursors‘

查看oracle版本
select banner from sys.v_$version;
按降序顯示使用者"SYSTEM"為每個會話開啟的遊標數
select o.sid, osuser, machine, count(*) num_curs from v$open_cursor o, v$session s where user_name = ‘SYSTEM‘ and o.sid=s.sid group by o.sid, osuser, machine order by num_curs desc;

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.