Probably most people already know – but it still happens often to me: When restoring a SQL database you cannot login even though the database user matches the SQL Server login. This can easily be fixed with the following command:
sp_change_users_login ‘AUTO_FIX’, ‘ [User_Name]’