sys.sp_change_users_login
general #stored-procedure
Description
Maps an existing database user to a SQL Server login. Describes the action for the stored procedure to perform. default, and can have one of the following values. system catalog view in the current database to a SQL Server login of the same name. If a login with the same name doesn’t exist, one is created. Examine the result from the statement, to confirm that the correct link is in fact made.
Syntax
sys.database_principals