Symptoms
-
Unable to activate/deactivate domain or import MSSQL dump with one of the errors below:
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)
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) -
The same error is displayed in Domains > example.com > Databases > User Management > db_user after pressing the OK button.
Cause
Database user is not mapped to domain's database or is absent in MSSQL Server.
Resolution
- Connect to the server via RDP.
- Map the database to the user in SQL Server Management Studio > Security > Logins > db_user > Properties > User Mapping.