Oracle 19cでDBAロールを持つユーザーを取得する
環境
Oracle 19c(19.3.0.0.0)
書式
SELECT * FROM DBA_ROLE_PRIVS WHERE GRANTED_ROLE =’DBA’;
操作例
1.表示幅の設定
SQL> set linesize 1000 SQL> column GRANTEE format a10 SQL> column GRANTED_ROLE format a10 SQL> column ADMIN_OPTION format a10 SQL> column DEFAULT_ROLE format a10
2.SQL構文の実行
SQL> SELECT * FROM DBA_ROLE_PRIVS WHERE GRANTED_ROLE ='DBA'; 結果 GRANTEE GRANTED_RO ADMIN_OPTI DEL DEFAULT_RO COM INH ---------- ---------- ---------- --- ---------- --- --- SYS DBA YES NO YES NO NO SYSTEM DBA NO NO YES NO NO