This content has been marked as final. Show 4 replies
Why do you want to reinvent the wheel, or in this case how APEX does page visit auditing? Does it not provide the level of detail you need? Explaining WHY you want to do this might help to explain HOW to do what you want to do..
The reason: As I understand, and I am by no means an expert, the built-in logs 'audit' all activity. I practiced querying against this with some level of detail in the SQL workshop area - which I was happy!
But, what I would like is to maybe report, or even better graph this information for users of the system, within the application itself - with a simple few clicks. I have tested reporting and graphing against a query and with no success (failure to load). As the activity logs are views and not tables - this creates problems (as I understand). Sorry for being a little vague in my original post.
Here is what I use to monitor activity for the current day; it may get you started.
I filter the report with a LOV based on this query:
SELECT apex_user "User", page_name "Page Name", page_id "Page ID", to_char (view_date, 'MM/DD/YYYY HH24:MI PM') "Date/Time Viewed", apex_util.get_since(sysdate - (sysdate - view_date)) "Time Ago", rows_queried "Rows Queried" FROM apex_workspace_activity_log WHERE (:p315_user = '%null%' OR apex_user LIKE '%' || :p315_user || '%') AND trunc (view_date) = trunc (sysdate)
SELECT username d, username r FROM ( SELECT DISTINCT apex_user username FROM apex_workspace_activity_log WHERE trunc( view_date ) = trunc( sysdate ) ) ORDER BY 1
I just wanted to thank-you for your reply. It's been a great help.