I'm trying to run the following command with a user account(XXX_Admin):
ALTER DATABASE [XXX] SET TRUSTWORTHY ON;
This works with the "SA" account, but with my user account(XXX_Admin) I get:
Msg 5011, Level 14, State 5, Line 1 User does not have permission to alter database 'XXX', the database does not exist, or the database is not in a state that allows access checks. Msg 5069, Level 16, State 1, Line 1 ALTER DATABASE statement failed.
I've checked, and this user account should have the correct permissions:
(Login - Server Rules)
(Login - User Mapping)
I've also verified that the login and user are synced with the following commands:
EXEC sp_change_users_login 'update_one', 'XXX_Admin', 'XXX_Admin' EXEC sp_change_users_login 'AUTO_FIX', 'XXX_Admin' GRANT ALTER ON DATABASE:: XXX TO XXX_Admin
Now I'm really at a loss as to what to check next... As so often with SQL Permissions issues, I grant all access to my account that I can think of but am still unable to run commands. Am I missing something?