Site icon Bugra Parlayan | Oracle Database Blog

Oracle Database ADMIN_OPTION atanan kullanıcılar

Soru : Oracle Database üzerinde güvenlik taraması yapacağım. ADMIN_OPTION rolü atanan kullanıcıları nasıl bulabilirim ?

-- FOR ORACLE DATABASE 11G 
SELECT A.grantee, 
       A.granted_role, 
       A.admin_option 
FROM   dba_role_privs A, 
       dba_roles B 
WHERE  A.admin_option = 'YES' 
       AND A.grantee = B.ROLE 
       AND A.grantee NOT IN ( 'DBA' ) 
-- FOR ORACLE DATABASE 12C 
SELECT a.grantee, 
       a.granted_role, 
       a.admin_option 
FROM   dba_role_privs a, 
       dba_users b 
WHERE  a.admin_option = 'YES' 
AND    a.grantee b.username 
AND    b.orcle_maintained <> 'Y';
Exit mobile version