Login failed for user after database restore
Posted on 6/29/2010 6:11:00 PM by Levin, AricDevelopment 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'
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
Popular Blog Categories
- Business Solutions
- Cloud Platform
- Common Data Service
- Dynamics 365
- Dynamics CRM
- IT Solutions
- Office 365
- Online Services
- Power BI
- Power Platform
- PowerApps Component Framework (PCF)
- Skype for Business
- Small Business Solutions
- Unified Interface