I've had to create a new test database using a restore of a live database. The people who will be doing the testing already exist as logins on this server but when I tried to give them access to the test database I got the above message.
I've got the note below as a resolution
1. Select SQL Query Analyser and run
exec sp_dropuser ‘user login’
2. If the user login is unable to be dropped due to ownership of objects, change the ownership of the objects to ‘sa’, then repeat step 1.
3. Recreate the user login.
How can I tell which user login owns which objects (nobody wrote that bit down)? If anyone could let me know, overnight, I'd be grateful. I've got to sort this out in the morning. Will this script work?