Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Lock one row of a table from all users
George Mansoor wrote:
> It's a security table in PeopleSoft. Trying to prevent security admins from
> changing the password for the application server account. Policy and other
> mechanisms haven't proven to be successful in getting folks to leave this
> account alone. If the account is changed, then the application servers can
> shutdown or not restart if booted.
Ah. This is a good example of where, if you explain the actual issue, you tend to get better advice than if you ask how to perform a specific action in the database.
In this case, why not write a before update trigger that says, in pseudo-code anyway,
if new.password <> old.password
then raise error telling them to sod off; else
allow the update to occur if it's sensible; end if;
If someone then tries to change the password, it errors out. If they are trying to change something else (which they are perhaps allowed to do) then it permits the change.
So no row locking needed, just code to prevent a column change.
Regards
HJR
Received on Sun May 16 2004 - 04:37:00 CDT