Re: Grant v Deny



AHartman (Hoosbruin@xxxxxxxxxxxx) writes:
I just created 3 sensitive data tables within my database. I have a
Group that conatins multiple people and only 5 of those can have access
to these tables new tables. The rest of the people in the group need
Read access to all of the other tables within this database. These 5
people also need to be able to Read the reaming tables also.

You could put these three tables in a schema on their own. Then create
a group of the five. Then you can do:


GRANT SELECT ON SCHEMA::dbo TO AllUsers
GRANT SELECT ON SCHEMA::secretes TO GroupOfFive

AllUsers would be a role with all users in the database.



--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.



Relevant Pages

  • Re: How to Generate all grants to a user role? (SQL Server 2000)
    ... another version of the database. ... WHEN 204 THEN 'GRANT' ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: How to Generate all grants to a user role? (SQL Server 2000)
    ... database and there are more grants than I want to do by hand. ... WHEN 204 THEN 'GRANT' ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: Creating custom Primary Key in SQL Server 2005
    ... When a new grant is entered, I need to generate a primary ... How can I check what the last primary key in the database is? ... SQL Server accept any length of the PK up to 900 bytes. ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: Users cannot view stored procedure text
    ... text of the stored procedures, functions, etc. ... You need to grant them VIEW DEFINITION on the procedures. ... Books Online for SQL Server 2005 athttp://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books ... ...
    (comp.databases.ms-sqlserver)
  • Re: No db access after publishing web site
    ... GRANT UPDATE TO ... If I detach and attach this database on a different PC (according that PC ... Cannot open database "pago" requested by the login. ... Are you detaching/attaching the SQL Server Express database correctly ...
    (microsoft.public.dotnet.framework.aspnet)