Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

row - level security

0 views
Skip to first unread message

srinivas kasu

unread,
Dec 12, 2002, 11:55:55 AM12/12/02
to
hi,
can anyone let me know if i can implement row-level
security in sql server 2000 enterprise edition.

Thanks

srinivas kasu

Russell Fields

unread,
Dec 12, 2002, 1:20:02 PM12/12/02
to
srinivas kasu,

The classic method of providing row level access to contents of a table is
to create a view that filters the rows and provide access to the view. E.g.

Create View OnlyLowPay
as
Select Name, Salary
From Employee
Where Salary <= 15000

If you want to dynamically filter rows in a single view rather than managing
many views a couple of ways exist.

One is to create a mapping table for Users to data, such as:

Create Table UserRowRights
(UserName sysname,
Value money)

Insert into UserRowRights ('UserOne',15000)

Create View LimitPayAccess
as
Select Name, Salary
from Employee Join UserRowRights
on Salary <= Value
Where UserName = Current_User

Another way to do the same thing is to use IS_MEMBER or IS_SRVROLEMEMBER to
filter rows.

Russell Fields


"srinivas kasu" <sk...@firstam.com> wrote in message
news:00d001c2a1ff$5658fc80$d3f82ecf@TK2MSFTNGXA10...

0 new messages