0

I've tried doing some research on the subject but am coming up empty. I would like to create a log that writes an entry into a log table in an Oracle database every time an application executes a query against that database. I would like to record the application, query, user name and a time stamp. Any ideas/links that would get me pointed in the right direction would be appreciated. Thanks.

StephenT
  • 475
  • 5
  • 25
  • I'm not sure that is what I'm looking for. The queries are executed by an ASP.NET application; wouldn't I need to run this from the application itself (especially for capturing the user name)? I'm obviously an amateur here and I guess I could use some help explaining where the best place to start is. – StephenT Jun 13 '13 at 18:56
  • 1
    From the application side, I would think you could create an insert statement in a subroutine after executing a query in your application. Pass the sub parameters, since you know where the code is originating. Have it insert into a transaction_log table, the userID or environment.username, and the action the user had just performed... – Jason Bayldon Jun 13 '13 at 19:10
  • 1
    You could write a wrapper function for executing querys. The function logs the action it's taking to a table, then executes the query. Just be careful on how many queries you are logging. – Kratz Jun 13 '13 at 19:10
  • OK I think I got it. How do I read the user name from the client machine? – StephenT Jun 13 '13 at 20:49

0 Answers0