My Java application uses db sessions, via Hibernate.
What I want to do is somehow, when I create a session in my app, is to identify that session as an ‘application’ session. The reason is that I wish (via a before trigger) to restrict the updates that users can make to a table, while giving the application carte-blanche to do what it likes.
In other words, my trigger does something like this:
if(user is an application) allow update else raise oracle error end if
Anyone know the best way to do this?
It might be more simple to grant the privileges to a role and then have the application set that role.
http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_10004.htm#sthref9521