Use of the system table DOMAIN.SESSION_ROLES
You can use the demo data for the SQL tutorial. Start the Database Studio as database administrator MONA with the password RED and log on to demo database DEMODB: Logging On to a Database.
Define and use roles. Proceed as described in SQL Tutorial, Roles.
You can use Database Studio to enter and execute SQL statements. More information: Working with SQL Statements: Overview
Note the General Instructions for formulating SQL statements.
You can use the system table SESSION_ROLES to determine the following database information, among other things:
All roles that are active in the current database session
SELECT role
FROM DOMAIN.SESSION_ROLES
All roles: see ROLES
Role of a database user that is automatically activated when a database session is opened: see ROLES
Role privilege: see ROLEPRIVILEGES