Drole (drole.sql)
What This Script Does
Section titled “What This Script Does”This script lists all database roles and indicates whether they require a password for activation. Essential for understanding role-based security implementation and identifying password-protected roles.
The Script
Section titled “The Script”col role format a30col password_required format a30
select role ,password_required from dba_roles where role like nvl(upper('&role'),'%')order by role;
Parameters
Section titled “Parameters”The script prompts for:
- &Role - name pattern to filter (use % for all)
-- Basic usage@drole.sql
-- When prompted, enter:-- role: Role name pattern to filter (use % for all)
Sample Output
Section titled “Sample Output”ROLE PASSWORD_REQUIRED------------------------------ ------------------------------ADM_PARALLEL_EXECUTE_TASK NOAPEX_ADMINISTRATOR_ROLE NOCONNECT NODATAPUMP_EXP_FULL_DATABASE NODATAPUMP_IMP_FULL_DATABASE NODBA NOEXP_FULL_DATABASE NOHR_ADMIN NOHR_READ_ONLY NOIMP_FULL_DATABASE NORESOURCE NOSECURE_APP_ROLE YESSELECT_CATALOG_ROLE NOSYSBACKUP NOSYSDBA NOSYSDG NOSYSKM NOSYSOPER NOSYSRAC NO