MSSQLSERVER_916

Details

Product Name

SQL Server

Product Version

10.0

Product Build Number

10.00

Event ID

916

Event Source

MSSQLSERVER

Component

SQLEngine

Symbolic Name

NOTUSER

Message Text

The server principal "%.*ls" is not able to access the database "%.*ls" under the current security context.

Explanation

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)

User Action

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 ;

    GO

    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 ;

    GO

    GRANT CONNECT TO guest ;