oracle 如何获取当前用户的查看对象权限
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12352751/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to get view object privilege for current user
提问by Manikandan
I want to get view list for which the current user has select privilege. I understand that we cant get privilage details for views directly unlike tables. In case of tables I have view called 'ALL_TAB_PRIVS'.
我想获取当前用户具有选择权限的视图列表。我知道与表不同,我们无法直接获取视图的特权详细信息。对于表,我有一个名为“ALL_TAB_PRIVS”的视图。
How to get the list of view objects those are accessable for current user?
如何获取当前用户可访问的视图对象列表?
Thanks in Advance.
提前致谢。
回答by APC
The ALL_TAB_PRIVS view includes VIEWS in its result set. In fact it includes all objects, so it will also show you procedures on which you have EXECUTE privileges.
ALL_TAB_PRIVS 视图在其结果集中包含 VIEWS。事实上,它包括所有对象,因此它还会显示您拥有 EXECUTE 权限的过程。
Quite why it is called ALL_TAB+PRIVS rather than ALL_OBJ_PRIVS I don't know. I agree it's confusing. However it is correctly documented in the Oracle Reference.
我不知道为什么它被称为 ALL_TAB+PRIVS 而不是 ALL_OBJ_PRIVS。我同意这令人困惑。但是,它在Oracle Reference 中正确记录。
Incidentally, there is a view USER_TAB_PRIVS which shows you the privileges of the current user without having to restrict on GRANTEE.
顺便提一下,有一个视图 USER_TAB_PRIVS 可以显示当前用户的权限,而不必限制 GRANTEE。