Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

? 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

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.