Friday, April 10, 2020

apex audit code

-- Find most accessed pages
SELECT application_id,
application_name,
page_id,
page_name,
SUM (page_id) page_hit_count
FROM apex_workspace_activity_log
GROUP BY application_id,
application_name,
page_id,
page_name
ORDER BY SUM (page_id) DESC



-- Find slowest pages
-- Note: This depends on how you calculate slow
SELECT application_id,
application_name,
page_id,
page_name,
ROUND (AVG (elapsed_time), 5) avg_elapsed_time,
SUM (page_id) page_hit_count,
MEDIAN (elapsed_time) median_elapsed_time
FROM apex_workspace_activity_log
GROUP BY application_id,
application_name,
page_id,
page_name
ORDER BY 5 DESC


-- The following query identifies when an error occurs at the page or region level:
SELECT *
FROM apex_workspace_activity_log
WHERE error_message IS NOT NULL


/*After each bad login attempt, you can
return to the Login page and see an updated Login Attempts report.
To build this report on page 101, the Login page, create a report with the following query:
*/
SELECT user_name,
authentication_method,
access_date,
authentication_result,
custom_status_text
FROM apex_workspace_access_log
WHERE application_id = :app_id
ORDER BY access_date DESC;

/*

looking for item_name into all apps 

*/
SELECT workspace,application_id,application_name,page_id,page_name,item_name,item_help_textFROM apex_application_page_itemsWHERE item_name LIKE '%xxxxxxx%'



No comments:

Post a Comment

To generate a PDF using JavaScript in Oracle APEX from a collection

  To generate a PDF using JavaScript in Oracle APEX from a collection, you can follow these steps: 1. Create a button or link on your APEX p...