Take the 2-minute tour ×

I have a table M_PARAMETER which has a column MMRUN.

When this MMRUN='Y' then the User can not modify any transaction in the app's front end. When MMRUN='N' then the User can do the modification.

emp,dept,salgrade table do not modify users when MMRUN='Y'

share|improve this question

closed as not a real question by Justin Cave, RolandoMySQLDBA, Kerri Shotts, Marian, Jack Douglas Jul 30 '11 at 7:49


? Need more details before we can be helpful here. Not really sure what you're trying to achieve, short of limiting a person's ability to change rows (which, I guess, you could use triggers to accomplish). –  Kerri Shotts Jul 15 '11 at 17:04
Is there an actual question here? I don't think so, I edited for some reasonable amount of clarity. –  jcolebrand Jul 15 '11 at 20:31

1 Answer 1

You could use a global system context to do this. See here Oracle context

The user logs on, your stored procedure determines the value of MMRun for that user and the context is set for this session. Then your triggers or insert/update/delete triggers or procedures refer to the context for permission to edit.

Really though this sounds like something that will require a more fine grained permission structure in the future. I've never seen something simple like can modify/cannot modify stay simple. Usually you are asked to provide variations on this in the future. There are open source PL/SQL packages available which can be adapted to do this.

share|improve this answer
