Oracle Scripts

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';
Tags

Bugra Parlayan

I use this blog in my spare time to jot down thoughts and share my professional experiences. It’s my personal space to unwind and reflect. Feel free to share or reuse anything you find helpful here — just a small thank you is more than enough :) You can reach me at: bugra[@]bugraparlayan.com.tr

Related Articles

Leave a Reply

Back to top button
Close