This is for when you restore a database and want to hook the users in the new database to the users with the same name in the SQL Server login to the db as SA Use YourDatabase GO exec sp_change_users_login ‘Auto_Fix’, ‘UserName’