Is there a way to restrict a user from viewing the table structure? I just want them to have a SELECT, INSERT, UPDATE, DELETE access only on that table. I want to restrict a specific programmer on the following:
1. He is not allowed to see any table definition
2. He is not allowed to create Stored Procedure
3. Since there were already Stored Procedures (SPs) for saving, updating, selecting and deleting records, that programmer will just use this SPs in accessing/manipulating records.
Overall, for security reason, we don't want that programmer to have any of design of the database.
Sql-server – Hide Table Structure
permissionssql serversql-server-2008-r2
Related Question
- Efficient TSQL Queries – Bit Field vs Table Join
- SQL Server – How to Identify What Invoked a Trigger
- Sql-server – How to prevent the clients viewing the database definition when it is installed on their server
- SQL Server Security – Best Practices for Restricting Write-Access on a Table
- SQL Server BCP – How to Copy Table Content to Flat File Before Deleting
Best Answer
This seems a strange request but it is possible.
They will of course be able to see the names of the columns by issuing a
SELECT *
and be able to get the datatypes with a bit more effort byselect into
a new (possibly#temp
) table. They will lose intellisense on that table.You also say
In that case probably they don't need any permissions at all on the table. If the table and stored procedures have the same owner you just need to grant
exec
permissions on the procedure and the access to the table in the procedure will still succeed through ownership chaining.