Execute the following steps on the database server using the SQL Query Analyzer.
1. First, identify your orphaned users. Execute the following script:
exec sp_change_users_login 'Report'
The results of this query will be a list of your orphaned users.
2. If the database owner (DBO) is listed as orphaned, run this script:
exec sp_changedbowner 'sa'
3. For each of the orphaned users that were mentioned in step 1, run the following script:
EXEC sp_change_users_login 'Auto_Fix', '<user name>', NULL, '<password>'
Replace <user name> with the user's name in single quotes, and <password> with the user's password (also in single quotes). You will need to know each user's password to do this procedure. Passwords are case sensitive.