Locking and unlocking login accounts

Use sp_locklogin to lock and unlock accounts or to display a list of locked accounts. You must be a System Administrator or a System Security Officer to use sp_locklogin.

The syntax is:

sp_locklogin [loginame, "{lock | unlock}"]

where:

To display a list of all locked logins, use sp_locklogin with no parameters.

You can lock an account that is currently logged in, and the user is not locked out of the account until he or she logs out. You can lock the account of a Database Owner, and a locked account can own objects in databases. In addition, you can use sp_changedbowner to specify a locked account as the owner of a database.

Adaptive Server ensures that there is always at least one unlocked System Security Officer’s account and one unlocked System Administrator’s account.