.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Deny DBO permission to a table

Posted By:      Posted Date: October 19, 2010    Points: 0   Category :Sql Server

I've been asked to do a very interesting thing. My HR department is having a database-app created for thier use. They DO NOT want SQL Administrators to have any access to this database.

How do I keep S.A. out of the database and still allow them to do admin functionality on the SQL server?


how do I deny DBO access to user tables?

Thanks in advance

View Complete Post

More Related Resource Links

Deny Drop Table Permission to Role

Hi Experts,

                  As i have created one database role and that role has defined the following permission.



EXECUTE TO db_executor


CREATE TABLE TO db_executor


SELECT TO db_executor


INSERT TO db_executor

Data Points: Deny Table Access to the Entity Framework Without Causing a Mutiny


Julie Lerman shows database administrators how to limit access to databases from the Entity Framework by allowing it to work only with views and stored procedures instead of tables-without impacting application code or alienating developers.

Julie Lerman

MSDN Magazine August 2010

Restored copy of DB gives bizarre DENY permission to a dbo user

We took a backup of our PROD database and restored it in our Integration testing environment, and ran a script to alter the schema from the current PROD schema to the new schema we wanted to test in Integration testing. This same script has worked fine in two other environments and exhibited no issues. However, on our SQL cluster in the Integration testing environment, the script (which is hundreds of lines long and performs numerous things that require you to be dbo to do) fails on one line, a basic UPDATE statement on a single table.  The table has no deny permissions, and only has explicit grant permissions for the Application Role that accesses it.  Other users who are dbo can UPDATE the table.  I can UPDATE all other tables and do everything else a dbo should be able to do.  On every other SQL instance we have tried this on, it works. For some reason, this error only occurs specifically on this one instance of SQL, with my specific user, and this specific table.  I am baffled as to what could be going on, but need to get this repaired to bring our Integration testing environment back on line. What could be causing this?The Pragmatic TSQL Programmer

How can I create link table in an Access DB for a group permission in SharePoint?



I move all the tables to SharePoint site using "Move To SharePoint" button.  When it finished, access create additional link table called "User Information List"  However, I need a site owner permission list in my access table link(Not User Information List-it has too many list).

Can anyone help me, please?


Deny reflection permission to Invoke target


Is it possible to explicitly deny ReflectionPermission to an invokee when Invoke call will requires it (E.g target method is private)? This obviously does not work:

public class OtherClass
private static void PrivateMethod()
System.Console.WriteLine("PrivateMethod reached");

public class Program
public static void Main(string[] args)
System.Security.PermissionSet ps =
new System.Security.PermissionSet(
new System.Security.Permissions.ReflectionPermission(



How can I find from a single query that a user has which permission on a specific table


Hi All,

How can I find from a single query that a user  has which permission on a specific table. I have a Table named "Property_Address" and a User "ABC" doing update on this table. How can I revoke permissions on this table from this user and how can I find which permissions this user have on Property_Address Table.

Any help would be appreciate.

Export Visio Database Table Names to Excel

If you use the Enterprise Architect edition of Microsoft Visio for data modeling regularly, then there is a good chance that at some point you've wanted to export just the table names into Excel. You might want to do this to map logical ERD entities to physical data model tables, track project status by entity, or track overlap between database versions.

Insert value using Table Value Functions

a real gem in Sql Server 2008. mostly people still using Stored procedure may be they shifted to SQL Server but they are not using TVF right now.

Using jQuery to Filter Table Rows

The project is using the .net GridView control, so I had limited control over the output HTML code. Still, I think this code can work for most tables. One thing to notice: you should use the class "filterable" on your table or on one of its parents for the code to work.
First, we need a text box:

RadioButton Groups, Table Rows And NamingContainers in asp.net

The RadioButtonList. Very handy for inviting users to select just one item from a list although because of the screen real estate it takes up, used less and less in favour of the DropDownList. In plain HTML, the browser knows to enforce the unique selected value amongst a list of radio buttons because they all have the same value for their name attributes.

RadioButton Groups, Table Rows And NamingContainers

(In which AJAX-enhanced CheckBoxes become more useful than RadioButtons but inheritance saves the day, and a simple RadioButton-derived control establishes the purpose of a control's naming container)

The RadioButtonList. Very handy for inviting users to select just one item from a list although because of the screen real estate it takes up, used less and less in favour of the DropDownList. In plain HTML, the browser knows to enforce the unique selected value amongst a list of radio buttons because they all have the same value for their name attributes.

Building a 3-Tier App with Silverlight 3, .NET RIA Services, and Azure Table Storage

Silverlight 3, .NET RIA Services, and Windows Azure Services Platform makes a 3-tier Cloud application easier to build: Silverlight 3 as presentation tier, .NET RIA services as the business logic and data access tier, and Windows Azure Table as the data storage tier. The sample application in this article demonstrates the architecture with a simple Survey application with all these technologies working together from Windows Azure.

Temporary tables in SQL Server vs. table variables

When writing T-SQL code, you often need a table in which to store data temporarily when it comes time to execute that code. You have four table options: normal tables, local temporary tables, global temporary tables and table variables. I'll discuss the differences between using temporary tables in SQL Server versus table variables.

Import XML File to SQL Table

Here is a brief example of importing an XML file into SQL Server table. This is accomplished by using the BULK option of OPENROWSET to load the file, and then utilizing the XQuery capabilities of SQL Server to parse the XML to normalized table format. This example requires SQL server 2005 or SQL Server 2008.

First, the following XML is saved to XML file C:\Products.xml.

Adding the table row below a particular row.


What is the best method in jQuery to add an additional row to a table as the row below a particular row?

Checkboxes from data table


I have a data table that contains some values for Certifications.  This table can be updated in a different part of my application.  On the web page I am currently working on, I would like to have check boxes appear for every value in the data table.  I have been struggling with this trying to use a For Each loop and I cannot get it to work for anything.  Any suggestions? 

I am using the following Razor syntax to obtain my data (I know this works because I can display it in a WebGrid):


var db = Database.Open("MyConn");

Display column from child table. Possible ?



I'am using dnamic entity with EF4. On a list page of a table, I would like to display a column containing information from a child table of the current element. Sample :

Order List :

Order Data | Required Date | Shipped Date | etc... | ... | Customer Name (foreign key with tostring() method override) | Customer Postal Code (Column that I want to add) |

I don't known how to do that. Is it possible ? Maybe I have to to create my own Metadata proxy that will add dynamicly a column on the MetaColumn list of the table.

Does someone have an easier or better idea ?

Thank you for any help.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend