Skip to main content

SET DEFAULT ROLE

Description

This statement is used to set the default role for a user.

Limitations and Considerations

The current user must have the specified role to execute this operation.

Privileges

tip

If the user is setting the default role for themselves, no privileges are required.

To activate a role, the current user must have the CREATE USER privilege. For more information about seekdb privileges, see seekdb Privilege Types.

Syntax

SET DEFAULT ROLE
{NONE | ALL | role_name [, role_name ...]}
TO user_name [, user_name ...];

Parameters

ParameterDescription
NONESpecifies to disable all roles granted to the user.
ALLSpecifies to activate all roles of the user.
role_nameThe name of the role to activate. Separate multiple role names with commas (,).
user_nameThe name of the user to activate. Separate multiple user names with commas (,).

Examples

Specify that the user user001 activates the roles role001 and role002 by default when logging in.

SET DEFAULT ROLE role001, role002 TO user001;

References