All my releases are done via scripts. In other words I don’t deploy APEX applications from the browser, rather straight from SQLcl. Since some of my releases can take a while and puts the code in an unstable state I usually disable the application for the duration of the release. This article will show how to disable an APEX application in PL/SQL.
You can manually disable an application via
Shared Components > Application Definition > Availability > Status:
When setting the
Unavailable it will look like this for users:
Note: they’re various status options which allow you to determine how to define the status message.
Going back to releases, the overall order things occur in are:
- Disable APEX application
- Run release (DDL, DML, etc)
- Update APEX application (this will clear the disabled setting that was manually done in the first step.
PL/SQL code to disable an APEX application:
If using a version lower than APEX 18.x you’ll need to install OOS Utils to create an APEX session in SQL.
Before running the above code you’ll need to enable the runtime API by going to
Shared Components > Security Attributes > Database Session > Runtime API Usage and check
Modify This Application.