-- dba.sql: open accounts granted the DBA role -- Copyright (c) HASHJOIN. MIT License (https://hashjoin.com/kb/license/) -- https://hashjoin.com/kb/oracle/open-accounts-with-dba-role/ -- -- Usage: @dba.sql select grantee,ACCOUNT_STATUS from dba_role_privs p , dba_users u where granted_role='DBA' and p.grantee = u.USERNAME and u.ACCOUNT_STATUS = 'OPEN' order by 1;