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
| Parameter | Description |
|---|---|
| NONE | Specifies to disable all roles granted to the user. |
| ALL | Specifies to activate all roles of the user. |
| role_name | The name of the role to activate. Separate multiple role names with commas (,). |
| user_name | The 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;