Posted on 6/29/2010 6:11:00 PM by Levin, Aric

Development  Dynamics CRM  SQL 

When using SQL Server logins to connect to a database that has just been restored, most likely the following error will appear: Login failed for User 'username'

When using SQL Server logins to conect to a database that has just been restored, most likely the following error will appear:

Login failed for User 'username'

or

Cannot open database 'dbname' requested by the login. The login failed. Login failed for user 'username'.

The reason for this error is that the user login and the database login have become disconnected. We need to relink the database user with the login:

sp_change_users_login 'UPDATE_ONE', 'username', 'username'


Navigate to original post to enter comments