A System Security Officer can change a role’s default setting for any user. Individual users can change only their own default settings.
When a user logs in to Adaptive Server, the user’s roles are not necessarily active, depending upon the default that is set for the role. If a role has a password associated with it, the user must use the set role command to activate the role.
The System Security Officer or user determines whether to activate any roles granted by default at login. sp_modifylogin sets the default status of user roles individually for each user. sp_modifylogin only effects user roles, not system roles.
By default, user-defined roles are not activated at login, but system roles are automatically activated, if they do not have passwords associated with them.
To set up a role to activate at login:
sp_modifylogin loginname, "add default role", role_name
To ensure that a role is inactive at login:
sp_modifylogin loginname, "drop default role", role_name
For example, to change the default setting for Ralph’s intern_role to be active automatically at login, execute:
sp_modifylogin ralph, "add default role", intern_role