Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

SQL Server hiding information_schema and sys views

Posted on 2009-07-15
1
Medium Priority
?
689 Views
Last Modified: 2012-08-13
I have a user that is only assigned to the db role db_datareader and public. The user can see all the information_schema and sys views. As a test, I tried creating a separate role that denies view definition to the sys schema and removing the user from the db_datareader role, but the user can still see the views.

Any suggestions on how to deny view definition of the information_schema and sys views for a database?

The reason why I want to do this is because users do not want to see these extra views in their client applications when they are selecting user views/tables.

There does not seem to be a clear answer for this anywhere.
0
Comment
Question by:incidental74
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 57

Accepted Solution

by:
Raja Jegan R earned 1500 total points
ID: 24865651
>> Any suggestions on how to deny view definition of the information_schema and sys views for a database?

No.. You cant deny usage of Information_schema and sys views to users.

The purpose of information_schema and sys views is to display records for those specific user only. It will display records for which the current user has access.

Hence if the user dont have access to an object, it will not display those records.
Since you added the user as part of datareader role, it will have select privileges on all tables and views and hence it will be visible in Information_schema and sys views.

You better need to REVOKE those objects to this user for the list of objects you wish.
That would help you in restricting the user to those objects.

Hope this clarifies.
0

Featured Post

What Is Blockchain Technology?

Blockchain is a technology that underpins the success of Bitcoin and other digital currencies, but it has uses far beyond finance. Learn how blockchain works and why it is proving disruptive to other areas of IT.

Question has a verified solution.

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

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
In this article I will describe the Detach & Attach 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.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

715 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