Not able to access the database "model" under the current security context. (Microsoft SQL Server, Error: 916) - by Giorgio Sardo

Status : 

  Not Reproducible<br /><br />
		The product team could not reproduce this item with the description and steps provided.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 198005 Comments
Status Closed Workarounds
Type Bug Repros 4
Opened 9/8/2006 9:53:29 AM
Access Restriction Public


I'm using Windows Vista RC1.

When I try to attach a database I get this error:

TITLE: Microsoft SQL Server Management Studio Express

Failed to retrieve data for this request. (Microsoft.SqlServer.Express.SmoEnum)

For help, click:


An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)


The server principal "GioVista\gio" is not able to access the database "model" under the current security context. (Microsoft SQL Server, Error: 916)

For help, click:


Sign in to post a comment.
Posted by tavares.wladimir on 3/25/2013 at 2:28 PM
Add the current user account to SQL Server Admin role or or a user role with permission to execute the action.
Posted by jon_shaw on 11/30/2007 at 2:18 PM
I had the same problem trying to attach a database using SQL Server management studio express under Vista. Corillian's answer of right clicking and selecting "Run as administrator" was the solution. Many thanks!
Posted by Keith Newton on 11/29/2007 at 7:50 PM
Right clicking on SQL Management Studio Express and clicking "Run as administrator" fixed this issue for me on Vista x64. I couldn't find an option to connect as administrator so tried this instead.
Posted by Laurentiu [MSFT] on 9/13/2006 at 10:32 AM
We are resolving this issue as not repro. If the previous suggestion related to the restricted adminstrator privileges did not help and you are still hitting this issue, please provide additional information on the steps you followed and update this report.

Thank you
Posted by Laurentiu [MSFT] on 9/11/2006 at 11:04 AM
We need more detailed information on the steps that you are following. Let us know what actions you are taking and what is the context. Are you executing as GioVista\gio? What are the permissions that this account has? Why do you expect the operation to succeed - did it work before?

Note that on Vista, due to the administrator restricted token feature, local administrator accounts that would normally be sysadmin in SQL Server, will no longer have sysadmin privileges. If gio was such an account, you might want to try connecting with administrator privileges enabled, to see if the operation succeeds. If it does, you would need to make gio explicitly a sysadmin, for the operation to work with a restricted token as well.