Solved

SQL Server hiding information_schema and sys views

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

680 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