Author |
Topic |
pelegk2
Aged Yak Warrior
723 Posts |
Posted - 2008-07-07 : 16:20:53
|
can i in a trigger, check on an update command, that only a specific sql user is allowed for an update, and i want to allow the update only on a certin column and to block any other column updatehow can i do that?thnaks in advancepelegIsrael -the best place to live in aftr heaven 9but no one wan't to go there so fast -:) |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-07-07 : 22:22:20
|
This is done through security . |
 |
|
pelegk2
Aged Yak Warrior
723 Posts |
Posted - 2008-07-08 : 02:15:06
|
the security dosent not answer on my questionbeacuse suppose i have 2 sql user, with a permission to update a certin table.but on this table i want each one of them to have a permission to update only a certin columnsay user 1==>update column asay user 2==>update column bhow can i do this?thnaks i nadvancepelegIsrael -the best place to live in aftr heaven 9but no one wan't to go there so fast -:) |
 |
|
elancaster
A very urgent SQL Yakette
1208 Posts |
Posted - 2008-07-08 : 04:01:01
|
you can give permissions on individual columns. sodeep was telling you the truth... it's handled by security settings, not triggersEm |
 |
|
pelegk2
Aged Yak Warrior
723 Posts |
Posted - 2008-07-08 : 04:39:58
|
in sql server 2000?can you give me info how to do it?or an article that explains how to do it?thnaks in advancepelegIsrael -the best place to live in aftr heaven 9but no one wan't to go there so fast -:) |
 |
|
elancaster
A very urgent SQL Yakette
1208 Posts |
Posted - 2008-07-08 : 04:42:49
|
i don't have a 2000 installation anymore to check, but from memory it's in the properties of the table. right click and explore your options a bit?Em |
 |
|
pelegk2
Aged Yak Warrior
723 Posts |
Posted - 2008-07-08 : 04:58:43
|
i did iti have permissions therebut the permissions are in the level of update/insert/delete in the level of all of the tableand not on one certin column!Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:) |
 |
|
elancaster
A very urgent SQL Yakette
1208 Posts |
Posted - 2008-07-08 : 05:15:57
|
it is there i'm sure. other than that look at GRANT in BOL to script it outEm |
 |
|
pelegk2
Aged Yak Warrior
723 Posts |
Posted - 2008-07-08 : 05:24:13
|
again!GRANT work for all the table and not a certin columnmaybe this possible iIsrael -the best place to live in aftr heaven 9but no one wan't to go there so fast -:) |
 |
|
elancaster
A very urgent SQL Yakette
1208 Posts |
Posted - 2008-07-08 : 06:23:55
|
from SQL2000 BOL...quote: SELECT and UPDATE statement permissions, which can be selectively applied to individual columns of a table or view.
it really is there.... honestEm |
 |
|
NeilG
Aged Yak Warrior
530 Posts |
Posted - 2008-07-08 : 06:37:13
|
Is it not just Grant [Option i.e select] on [Table](Column list if needed) to [user] |
 |
|
elancaster
A very urgent SQL Yakette
1208 Posts |
Posted - 2008-07-08 : 06:40:25
|
from BOL...quote: GRANT { ALL [ PRIVILEGES ] | permission [ ,...n ] } { [ ( column [ ,...n ] ) ] ON { table | view } | ON { table | view } [ ( column [ ,...n ] ) ] | ON { stored_procedure | extended_procedure } | ON { user_defined_function } } TO security_account [ ,...n ] [ WITH GRANT OPTION ] [ AS { group | role } ]
Em |
 |
|
pelegk2
Aged Yak Warrior
723 Posts |
Posted - 2008-07-08 : 09:30:59
|
mmm now i see1)if sow after i chage the permissions with the aboe example, how can i check what was set?2)and any way how in a stored procedure for example can i check which sql user was used to access the stored procedure?thnaks i nadvancepelegIsrael -the best place to live in aftr heaven 9but no one wan't to go there so fast -:) |
 |
|
|