Solved

Applying SQL server view any database permissions

Posted on 2014-07-22
2
60 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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

813 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now