mut_excl_roles

Description

Returns information about the mutual exclusivity between two roles.

Syntax

mut_excl_roles (role1, role2 [membership | activation])

Parameters

role1

is one user-defined role in a mutually exclusive relationship.

role2

is the other user-defined role in a mutually exclusive relationship.

level

is the level (membership or activation) at which the specified roles are exclusive.

Examples

Example 1

Shows that the admin and supervisor roles are mutually exclusive:

alter role admin add exclusive membership supervisor
select 
mut_excl_roles("admin", "supervisor", "membership")
-----------
          1

Usage

mut_excl_roles, a system function, returns information about the mutual exclusivity between two roles. If the System Security Officer defines role1 as mutually exclusive with role2 or a role directly contained by role2, mut_excl_roles returns 1. If the roles are not mutually exclusive, mut_excl_roles returns 0.

Standards

ANSI SQL – Compliance level: Transact-SQL extension

Permissions

Any user can execute mut_excl_roles.

See also

Commands alter role, create role, drop role, grant, set, revoke

Documentation Transact-SQL Users Guide

Functions proc_role, role_contain, role_id, role_name

System procedures sp_activeroles, sp_displayroles, sp_role