问题描述:

I have an application using Oracle 9i as the database and I would like to grant update/delete/insert etc.. rights to only the session/connection used by this application.

I would like all other connections through excel, access, etc.. to be in a read-only state so it prevents the users from "accidentally" changing the data through these applications.

If I have all users start out with read-only rights then when they connect to this application, I would like to either call a specific stored procedure that would grant the user the proper rights only for that session though. Once they disconnect, the user would be back to read-only rights.

I have seen in other posts that you can add a trigger to the login so you can check if the connection is from application1.exe then you can do things or if they connect from 'excel.exe' you can stop them.

This is close to what I need to do but not quite.

My long worded question is "Can I grant rights to only a session/connection which would then allow that user the ability to update data based on a specific application running?"

Thank you for your patience in reading through this question.

Karl

网友答案:
  1. create user A and grant him permissions to execute DML operations
  2. create user B and grant only read permissions
  3. Use user A inside your application
  4. Use user B in Excel, access, etc
相关阅读:
Top