Restoring SQL backups from one server into another

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:


SQL Server: Connecting Windows Process to SQL SPID’S

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.