Performing Post Installation Tasks for Upgrade Installations
Once you have verified that your upgrade installation was successful and all upgraded applications function properly, you should remove schemas from prior Oracle APEX installations.
See Also: Upgrading from a Previous APEX Release
Verifying Successful Completion of Upgrade Phase 4
Run the SQL query to verify that phase 4 of an Oracle APEX upgrade completed successfully.
Phase 3 automatically starts phase 4 as the background scheduler job ORACLE_APEX_COPY_POST_METADATA.
You can verify that phase 4 is completed successfully by running the following query:
- For installation in a PDB:
SELECT log_date, status, additional_info FROM dba_scheduler_job_log WHERE owner = 'APEX_260200' AND job_name = 'ORACLE_APEX_COPY_POST_METADATA' ORDER BY log_date DESC FETCH FIRST 1 ROWS ONLY; - For installation in a CDB:
$ORACLE_HOME/perl/bin/perl -I $ORACLE_HOME/rdbms/admin $ORACLE_HOME/rdbms/admin/catcon.pl -b dba_scheduler_job_log -- --x"select log_date, status, additional_info from dba_scheduler_job_log where owner='APEX_260200' and job_name='ORACLE_APEX_COPY_POST_METADATA' order by log_date desc fetch first 1 rows only"
Confirm that the job run has a status of SUCCEEDED. If the job failed, see Restarting Phase 4 of an APEX Upgrade.
About Removing Prior APEX Installations
Learn about removing schemas from a prior installation by verifying if a prior installation exists.
The database users associated with schemas from prior installations are privileged users and should be removed when they are no longer necessary. Removing schemas from a prior installation is a two step process. First you verify if a prior installation exists and then you remove the schemas.
Verifying if a Prior Installation Exists
Run the SQL query to verify if a prior Oracle APEX installation exists.
To verify if a prior installation exists:
-
Start SQLcl and connect to the database where Oracle APEX is installed as
SYS. For example:-
On Windows:
<SYSTEM_DRIVE>:\ sql /nolog SQL> CONNECT SYS as SYSDBA Enter password: <SYS_password> -
On UNIX and Linux:
$ sql /nolog SQL> CONNECT SYS as SYSDBA Enter password: <SYS_password>
-
-
Run the following query:
SELECT username FROM dba_users WHERE ( username LIKE 'FLOWS_______' ESCAPE '' OR username LIKE 'APEX_______' ESCAPE '' ) AND username NOT IN ( SELECT schema FROM dba_registry WHERE comp_id = 'APEX' );
If the results contain entries in the form FLOWS_XXXXXX or APEX_XXXXXX where XXXXXX represents six numbers, those entries are candidates for removal.
Removing Schemas and SYS Objects from Prior Installations
Start SQLcl and connect to database and execute a statement to remove schemas and SYS objects.
To remove schemas and SYS objects from prior installations:
-
Start SQLcl and connect to the database where Oracle APEX is installed as
SYSspecifying theSYSDBArole. For example:-
On Windows:
<SYSTEM_DRIVE>:\ sql /nolog SQL> CONNECT SYS as SYSDBA Enter password: <SYS_password> -
On UNIX and Linux:
$ sql /nolog SQL> CONNECT SYS as SYSDBA Enter password: <SYS_password>
-
-
Execute statements similar to the following example:
DROP USER APEX_260100 CASCADE; DROP PACKAGE SYS.WWV_DBMS_SQL_APEX_260100;
Removing Schemas from Prior Installations in a CDB
Use catcon.pl to remove schemas of prior installations in a CDB.
To remove schemas and SYS objects from prior installations, run commands using the following example:
$ORACLE_HOME/perl/bin/perl -I $ORACLE_HOME/rdbms/admin $ORACLE_HOME/rdbms/admin/catcon.pl -b drop_apex260100 -- --x'drop user APEX_260100 cascade'
$ORACLE_HOME/perl/bin/perl -I $ORACLE_HOME/rdbms/admin $ORACLE_HOME/rdbms/admin/catcon.pl -b drop_wwv_dbms_sql -- --x'drop package SYS.WWV_DBMS_SQL_APEX_260100'
Fixing Invalid ACL
Learn how to fix an invalid ACL.
After following the instructions in About Removing Prior APEX Installations, you may need to fix an invalid ACL if you are running Oracle AI Database and you enabled network services for the prior Oracle APEX schema.
To fix an invalid ACL:
-
Change your working directory to the
apexdirectory where you unzipped the installation software. -
Start SQLcl and connect to the database where APEX is installed as
SYSspecifying theSYSDBArole. For example:-
On Windows:
<SYSTEM_DRIVE>:\ sql /nolog SQL> CONNECT SYS as SYSDBA Enter password: <SYS_password> -
On UNIX and Linux:
$ sql /nolog SQL> CONNECT SYS as SYSDBA Enter password: <SYS_password>
-
-
Execute a statement similar to the following:
EXEC DBMS_NETWORK_ACL_ADMIN.DELETE_PRIVILEGE('power_users.xml', 'APEX_260100');