Showing posts with label enterprise. Show all posts
Showing posts with label enterprise. Show all posts

Tuesday, March 20, 2012

row level security in SQL

Hi Gurus, I am looking for row level security in sql
server. I was told that sql enterprise edtion is required
to implement this. can anyone give me some direction of
how this can be done? thanks.This is a multi-part message in MIME format.
--=_NextPart_000_00B3_01C37844.E0892760
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
You don't need EE. Rather, you can create views and grant access to the =views. For example, if you wanted to restrict people's access to just =the rows they added - and you were tracking that information - then you =could have:
create view MyView
as
select
*
from
MyTable
where
CreateUser =3D CURRENT_USER
go
-- Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"yl" <hubrian@.hotmail.com> wrote in message =news:16c601c37865$143b3380$a601280a@.phx.gbl...
Hi Gurus, I am looking for row level security in sql server. I was told that sql enterprise edtion is required to implement this. can anyone give me some direction of how this can be done? thanks.
--=_NextPart_000_00B3_01C37844.E0892760
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

You don't need EE. Rather, you =can create views and grant access to the views. For example, if you wanted to =restrict people's access to just the rows they added - and you were =tracking that information - then you could have:
create view MyView
as
select
=*
from
=MyTable
where
CreateUser ==3D CURRENT_USER
go
-- Tom
---T=homas A. Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist, SQL =Server ProfessionalToronto, ON Canadahttp://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql
"yl" wrote in message news:16c601c37865$14=3b3380$a601280a@.phx.gbl...Hi Gurus, I am looking for row level security in sql server. I was told =that sql enterprise edtion is required to implement this. can anyone give =me some direction of how this can be done? thanks.

--=_NextPart_000_00B3_01C37844.E0892760--|||thank you all very much.
>--Original Message--
>Hi Gurus, I am looking for row level security in sql
>server. I was told that sql enterprise edtion is
required
>to implement this. can anyone give me some direction of
>how this can be done? thanks.
>.
>

Monday, March 12, 2012

Row Count problem

I've got a table which I know has 10108 rows in (I've looped through the table with some C# code), yet, in Enterprise manager, when i right click and view properties, the ROWS returns 10043 - a difference of 65 rows!

Why is this?

BTW - not that it should make any difference, but its on SQL Server 2000 standard edition.run

select count(*) from tablename

That will give the true result. Then it will either be down to some dodgy stats/code in EM or your code ;)|||I know that! Like I said - I already KNOW how many rows are in the table - that isn't the issue. The issue is why the right click > Properties gives me a different answer. Even if I DROP the table, re-CREATE it and INSERT maybe 50 rows, I still don't get the correct number of rows that I input.|||You didn't explain that at all. You said you've used c# code and that maybe faulty. IF the count(*) is tallying with your c# code then fair enough. Is it?