Is there a permission in SQL server 2012 to just validate/ existence an object (in my case it's a view) but not a select permission? Idea is if a usergroupA try select a view it just should not fail and return no records. Thanks in advance!
Sql-server – Sql server 2012 grant role permission to just validate view but not select data from it
database-designsql serversql-server-2012t-sql
Related Question
- Sql-server – SQL Server: grant select access to a user in a view and not in its tables
- Sql-server – SQL Server user cannot select from a table it just created
- Sql-server – Extracting data from SQL Server linked server
- Sql-server – How to GRANT object permission to a user defined server role
- Sql-server – SQL server – data successfully inserted in a table but not returned in Select Statement
- Sql-server – The SELECT permission was denied – View querying data from a different database
Best Answer
Consider granting VIEW DEFINITION permission as defined in the below quoted reference; this still applies to SQL Server 2012 as well.
Creating a per Database Role for VIEW DEFINITION permissions
Members of this role in the database you create it on should only have access to the applicable metadata as long as they don't have other permissions to database objects such as explicit SELECT access to the a table or a member of the db_datareader fixed database role.
Granting VIEW DEFINITION permissions explicitly per object
The above TSQL will grant explicit VIEW DEFINITION access to the specific DB object and to the specific security principal as specified in the applicable TSQL logic
Further Resources
GRANT Object Permissions (Transact-SQL)
CREATE ROLE (Transact-SQL)
VIEW DEFINITION