Entering content frame

This graphic is explained in the accompanying text ROLES Locate the document in the library structure

Prerequisites

You have generated the Structure linkdemo data for the SQL Tutorial.

Log on to the demo database instance DEMODB as user MONA.

Define and use roles. Proceed as described in SQL Tutorial, Structure linkRoles.

Examples

You can use the system table ROLES to determine the following database information, among other things:

     All roles for which it is necessary to enter a password to activate them

SELECT owner, role
  FROM DOMAIN.ROLES
    WHERE password_required = 'YES'

     Role of the current user that is automatically activated when a database session is opened

SELECT role
  FROM DOMAIN.ROLES
    WHERE defaultrole = 'YES'

Note

All roles that are active in the current database session: see SESSION_ROLES

Role privilege: see ROLEPRIVILEGES

 

Leaving content frame