可以执行以下语句:
select username,serial#,sid from v$session; ---
查询用户会话
alter system kill session 'serial#,sid ';---
删除相关用户会话
select count(*) from v$session;
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;
5、查看
用户或角色系统权限(直接赋值给
用户或角色的系统权限):
select * from dba_sys_privs;
select * from user_sys_privs;
6、查看角色(只能查看登陆
用户拥有的角色)所包含的权限
select * from role_sys_privs;
select * from dba_tab_privs;
select * from all_tab_privs;
select * from user_tab_privs;
8、查看所有角色:
select * from dba_roles;
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,machine order by num_curs desc;
原地址:http://www.cnblogs.com/caogang/p/4546072.html