We have a production environment and a test environment. I restored the production database to the test environment (SQL 2005 on both). Before I did this, I grabbed the sid of the database owner. When I go in to the test environment and try to add the same user with the same sid (sp_addlogin '<login_name>', '<password>', '<database_name>', '<language>', sid) it completes successfully, however when I do a search for that user using:
select name, sid from sysusers where name='<login_name>', it returns empty fields for the username and sid. This, I believe is stopping me from successfully connecting to the database from the application. Any suggestions???? Need to get this resolved ASAP. Thanks in advance.