FirebirdSQL logo

Who Can Alter a Role

The ALTER ROLE statement can be executed by:

  • Administrators

  • Users with the ALTER ANY ROLE privilege, with the following caveats

    • Setting or dropping system privileges also requires the system privilege CREATE_PRIVILEGED_ROLES

    • Setting or dropping auto admin mapping also requires the system privilege CHANGE_MAPPING_RULES

ALTER ROLE Examples

Drop all system privileges from a role named SELECT_ALL
ALTER ROLE SELLERS
  DROP SYSTEM PRIVILEGES;
Grant a role SELECT_ALL the system privilege to select from any selectable object
ALTER ROLE SELECT_ALL
  SET SYSTEM PRIVILEGES TO SELECT_ANY_OBJECT_IN_DATABASE;

docnext count = 3

DROP ROLE

Drops a role

Available in

DSQL, ESQL

Syntax
DROP ROLE rolename

The statement DROP ROLE deletes an existing role.It takes a single argument, the name of the role.Once the role is deleted, the entire set of privileges is revoked from all users and objects that were granted the role.

Who Can Drop a Role

The DROP ROLE statement can be executed by:

  • Administrators

  • The owner of the role

  • Users with the DROP ANY ROLE privilege

DROP ROLE Examples

Deleting the role SELLERS
DROP ROLE SELLERS;