Came across with a situation where a database was in standby mode (secondary server) and the SQL user with which I was trying to access had no access on the database.
The database was not allowing to change anything with regards to configuration from Management Studio so eventually had to add the user in sysadmin from the following TSQL:
— myUser being added to role sysadmin
–SELECT * FROM master..syslogins
EXEC master..sp_addsrvrolemember @loginame = N’myUser’, @rolename = N’sysadmin’