1

I have imported my database to a new ms sql server. This works but the logins are not working. They exists on the database itself but they are not available in the security->logins area of the ms sql server. I tried to create them manually there but receive the exception that they already exists on my database.

How can I achieve that these logins are active for my new ms sql server?

Thanks

1

2 Answers 2

1

Add the logins to the server, but don't associate them with the database. Then, run this:

USE [your database];
GO    
ALTER USER {user} WITH LOGIN={login};
Sign up to request clarification or add additional context in comments.

Comments

1

Found the solution which works for me

USE testdb;
GO
EXEC sp_change_users_login 'Auto_Fix', 'testuser', NULL, 'testpwd';
GO

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.