Solved

SQL Server hiding information_schema and sys views

Posted on 2009-07-15
1
663 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 500 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

737 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