查看oracle用戶數據庫鏈接數

一、查詢oracle的鏈接數
select count(*) from v$session;
二、查詢oracle的併發鏈接數
select count(*) from v$session where status='ACTIVE';
三、查看不一樣用戶的鏈接數
select username,count(username) from v$session where username is not null group by username;
四、查看全部用戶:
select * from all_users;
五、查看用戶或角色系統權限(直接賦值給用戶或角色的系統權限):
select * from dba_sys_privs;
select * from user_sys_privs;
六、查看角色(只能查看登錄用戶擁有的角色)所包含的權限
select * from role_sys_privs;
七、查看用戶對象權限:
select * from dba_tab_privs;
select * from all_tab_privs;
select * from user_tab_privs;
八、查看全部角色:
select * from dba_roles;
九、查看用戶或角色所擁有的角色:
select * from dba_role_privs;
select * from user_role_privs;
十、查看哪些用戶有sysdba或sysoper系統權限(查詢時須要相應權限)
select * from V$PWFILE_USERS;數據庫

 

修改數據庫容許的最大鏈接數:session

alter system set processes = 300 scope = spfile;併發

 

查看遊標數量oracle

Select * from v$open_cursor Where user_name=''對象

 

查詢數據庫容許的最大鏈接數:
select value from v$parameter where name = 'processes';
或者:show parameter processes;io

 

查詢數據庫容許的最大遊標數:file

select value from v$parameter where name = 'open_cursors'select

 

查看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;

相關文章
相關標籤/搜索