Home » Categories » Database » General Database Information

I receive this error message: "The server principal A is not able to access the database B under the current security context (Microsoft SQL Server, Error:916)"

The error:

The server principal A is not able to access the database B under the current security context (Microsoft SQL Server, Error:916)

The issue:

This issue occurs with SQL Server 2008 RC0 tools. Using SQL authentication, I could connect to database engine but I could not expand the ‘Databases’ node. It would result in the error above. The issue is with SQL Server Management Studio itself, not the database engine or any other aspect of SQL Server. I could connect to the SQL installation from another server running SQL Server 2008 RC0, using SQL authentication, and expand the ‘Databases’ node without any errors. But I couldn’t connect locally using SQL authentication.

In a nutshell:

Server A – While logged in locally on Server A, I could not connect and expand the ‘Databases’ node successfully using SQL authentication.

Server B – I could connect to the SQL instance on Server A and expand the ‘Databases’ node using SQL authentication successfully.

Based on my current understanding of the issue at hand, there are several work-a-rounds to correct this issue. Hopefully, one of them will work for you.

Work around #1:

1.Within SQL Server Management Studio, view Object Explorer Details window by selecting View, Object Explorer Details in menu (or hitting F7)
2.Right-click on the column header and unselect Collation.
3.Refresh the server in Object Explorer and enumerate the databases

Work around #2:

1.Within SQL Server Management Studio, view Object Explorer Details window by selecting View, Object Explorer Details in menu (or hitting F7)
2.In Object Explorer window click at Databases folder
3.In Object Explorer Details window right-click at the column header and select ‘Reset view’.
4.Refresh Databases folder

Work around #3:

1.Check the database options for the "Auto Close” setting. If it is set to "True,” change it to "False” and test again.

Further explanation:

Collation for an offline database is returned as NULL by the engine, and SSMS currently interprets NULL values as a permissions issue. The error will occur even if Object Explorer Details view is not open. The same issue will occur if you try to enable a setting that you dont have permission to access on all databases, for example data space used.

Other helpful links:
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=355238
http://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/07/a-little-management-studio-oops.aspx
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=354322
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=354291&wa=wsignin1.0

Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
Do you support SQL Server Integration Service?
Viewed 1580 times since Tue, May 1, 2012
Do you support MS SQL WebAdmin access?
Viewed 3493 times since Tue, May 1, 2012
Can I have more than one MS SQL database on my hosting account?
Viewed 1912 times since Tue, May 1, 2012
I cannot login to my MS SQL database remotely. What did I do wrong?
Viewed 3906 times since Mon, May 7, 2012
Do you support MySQL WebAdmin Access?
Viewed 1763 times since Tue, May 1, 2012
How often do you backup my website?
Viewed 2539 times since Tue, May 1, 2012
Do you support Remote MSSQL connection?
Viewed 1966 times since Mon, Apr 30, 2012
Do you support Remote mySQL connection?
Viewed 1837 times since Mon, Apr 30, 2012