码迷,mamicode.com
首页 > 数据库 > 详细

Oracle查看用户权限

时间:2020-04-14 17:04:00      阅读:74      评论:0      收藏:0      [点我收藏+]

标签:登录   oracle   ant   concat   union all   角色   查看   username   nio   

作为DBA帐号登录,查看他的权限。

set linesize 200;
col privs_type format a10;
col username format a20;
col table_name format a35;
col column_name format a25;
col PRIVILEGE format a60;
with t1 as
(
select upper(‘edmond‘) username from dual
)
select ‘角色‘ privs_type,‘NULL‘ username,‘NULL‘ table_name,‘NULL‘ column_name,wm_concat(GRANTED_ROLE) PRIVILEGE from dba_role_privs,t1 where GRANTEE=t1.username group by ‘角色‘,‘NULL‘,‘NULL‘,‘NULL‘
union all
select ‘表权限‘,owner,TABLE_NAME,‘NULL‘,wm_concat(PRIVILEGE) PRIVILEGE from dba_tab_privs,t1 where GRANTEE=t1.username group by ‘表权限‘,owner,TABLE_NAME,‘NULL‘
union all
select ‘列权限‘,owner,TABLE_NAME,column_name,wm_concat(PRIVILEGE) PRIVILEGE from dba_col_privs,t1 where GRANTEE=t1.username group by ‘列权限‘,owner,TABLE_NAME,column_name;

 

Oracle查看用户权限

标签:登录   oracle   ant   concat   union all   角色   查看   username   nio   

原文地址:https://www.cnblogs.com/liang545621/p/12698735.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!