Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: grant update on a table except to the key fields ?

Re: grant update on a table except to the key fields ?

From: TurkBear <johng_at_mm.com>
Date: Fri, 17 Jul 1998 14:01:04 GMT
Message-ID: <35af585c.1215437@news2.mm.com>


Jean-Luc Martou <martou_at_sia.ucl.ac.be> wrote:

>Hi!
>
>Question :
>
>When a user is granted to update a table, he can modify all the
>fields in this table, included the fields in the primary key.
>
>How is it possible to revoke the right to modify the key fields ?
>
>Jean-Luc Martou
>
>Project Manager
>Service d'informatique administrative (SIA)
>Universite catholique de Louvain
>Place de l'Universite 1 Tel : 32-(0)10-47.81.57
>B-1348 Louvain-La-Neuve Fax : 32-(0)10-47.35.71
>Belgium
>
>Acknowledge-To: <Martou_at_sia.ucl.ac.be>
>

You can do this with a trigger that when updating checks for the OLD and NEW values of the key fields....if OLD.keyfield is <> NEW.keyfield then deny the action and rollback....The trigger can also check for the username performing the action and allow specified users the update right....

The code design is up to you.....read docs on triggers.....

Hope it helps,
. Received on Fri Jul 17 1998 - 09:01:04 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US