A login or role can be locked when:
Its password expires, or
The maximum number of failed login attempts occur, or
The system security officer manually locks it.
The system security officer can use sp_locklogin to lock or unlock a login manually.
For example:
sp_locklogin "joe" , "lock"
sp_locklogin "joe" , "unlock"
Information about the lock status of a login is stored in the status column of syslogins.
See sp_locklogin in Reference Manual: Procedures.
The system security officer can use alter role to lock or unlock a role manually.
For example:
alter role physician_role lock
alter role physician_role unlock
Information about the lock status of a role is stored in the status column of syssrvroles.
See alter role Reference Manual: Commands.
Unlocking logins and roles at server start-up
Automatic login lockouts can cause a site to end up in a situation where all accounts capable of unlocking logins (system administrators and system security officers) are locked. Use the -u flag with the dataserver utility to unlock a specific login or role when you start Adaptive Server.
See dataserver in the Utility Guide.