The login does not have sufficient permissions to connect to the named database. Logins that can connect to this instance of SQL Server but that do not have specific permissions in a database receive the permissions of the guest user. This error message can occur when the guest user does not have CONNECT permission to the named database.
When CONNECT permission to the msdb database is denied or revoked, SQL Server Management Studio can receive this error when Object Explorer tries to show the Policy Based Management status of each database. Object Explorer uses the permissions of the current login to query the msdb database for this information, which causes the error. The following error message also occurs:
Failed to retrieve data for this request. (Microsoft.SqlServer.Management.Sdk.Sfc)
To avoid this error, grant CONNECT permission to the database that is named in the error message. You can grant CONNECT permission in one of the following ways:
Grant the specific login access to the named database. The following example grants the login AdventureWorks\Larry access to the msdb database.
USE msdb ;
GRANT CONNECT TO [AdventureWorks\Larry] ;
Grant the CONNECT permission to the database named in the error message for the guest user. The following example grants the CONNECT permission to the msdb database for the user guest.
USE msdb ;
GRANT CONNECT TO guest ;