Solved

Applying SQL server view any database permissions

Posted on 2014-07-22
2
64 Views
Last Modified: 2015-08-20
I granted a new user "View any database" permission which should allow him to see any of the database's metadata. But when I select database > properties, I receive the error "Cannot access due to current security context."

According to technet:
A login that is granted this permission can see metadata that describes all databases, regardless of whether the login owns or can actually use a particular database.

What am I doing or assuming incorrectly?
0
Comment
Question by:barnesco
2 Comments
 
LVL 4

Accepted Solution

by:
Philip Portnoy earned 500 total points
ID: 40212181
There's a new layer of security in SQL 2005+ compared to SQL 2005.

You need to grant view definition.

USE master 
GO 
GRANT VIEW ANY DEFINITION TO User1

Open in new window

0
 

Author Comment

by:barnesco
ID: 40212324
Actually, he has that permission, too, and view server state.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question