oracle – 列出具有root(管理)权限的用户
发布时间:2021-03-15 00:21:08 所属栏目:百科 来源:网络整理
导读:我想知道在Oracle中具有root(管理)权限的所有用户的列表. 我想在脚本或C应用程序中.脚本是首选. 解决方法 以下是您查找用户权限的方法: select lpad(' ',2*level) || granted_role "User,his roles and privileges"from ( /* THE USERS */ select null gr
我想知道在Oracle中具有root(管理)权限的所有用户的列表.
解决方法以下是您查找用户权限的方法:select lpad(' ',2*level) || granted_role "User,his roles and privileges" from ( /* THE USERS */ select null grantee,username granted_role from dba_users /* THE ROLES TO ROLES RELATIONS */ union select grantee,granted_role from dba_role_privs /* THE ROLES TO PRIVILEGE RELATIONS */ union select grantee,privilege from dba_sys_privs ) start with grantee is null connect by grantee = prior granted_role; 这将显示哪些用户具有虚增的权限.您可以通过键入在shell脚本中执行此操作 sqlplus / as sysdba --(if you are root on the box) spool user_privileges.txt @whos_a_root.sql --(if that's what you call your script) spool off exit; (编辑:淮北站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |