{"id":30,"date":"2015-03-30T06:43:12","date_gmt":"2015-03-30T04:43:12","guid":{"rendered":"http:\/\/geekinto.com\/?p=30"},"modified":"2015-03-30T06:43:12","modified_gmt":"2015-03-30T04:43:12","slug":"some-audit-codes","status":"publish","type":"post","link":"https:\/\/howoracleapex.com\/?p=30","title":{"rendered":"Some audit codes"},"content":{"rendered":"<p>Next codes help you to audit your app ..<\/p>\n<p>Go head&#8230;<\/p>\n<pre class=\"lang:default decode:true \" title=\"SQL\">-- Find most accessed pages\r\nSELECT application_id,\r\napplication_name,\r\npage_id,\r\npage_name,\r\nSUM (page_id) page_hit_count\r\nFROM apex_workspace_activity_log\r\nGROUP BY application_id,\r\napplication_name,\r\npage_id,\r\npage_name\r\nORDER BY SUM (page_id) DESC\r\n\r\n\r\n\r\n-- Find slowest pages\r\n-- Note: This depends on how you calculate slow\r\nSELECT application_id,\r\napplication_name,\r\npage_id,\r\npage_name,\r\nROUND (AVG (elapsed_time), 5) avg_elapsed_time,\r\nSUM (page_id) page_hit_count,\r\nMEDIAN (elapsed_time) median_elapsed_time\r\nFROM apex_workspace_activity_log\r\nGROUP BY application_id,\r\napplication_name,\r\npage_id,\r\npage_name\r\nORDER BY 5 DESC\r\n\r\n\r\n-- The following query identifies when an error occurs at the page or region level:\r\nSELECT *\r\nFROM apex_workspace_activity_log\r\nWHERE error_message IS NOT NULL\r\n\r\n\r\n\/*After each bad login attempt, you can\r\nreturn to the Login page and see an updated Login Attempts report.\r\nTo build this report on page 101, the Login page, create a report with the following query:\r\n*\/\r\nSELECT user_name,\r\nauthentication_method,\r\naccess_date,\r\nauthentication_result,\r\ncustom_status_text\r\nFROM apex_workspace_access_log\r\nWHERE application_id = :app_id\r\nORDER BY access_date DESC;<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Next codes help you to audit your app .. Go head&#8230; &#8212; 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&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,2,5],"tags":[],"class_list":["post-30","post","type-post","status-publish","format-standard","hentry","category-apex","category-oracle","category-sql"],"_links":{"self":[{"href":"https:\/\/howoracleapex.com\/index.php?rest_route=\/wp\/v2\/posts\/30","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/howoracleapex.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/howoracleapex.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/howoracleapex.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/howoracleapex.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=30"}],"version-history":[{"count":1,"href":"https:\/\/howoracleapex.com\/index.php?rest_route=\/wp\/v2\/posts\/30\/revisions"}],"predecessor-version":[{"id":31,"href":"https:\/\/howoracleapex.com\/index.php?rest_route=\/wp\/v2\/posts\/30\/revisions\/31"}],"wp:attachment":[{"href":"https:\/\/howoracleapex.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=30"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/howoracleapex.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=30"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/howoracleapex.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=30"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}