The Server Principal Is Not Able To Access The Database Under The Current Security Context

Fix: SQL Server Error 916 – Server Principal Cannot Access Database

The following error can appear when expanding the Databases node in SQL Server Management Studio (SSMS), especially in older versions such as SSMS 2008:

"The server principal 'xxx' is not able to access the database 'yyy' under the current security context."
(Microsoft SQL Server, Error: 916)

This issue is usually caused by SSMS itself rather than the SQL Server database engine. Permissions on the SQL user may be correct, but SSMS fails to enumerate databases due to metadata queries.

Common Causes

  • SSMS trying to read metadata columns (Collation, Owner, etc.) without permissions
  • “Auto Close” option enabled on a database
  • System databases marked as offline or inaccessible
  • Older SSMS version querying newer SQL Server versions

Workaround #1 – Disable the Collation Column

  1. Select View → Object Explorer Details or press F7.
  2. Right-click the column header (e.g., “Collation”).
  3. Uncheck Collation.
  4. Refresh the server in Object Explorer.

Workaround #2 – Reset the Object Explorer Details View

  1. Open Object Explorer Details (View → Object Explorer Details or F7).
  2. Click the Databases folder in Object Explorer.
  3. Right-click inside the column header area.
  4. Choose Reset View.
  5. Refresh the Databases folder.

Workaround #3 – Check the Database “AUTO_CLOSE” Setting

If a database has AUTO_CLOSE enabled, SSMS may fail to read metadata when the database is constantly closing in the background.

  1. Run a query in SSMS to identify databases using AUTO_CLOSE:
    SELECT name, is_auto_close_on FROM sys.databases;
    
  2. Disable AUTO_CLOSE for any affected databases:
    ALTER DATABASE [YourDatabaseName] SET AUTO_CLOSE OFF;
    

Workaround #4 – Update to a Modern Version of SSMS

SQL Server Management Studio 2008 and early 2012 builds have known enumeration bugs. Updating to the latest supported SSMS version often resolves Error 916 immediately.

You can download the latest SSMS from Microsoft’s official site.

Workaround #5 – Verify User Permissions

If the database user does not have permission to read metadata or is not mapped correctly, remapping or reassigning roles may help:

EXEC sp_change_users_login 'Auto_Fix', 'YourUserName';

Advanced Windows SQL Hosting

Fast, secure, and fully managed Microsoft SQL hosting on Windows Server 2022 with Plesk.

View Windows Hosting →
Was this article helpful?

mood_bad Dislike 0
mood Like 1
visibility Views: 15738

Need more information or have a question ?