Roles and set Options

When a user logs in to SAP ASE, the user’s roles are not necessarily active, depending upon how the role is set up as a default role.

A system security officer can change role automatic activation using alter login or alter login profile

Use set role role_name on or set role role_name off to turn roles on and off.

For example, if you have been granted the system administrator role, you assume the identity (and user ID) of database owner in the current database. To assume your real user ID, execute this command:
set role "sa_role" off

If you are not a user in the current database, and if there is no “guest” user, you cannot set sa_role off.

If the user-defined role you intend to activate has an attached password, you must specify the password to turn the role on. Thus, you would enter:
set role "role_name" with passwd "password" on

During set role, the SAP ASE server locks the role if your failed role activation attempts reach the number you set in max failed_logins. When this happens, locksuid, locdate, and lockreason in are updated in syssrvroles.