SQL Language Guide : 8. SQL Statements : ALTER ROLE : ALTER ROLE Examples
 
Share this page                  
ALTER ROLE Examples
Change the attributes associated with a role identifier:
1. Change the password for the role identifier, new_accounts, to eggbasket.
ALTER ROLE new_accounts WITH
    PASSWORD = 'eggbasket';
2. Remove the password associated with the identifier, chk_inventory.
ALTER ROLE chk_inventory WITH NOPASSWORD;
3. In an application, change the password for the role identifier, mon_end_report to goodnews.
EXEC SQL ALTER ROLE mon_end_report WITH
    PASSWORD = goodnews;
4. Alter a role to remove a privilege and audits all activity performed when the role is active.
ALTER ROLE sysdba
    DROP PRIVILEGES (TRACE)
    WITH SECURITY_AUDIT;