oracle查詢連接數、用戶、角色
2014-01-13 16:31
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;