January 21, 2008 at 1:29 pm
This has probably been asked many times, please bear with me.
Have a central database table that is populated by multiple groups, and want to limit access to the content by a view that filters by group and only allow (select from in schema for the group.
Table1
id, dat
groupA, data1
groupB, data2
groupC, data3
groupB, data4
Schemas
groupA
groupB
groupC
Users
A
B
C
Views
groupA.view (select * from Table1 where id = 'groupA'
groupB.view (select * from Table1 where id = 'groupB'
groupC.view (select * from Table1 where id = 'groupC'
When B logs into the database, I only want that user to be able to run queries against their view, and does a select * from view, will only see - groupB, data2.
My problem is that when B logs in, they can still see and query Table1, etc.
Looking for a good guide to SQL Server 2005 security or a public tutorial.
TIA -
-jkp
January 22, 2008 at 10:41 am
Grant SELECT on groupB.view to User B and Deny SELECT on Table1 for User B. Do the same for the other users.
This site has a lot of good SQL Server security info: http://www.sqlsecurity.com/
Greg
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply