role_id

Description

Returns the system role ID of the name you specify.

Syntax

role_id("role_name")

Parameters

role_name

is the name of a system or user-defined role. Role names and role IDs are stored in the syssrvroles system table.

Examples

Example 1

Returns the system role ID of sa_role:

select role_id("sa_role")
------
0

Example 2

Returns the system role ID of the “intern_role”:

select role_id("intern_role")
------
6

Usage

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

Any user can execute role_id.

See also

For more information about system functions, see “System functions”.

Documents For more information about roles, see the System Administration Guide.

Functions mut_excl_roles,proc_role,role_contain, role_name