Skip to Main Content

SQL History

Last Active TimeDescendingParsing Schema NameSql TextModuleServiceElapsed TimeRows ProcessedDisk ReadsFirst Load Time
06-07-2020 20:13:25APEX_200100TEDSTRUIK/APEX:APP 25384:1081xepdb116381821771806-07-2020 01:07:03
06-07-2020 20:13:25APEX_200100TEDSTRUIK/APEX:APP 25384:1044xepdb1145990006-07-2020 15:26:28
06-07-2020 20:13:25APEX_200100TEDSTRUIK/APEX:APP 25384:1081xepdb1555023410011706-07-2020 01:07:03
06-07-2020 20:13:25APEX_200100TEDSTRUIK/APEX:APP 25384:1036xepdb1588421862106-07-2020 02:08:38
06-07-2020 20:13:25APEX_200100TEDSTRUIK/APEX:APP 25384:1081xepdb136938621751106-07-2020 01:07:03
  • 1 - 5 of 164

Info

My take on a query to list historical SQL statements. Play around with the where clause to change this to your needs.

Either run this query as sys/system, or give the user this privilege: Note that you can only select from v$sql; you cannot grant to v$sql or any other fixed views. So here we need to give the grant directly to the base table v_$sql instead.

The Dynamic Action in the Code section below is included as an example of how to get Codemirror to work in reports - more info on my Codemirror page. It is not needed for the rest of this example, but it does make it look nice.

Code

Region

Identification
Sequence
Title
Type
Source
Source Type
Region Source

Dynamic Action

Identification
Name
Execution Options
Sequence
When
Event
Selection Type
Region
Advanced
Event Scope
True Action
Identification
Action
Settings
Code
Execution Options
Sequence
Fire On Initialization
Affected Elements
Selection Type
jQuery Selector