Creating a user-defined role

A user with sso_role uses the create role command to create a role. See create role in the the Reference Manual: Commands.The create role command can only be used in the master database.If a password is used, any user activating the role must specify the password. Roles with passwords cannot be used if the role is to be activated during login as the login's default role or as an automatically activated role granted to a login profile.

For example, to create the intern_role without a password, enter:

create role intern_role

To create the doctor_role and assign the password “physician”, enter:

create role doctor_role with passwd "physician"

Only the system security officer can create user-defined roles.