Export APEX to the rescue…

I had a good time in Atlanta at OPP doing my presentations. When I got back I had some issues regarding our APEX application that I needed to solve. But the guys at the office decided to drop all objects from the schema and create all the necessary objects again. This way we got rid of all the development code and all the rubbish gathered over the last couple of months. That is a good thing. Not so good was that the APEX application was also imported again and I created a script that creates a run-only version of the application.
This is a good thing, because on the test, acceptance and definitely production database we don’t want the development to continue. We have a space for that and that is called, the development environment. Luckily I had a sandbox application in place that was still accessible. I decided to export this application twice, once as a RUN-ONLY application and once as a RUN-AND-BUILD application.

By comparing both the scripts that have been created I thought I could find the difference on how the application would be created.

It appeared that, besides from some time issues, the main difference lies in the way the application is being created. With a run-only application the call to create the application is like this:

–application/create_application
begin
wwv_flow_api.create_flow(

p_build_status => ‘RUN_ONLY’,

end;
/

With a run-and-build application the call to create the application is like this:

–application/create_application
begin
wwv_flow_api.create_flow(

p_build_status => ‘RUN_AND_BUILD’,

);
end;
/
Well, that looked promising. I decided that I had to change the current export script as this had the RUN_ONLY option in place. I couldn’t wreck it anymore than it already was.

I changed the script. ran it, and there it was. My application was available for editing again. Instead of finding out what table data to change and spending hours finding out where Oracle stores the way an application behaves, it took me just the time to export (twice), do the comparison, make the change en run the import. Less than an hours work. Thank Oracle for such an easy way to rescue my application and save me from hours, if not days, of recreating it.