Well as you may know I’m amnesiac… So this post is for me to remember how to relink an database user into the database server again.
The stored procedure of SQL Server that does that is: sp_change_users_login…
Check out this MS page: http://msdn2.microsoft.com/en-us/library/ms174378.aspx
Just a quick note:
The SQL Server command select * from master..sysprocesses shows the linkage between the Windows Process and SQL Server Process (SPID).
This useful if you want to kill the SQL command without kiling the Windows process.
By the way, the column is hostprocess for the Windows process id.