什么RDBMS命令用于告诉用户对特定对象具有哪些权限?

时间:2009-06-29 06:36:13

标签: rdbms

使用什么RDBMS命令来告诉用户对特定对象具有哪些权限?

2 个答案:

答案 0 :(得分:1)

这取决于您使用的数据库系统。在Oracle中,你可以通过

找到很多东西
select * from all_tab_privs;

答案 1 :(得分:1)

sql server 2005中的how to do it

select dp.NAME AS principal_name,
    dp.type_desc AS principal_type_desc,
    o.NAME AS object_name,
    p.permission_name,
    p.state_desc AS permission_state_desc
    sys.database_permissions p
    OUTER JOIN sys.all_objects o
on     p.major_id = o.OBJECT_ID
inner   JOIN sys.database_principals dp
on     p.grantee_principal_id = dp.principal_id