查看用户在某个对象上面的使用权限
来源:互联网 发布:caj转换word软件 编辑:程序博客网 时间:2024/04/30 12:01
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
查看用户在某个对象上面的使用权限可以用数据字典表DBA_TAB_PRIVS.表结构如下:
Name Null? Type
----------------------------------------------------------------
GRANTEE NOTNULLVARCHAR2(30) <==权限获得者
OWNER NOTNULLVARCHAR2(30)
TABLE_NAME NOTNULLVARCHAR2(30)
GRANTOR NOTNULLVARCHAR2(30) <--权限授予者
PRIVILEGE NOTNULLVARCHAR2(40)
GRANTABLE VARCHAR2(3) <--权限获得者是否有权限授予别人权限
权限由命令GRANT授予由命令REVOKE收回:
GRANTselect,insert,update,delete,referencesONmy_tableTOuser_joe;
REVOKEinsert,deleteONmy_tableFROMuser_joe;
GRANTcreatepublicsynonymTOuser_joe;
其他相关权限的数据字典表有:
ALL_TAB_PRIVS
ALL_TAB_PRIVS_MADE
ALL_TAB_PRIVS_RECD
DBA_SYS_PRIVS
DBA_ROLES
DBA_ROLE_PRIVS
ROLE_ROLE_PRIVS
ROLE_SYS_PRIVS
ROLE_TAB_PRIVS
SESSION_PRIVS
SESSION_ROLES
USER_SYS_PRIVS
USER_TAB_PRIV
在做完EXP/IMP后,权限需要重新授予时可用下面的脚本:
setechooff
rem
rem 19980729 MDPowell Newscript.
rem
setverifyoff
setpagesize0
setfeedbackoff
spoolgrt_&&owner._&&table_name..sql
select'REM grantson&&owner..&&table_name'
fromsys.dual;
select'grant'||privilege||'on'||lower(owner)||'.'||
lower(table_name)||'to'||grantee||
decode(grantable,'YES','withgrantoption',NULL)||
';'
from sys.dba_tab_privs
where owner =upper('&&owner')
and table_name=upper('&&table_name')
orderbygrantee,privilege;
spooloff
undefineowner
undefinetable_name
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
查看用户在某个对象上面的使用权限可以用数据字典表DBA_TAB_PRIVS.表结构如下:
Name Null? Type
----------------------------------------------------------------
GRANTEE NOTNULLVARCHAR2(30) <==权限获得者
OWNER NOTNULLVARCHAR2(30)
TABLE_NAME NOTNULLVARCHAR2(30)
GRANTOR NOTNULLVARCHAR2(30) <--权限授予者
PRIVILEGE NOTNULLVARCHAR2(40)
GRANTABLE VARCHAR2(3) <--权限获得者是否有权限授予别人权限
权限由命令GRANT授予由命令REVOKE收回:
GRANTselect,insert,update,delete,referencesONmy_tableTOuser_joe;
REVOKEinsert,deleteONmy_tableFROMuser_joe;
GRANTcreatepublicsynonymTOuser_joe;
其他相关权限的数据字典表有:
ALL_TAB_PRIVS
ALL_TAB_PRIVS_MADE
ALL_TAB_PRIVS_RECD
DBA_SYS_PRIVS
DBA_ROLES
DBA_ROLE_PRIVS
ROLE_ROLE_PRIVS
ROLE_SYS_PRIVS
ROLE_TAB_PRIVS
SESSION_PRIVS
SESSION_ROLES
USER_SYS_PRIVS
USER_TAB_PRIV
在做完EXP/IMP后,权限需要重新授予时可用下面的脚本:
setechooff
rem
rem 19980729 MDPowell Newscript.
rem
setverifyoff
setpagesize0
setfeedbackoff
spoolgrt_&&owner._&&table_name..sql
select'REM grantson&&owner..&&table_name'
fromsys.dual;
select'grant'||privilege||'on'||lower(owner)||'.'||
lower(table_name)||'to'||grantee||
decode(grantable,'YES','withgrantoption',NULL)||
';'
from sys.dba_tab_privs
where owner =upper('&&owner')
and table_name=upper('&&table_name')
orderbygrantee,privilege;
spooloff
undefineowner
undefinetable_name
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
- 查看用户在某个对象上面的使用权限
- 查看用户在某个对象上面的使用权限
- 在Mysql下查看给某个用户授予什么样的权限
- 设置用户对数据库中某个表的查看权限
- 查看当前用户的对象权限
- 检查用户在T表空间上没有权限却有对象在T上面SQL;
- 查看某个用户的表建在哪个表空上
- oracle把一个用户下数据库对象的某个权限赋给另一个用户
- 使用sc分配权限-限制某个用户或用户组对某个service的访问
- Linu查看用户的权限
- oracle的系统和对象权限 查看用户包含的各类权限
- 查看某个用户下面所有的职责
- 如何赋予某个用户对某个表的权限
- mysql设置某个用户对某个库的所有权限
- Python判断某个用户对某个文件的权限
- mysql设置某个用户对某个库的所有权限
- oracle查询 :一个角色包括的系统权限,对象权限,Oracle有多少种角色,某个用户有什么角色
- 在cvs上面初始化某个项目要注意的事项
- 解密SQL2000的存储过程
- SQLSERVER打补丁后的版本号
- 调优日志切换(TuningLogSwitches)
- MY SQL教程(1)
- 数据文件坏删除数据文件
- 查看用户在某个对象上面的使用权限
- 桂林老兵的SQLSERVER高级注入技巧(摘)
- Ubuntu 下搭建Eclipse PDT实现php的单步调试的功能
- 初学T-SQL笔记之ON[PRIMARY]
- 网上购物系统.......jsp+++++javabean (一)
- 与
- 桂林老兵的SQLSERVER高级注入技巧
- 通过存储过程进行字符串分拆,在同时删除多条记录的时候有用。
- Shipping Routes