Symptoms
- Unable to activate/deactivate domain or import MSSQL dump, the following error appears:
Error: Unable to activate/deactivate domain: User or role 'db_user' does not exist in this database.
at (VADOConnection::execute line 90)
at Disable user db_user in MSSQL database database_name on host 203.0.113.2SQLEXPRESS.(domainmng::alter_mssql_users line 730)
at Turn off dbusers for domain domain.tld(domainmng::db_users_on_off line 486)
at (domainmng::db_users_on_off line 487)
at Turn off domain domain.tld (state=1)(domainmng::turnDomain line 120)Or
Error: Some of the selected subscriptions were not activated.
Enable database user failed: mssqlmng failed: User or role 'db_user' does not exist in this database. at (VADOConnection::execute line 78) at execute console command --access-user-enable(vconsoleapp::start line 100) at execute "C:Program Files (x86)ParallelsPleskadminbinmssqlmng.exe" --access-user-enable "--server=localhost" "--login=sa" "--password=*" "--database=database_name " "--user-login=db_user"(vconsoleapp::run line 117) (Error code 1) - When going to Domains > example.com > Databases >Database Users > db_username and pressing OK the following error appears:Â
Error: mssqlmng failed: User or role 'database_name' does not exist in this database.
at (VADOConnection::execute line 78)
at updateUserPermissions(user=db_user, database=database_name, grant_alter_database=false, repair_roles=true)(MSSQLServerManager::updateUserPermissions line 611)
at (MSSQLServerManager::updateUserPermissions line 624)
at execute console command --update-users-permissions(vconsoleapp::start line 122)
at execute "C:Program Files (x86)Pleskadminbinmssqlmng" --update-users-permissions "--server=.MSSQLSERVER2014" "--login=sa" "--password=*" "--grant-alter-database=false" "--users-config-file=C:/Program Files (x86)/Plesk/PrivateTemp/bl5178.tmp" "--repair-roles=db_backupoperator;db_datareader;db_datawriter;db_ddladmin"(vconsoleapp::run line 139)
(Error code 1)
Cause
Database user is not mapped to domain’s database or absent in MSSQL Server.
Resolution
- Connect to the server via RDP;
-
Map the database to the user in SQL Server Management Studio > Security > Logins > johndoe > Properties > User Mapping.
Note: use the affected user name instead of johndoe