Is there an convenient way to log access to stored procedures from withing Oracle? I am a web developer and presently we are required to pass a variety of user info to many stored procedures so that those procedures can in turn call another procedure that logs access to the original stored procedure in a table.
For example if I want to call a procedure called get_movie(id) that will return a row from the movie table based on id, I would have to do something like this get_movie(username, domain, ip, id) so that the procedure can log the user/domain/ip of the web user who initiated the call to the procedure.
It seems like there must be a better way but my knowledge of Oracle is limited.
I would set the common parameters using a procedure and
sys_contextevery time you get your connectione.g:
and to query the values:
see: http://download.oracle.com/docs/cd/E14072_01/server.112/e10592/functions182.htm
and
Is there a way to communicate application context to a DB connection in non-Sybase DB servers (similar to set_appcontext in Sybase)?