日期:2014-05-16 浏览次数:20433 次
dba_XXX 需要有权限才能查看,否则会报表和视图不存在的错误
1. 查询所有用户(username, tablespace 信息)
select * from dba_users; select * from all_users; //当前用户 select * from user_users;
2. 查看用户或角色的系统权限
select * from dba_sys_privs; //当前用户拥有的权限 select * from user_sys_privs;
3. 查看当前登录用户所拥有的角色所包含的权限
select * from role_sys_privs;
select * from dba_tab_privs; select * from all_tab_privs; select * from user_tab_privs;
5. 查看所有角色
select * from dba_roles;
6. 查看用户和角色所拥有的角色
select * from dba_role_privs; select * from user_role_privs;
select * from v$PWFILE_USERS;
select * from dba_sys_privs where grantee='USERNAME';
select 'Drop table '||table_name||';' from all_tables where owner='USERNAME';
drop user USERNAME cascade;
select table_name from user_tables;
select 'truncate table '||tablename from user_tables;