"The server principal 'A' is not able to access the database 'B' under the current security context" (Microsoft SQL Server, Error:916) when connecting with Microsoft SQL Server Management Studio
When connecting to your database with Microsoft SQL Server Management Studio, you receive the error in the subject.
This problem is caused by a bug in Microsoft SQL Server Management Studio where every time you connect to a server it attempts to connect to the first Database on the server. If you do not have permission to access this database the above error is thrown and Microsoft SQL Server Management Studio refuses to display the list of databases on the server.
- Log in with Microsoft SQL Server Management Studio and click OK when the error appears.
- Press F7 to open Object Explorer Details.
- Right click on the column header at the top of the new window and uncheck Collation.
- In the left column, right-click Databases and click Refresh.
- Find your database and click the + sign to expand it.
For further information on connecting to your MSSQL Database please refer to How To Connect To Your MSSQL Database