"The server principal 'A' is not able to access the database 'B' under the current security context" when connecting with Microsoft SQL Server Management Studio Issue:
When connecting to your database with Microsoft SQL Server Management Studio, you receive the error in the subject. 

 

Cause
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.


Resolution

  1. Log in with Microsoft SQL Server Management Studio and click OK when the error appears.
  2. Press F7 to open Object Explorer Details.
  3. Right click on the column header at the top of the new window and uncheck Collation
  4. In the left column, right-click Databases and click Refresh
  5. Find your database and click the + sign to expand it.

 

?האם התשובה שקיבלתם הייתה מועילה 78 משתמשים שמצאו מאמר זה מועיל (79 הצבעות)