Restore APEX Report Region Selects

Von Tobias Arnhold 10.27.2010
Maybe you came in the situation when you created an APEX report and during your development you unfortunately saved it with the wrong selection.

It happened a couple of times to me...

I found a way how you can restore such a lost selection easily within a SQL statement:

select PAGE_ID,
as of timestamp sysdate - 100 / (24 * 60)
-- Minus 100 Minutes
where APPLICATION_ID = '100'
and PAGE_ID = 100;

Just use the Oracle flashback feature inside the APEX View "APEX_APPLICATION_PAGE_REGIONS" and restore it from your redolog files. Column REGION_SOURCE includes the original selection.

4 Comments " Restore APEX Report Region Selects "


Good idea but suppose your new SQL renames and/or deletes some column aliases in the query and you had heavily customized the column attributes. Even if you get the old region SQL back, all your column customizations are gone! Of course, you can flashback APEX_APPLICATION_PAGE_RPT_COLS the same way but you would still need to do a lot of data entry to recover, wish there was a easier way to handle this sort of Oops situation.

Peter Raganitsch 28 October, 2010 13:15

but you could also use the "Undo Region" link at the right sidebar of you region definition screen.

Or you simply to a page export as of X minutes ago.


Tobias Arnhold 28 October, 2010 20:23

Use the application export as of X minutes feature and copy the report from the exported application.

Thanks for the hint! :)

Denes Kubicek 28 October, 2010 22:00

I think a region is just one of many possible places where you could loose your code. Of course you could do it as the most of the people solve that problem:

1. export your application

2. import the application

3. copy the page from one application to the other

4. copy the region

5. delete the old one

6. delete the imported application

but it is much nicer to get your code just by querying the apex views. Good example Tobias. Thanks for reminding us there is a shorter way.

Denes Kubicek