我想知道在Oracle中具有root(管理)权限的所有用户的列表.
我想在脚本或C应用程序中.脚本是首选.
我想在脚本或C应用程序中.脚本是首选.
解决方法
以下是您查找用户权限的方法:
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;