Wednesday, 23 January 2013

Which pages are locked in APEX?

Would you some SQL to tell you which pages are locked?

As far as I could tell, there is no data dictionary view that this information.

So I found this using the all_tab_columns view
SELECT 
  id
 ,flow_id
 ,object_id
 ,locked_by
 ,locked_on
 ,lock_comment
 ,security_group_id
FROM apex_040200.wwv_flow_lock_page
WHERE 1=1
--AND   flow_id   = :APP_ID 
--AND   object_id = :APP_PAGE_ID
/
I used it to add a region (bound to a build option) that displayed a notification in the sidebar to other developers that the page was locked and under construction/change/development.

Scott.

ps - can you find the joke on this post?

4 comments:

Anonymous said...

joke found 1=1 :)

Scott Wesley said...

No, that was just a device that some people use to quickly add/subtract WHERE conditions since that's always true.

It's now occurred to me that I'm not sure people will see the joke - when I write the posts it asks for a location, I don't normally bother - but my template doesn't seem to show that location!

I'll keep looking...

Patrick Wolf said...

Hi Scott,

thanks for the hint that this view is missing. I have filed bug# 16228756 to add an APEX dictionary view in a future version of APEX.

Regards
Patrick

Scott Wesley said...

Thanks Patrick - when I use that view in future I'll think of it as my little contribution ;-)