Skip to Main Content

SQL History

Last Active TimeParsing Schema NameSql TextModuleServiceElapsed TimeRows ProcessedDisk ReadsFirst Load Time
23-04-2024 16:16:45TEDSTRUIKTEDSTRUIK/APEX:APP 25384:1089freepdb17354002523-04-2024 13:04:33
23-04-2024 16:16:45TEDSTRUIKTEDSTRUIK/APEX:APP 25384:1089freepdb1174850023-04-2024 13:04:33
23-04-2024 16:16:44APEX_230200TEDSTRUIK/APEX:APP 25384:1freepdb1937987917717421-04-2024 17:09:54
23-04-2024 16:16:44APEX_230200TEDSTRUIK/APEX:APP 25384:1048freepdb11145451922022-04-2024 05:05:08
23-04-2024 16:16:44APEX_230200TEDSTRUIK/APEX:APP 25384:1113freepdb1350601082523-04-2024 05:07:17
  • 1 - 5 of 237

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