Adding or dropping auto-activated roles

Previously granted user defined roles that are not password protected can be automatically activated on login.

The following modifies the login profile mgr_lp and automatically activates the roles mgr_role and eng_role when users associated with mgr_lp log in.

alter login profile mgr_lp add auto activated roles
      mgr_role, eng_role

The auto activated roles status of user defined roles granted to login profiles is indicated in the sysloginroles.status column. A value of ‘1’ indicates the granted role must be automatically activated on login. Revoking a role will remove its corresponding row in sysloginroles and the role will not be automatically activated on login. Adaptive Server automatically activates roles granted to a user's login profile as follows:

  1. If a default login profile is associated with the account, any auto activated roles specified in the default login profile are applied.

  2. If both a login profile that is directly associated with an account and a default login profile exist, only the auto activated roles specified in a login profile associated directly with the account are applied.