Post Closed as "off-topic" by David Browne - Microsoft, Paul White
3 Updated with new permissions
source | link

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:

(XXX Database)

enter image description hereenter image description here

(Login - Server Rules)

enter image description hereenter image description here

(Login - User Mapping)

enter image description hereenter image description here

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?

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:

(XXX Database)

enter image description here

(Login - Server Rules)

enter image description here

(Login - User Mapping)

enter image description here

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?

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:

(XXX Database)

enter image description here

(Login - Server Rules)

enter image description here

(Login - User Mapping)

enter image description here

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?

2 Fixed missed typed question
source | link

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 'EBM_XXX''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:

(XXX Database)

enter image description here

(Login - Server Rules)

enter image description here

(Login - User Mapping)

enter image description here

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?

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 'EBM_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:

(XXX Database)

enter image description here

(Login - Server Rules)

enter image description here

(Login - User Mapping)

enter image description here

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?

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:

(XXX Database)

enter image description here

(Login - Server Rules)

enter image description here

(Login - User Mapping)

enter image description here

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?

1
source | link

Can't "SET TRUSTWORTHY ON" With Non-SA User Account

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 'EBM_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:

(XXX Database)

enter image description here

(Login - Server Rules)

enter image description here

(Login - User Mapping)

enter image description here

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?