您的位置:首页 > 数据库 > Oracle

查看oracle连接数

2013-05-20 13:38 253 查看
--查询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 count(*) from v$process;

--数据库允许的最大连接数

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

--查看当前有哪些用户正在使用数据

SELECT osuser, a.username,cpu_time/executions/1000000||'s', sql_fulltext,machine

from v$session a, v$sqlarea b

where a.sql_address =b.address order by cpu_time/executions desc;

--查看所有用户:

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;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: