Been blogged about all over the place, but I wanted a central place to remember it.

After restore of a database from another server, often the user account can become unassigned from an SQL server login.

The following sorts it:

spchangeuserslogin 'updateone', 'orphanedlogin', 'sqlusername'

jobs a good un.

Now I never need hunt again – huzzah :)