• When I run the script in Piotr Rodak's post at http://www.sqlservercentral.com/Forums/Topic541937-146-1.aspx it works for me. When 'testu' is not a member of [no_schema_view_role] it can see details of user tables, and when 'testu' is a member of that role it can not see details of the user tables.

    Please can you test this exact situation can see if it works for you. It it does then that means the functionality you want can work, you just have to make it work in your live situation.

    When your users connect to SQL Server, do they use a Windows or a SQL Server login? SQL Server will always try to connect using a Windows login before it trys to use a SQL Server login, so if they can log in using Windows they will do that regardless of if you also supply a SQL Server login. If they have logged in using Windows authentication, is their Windows group or account a member of [no_schema_view_role]?

    Original author: https://github.com/SQL-FineBuild/Common/wiki/ 1-click install and best practice configuration of SQL Server 2019, 2017 2016, 2014, 2012, 2008 R2, 2008 and 2005.

    When I give food to the poor they call me a saint. When I ask why they are poor they call me a communist - Archbishop Hélder Câmara