Suppose a SQL Server 7.0 database table has, say, 9 columns
[Column1...Column9] & only 3 users can access this table. Each user
has a password. Assume that the passwords of the 3 users are 'pwd1',
'pwd2' & 'pwd3' (without the quotes).
I want that if the password is 'pwd1', then that user should be allowed
to access the records of the columns Column1, Column2 & Column3. If the
password is 'pwd2', then that user should be allowed to access the
records of the columns Column4, Column5 & Column6. If the password is
'pwd3', then that user should be allowed to access the records of the
columns Column7, Column8 & Column9.
Now is it possible to assign permissions to these 3 users column-wise
on such a table so that the first user can access the first 3 columns,
the second user can access the next 3 columns & the third user can
access the last 3 columns exisitng in that table? If so, how do I do
this?
Please note that by "access", I mean the user can do anything with the
records (edit them or delete them).
Thanks,
ArpanIt is possible to assign permissions on a per-column basis:
grant all on MyTable(MyCol1, MyCol2) to User1
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
"Arpan" <arpan_de@.hotmail.com> wrote in message
news:1125796276.421444.185340@.g47g2000cwa.googlegroups.com...
> Suppose a SQL Server 7.0 database table has, say, 9 columns
> [Column1...Column9] & only 3 users can access this table. Each user
> has a password. Assume that the passwords of the 3 users are 'pwd1',
> 'pwd2' & 'pwd3' (without the quotes).
> I want that if the password is 'pwd1', then that user should be allowed
> to access the records of the columns Column1, Column2 & Column3. If the
> password is 'pwd2', then that user should be allowed to access the
> records of the columns Column4, Column5 & Column6. If the password is
> 'pwd3', then that user should be allowed to access the records of the
> columns Column7, Column8 & Column9.
> Now is it possible to assign permissions to these 3 users column-wise
> on such a table so that the first user can access the first 3 columns,
> the second user can access the next 3 columns & the third user can
> access the last 3 columns exisitng in that table? If so, how do I do
> this?
> Please note that by "access", I mean the user can do anything with the
> records (edit them or delete them).
> Thanks,
> Arpan
>
No comments:
Post a Comment