Granting roles to login profiles

The following example creates the login profile def_lp and grants the role access_role to the login profile.

create login profile def_lp
grant role access_role to def_lp

Any login bound to def_lp will be implicitly granted access_role. The system security officer can specify a role granted to a login profile to behave as a default role for the bound logins, that is, the role is automatically activated in the user's session upon login.

If the default role has been granted to the login using a where clause to express an activation predicate, Adaptive Server activates the default role only if the activation predicate evaluates to true.

For information about adding or dropping auto activated roles, see “Adding or dropping auto-activated roles”.