SQL Server error code
SQL Server error 916
SQL Server raises error 916 at severity 14, which marks a problem with the query or data that you can correct.
The server principal "%.*ls" is not able to access the database "%.*ls" under the current security context.
| Msg | 916 |
|---|---|
| Name | NOTUSER |
| Severity | 14 |
| Group | 0–999 |
What it means
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 is a security measure to prevent users in one database from connecting to other databases where they do not have privileges. This error message can occur when the guest user does not have CONNECT permission to the named database and the trustworthy property is not set. This error message can occur when the guest user does not have CONNECT permission to the named database.