sp_dropalias System Stored Procedure

Removes the alias login ID identity that was established by sp_addalias.

Syntax

sp_dropalias login_id

where

login_id
Is the name (in master.dbo.syslogins) of the user who has an alias.

Remarks

Executing the sp_dropalias system stored procedure deletes an alternate suid mapping for a user from the sysalternates table. When a user's alias is dropped, the user no longer can access the database for which the alias was created.

Example

Assuming that Victoria has an alias (for example, as the database owner) in the current database, this procedure drops her alias from the database.

sp_dropalias Victoria

Permission

Only the database owner can use this procedure.

Table Used

sysalternates

See Also

sp_addalias sp_dropuser
sp_adduser sp_helpuser
sp_changedbowner USE
sp_droplogin