Removes the alias user name identity established with sp_addalias.
sp_dropalias loginame
is the name (in master.dbo.syslogins) of the user who was aliased to another user.
Assuming that “victoria” was aliased (for example, to the Database Owner) in the current database, this statement drops “victoria” as an aliased user from the database:
sp_dropalias victoria
Executing the sp_dropalias procedure deletes an alternate suid mapping for a user from the sysalternates table.
When a user’s alias is dropped, he or she no longer has access to the database for which the alias was created.
You cannot drop the alias of a user who owns objects in the database that were created in version 12.0 or later. You must drop the objects before dropping the login.
Only the Database Owner or a System Administrator can execute sp_dropalias.
System procedures sp_addalias, sp_adduser, sp_droplogin, sp_dropuser, sp_helpuser