Skip to main content

Remove Oracle Application Express (APEX) from Oracle Database 12c

Remove Oracle Application Express (APEX) from Oracle Database 12c

1.1. Identify installed Apex

Connect to CDB$ROOT by sys user:

sqlplus / as sysdba
show con_name;
show user;

First of all check our currently installed APEX version with this query:

set lines 200
column CON_ID format 999999
column PDB format a12
column COMP_ID format a12
column SCHEMA format a12
column VERSION format 999999
column STATUS format a16
select m.CON_ID, (select i.name from v$pdbs i where i.con_id=m.con_id) PDB,m.COMP_ID, m.SCHEMA, m.VERSION, m.STATUS from CDB_REGISTRY m where m.COMP_ID='APEX' order by m.CON_ID;

 CON_ID PDB      COMP_ID   SCHEMA       VERSION       STATUS
------- ------------ ------------ ------------ ------------------------------ ----------------
      3 CMSDB      APEX   APEX_200100  20.1.0.00.13       VALID
      6 PSBDBHR      APEX   APEX_200100  20.1.0.00.13       VALID
      7 PSBDBFA      APEX   APEX_190200  19.2.0.00.18       VALID
     10 EBEK3RV      APEX   APEX_050000  5.0.4.00.12       VALID
     11 MISPDB      APEX   APEX_200200  20.2.0.00.20       VALID
     12 APEXREPORT   APEX   APEX_220200  22.2.0       VALID
     14 UCB3RVDB     APEX   APEX_050100  5.1.0.00.45       VALID
     15 EBEK2RVDB    APEX   APEX_050000  5.0.1.00.06       VALID
     16 PDBORCL     APEX   APEX_050100  5.1.0.00.45       VALID


1.2. Remove Apex

We download the laest Apex and unzip to '/oracle/apex/apex' directory of Databae server.
At First, remove APEX from all custom PDB then from PDB$SEED and lastly from CDB$ROOT.

Go to the Home Directory of Later release of APEX;
[oracle@Server ~]$ cd /oracle/apex/apex
Connect to the desire PDB with sys user;

[oracle@Server apex]$ sqlplus / as sysdba
SQL> ALTER SESSION SET CONTAINER=PDBORCL; -- PDB Name Like PDBORCL, PDB$SEED, CDB$ROOT etc.
SQL> SHOW CON_NAME; -- container=PDBORCL
SQL> SHOW USER; -- user=sys
SQL> select username from dba_users where upper(username) like '%APEX%'; -- Check the Apex User
SQL> !ls -lrth apxremov.sql
SQL> @apxremov.sql
SQL> select username from dba_users where upper(username) like '%APEX%'; -- You do not see any Apex User

.
.
.
.
PL/SQL procedure successfully completed.

...Application Express Removed
or
1.3. Drop Apex

If we unable to download too old apex from oracle then drop the  old installations (Non-CDB or PDB):



sqlplus / as sysdba
set lines 200
column CON_ID format 999999
column PDB format a12
column COMP_ID format a12
column SCHEMA format a12
column VERSION format 999999
column STATUS format a16
select m.CON_ID, (select i.name from v$pdbs i where i.con_id=m.con_id) PDB,m.COMP_ID, m.SCHEMA, m.VERSION, m.STATUS from CDB_REGISTRY m where m.COMP_ID='APEX' order by m.CON_ID;


 CON_ID PDB      COMP_ID        SCHEMA       VERSION                    STATUS
------- ------------ ------------ ------------ ------------------------------ ----------------
     16 PDBORCL     APEX       APEX_050100  5.1.0.00.45                VALID



ALTER SESSION SET CONTAINER=PDBORCL;

-- 12.2 onward.
ALTER SESSION SET "_oracle_script"=true;

drop user APEX_050100 cascade;
drop user APEX_PUBLIC_USER cascade;
DROP PACKAGE SYS.WWV_DBMS_SQL_APEX_050100;

Again check by the step -1 (1.1. Identify installed Apex) we do not find any installed apex.



In this way, we will remove Oracle Apex from any Pluggable Database.




Comments

Popular posts from this blog

Upgrading Issue for RHEL 7 to 8 With Leapp

Overview The Leapp utility is a framework for updating and upgrading operating systems as well as applications. The operations of this utility consist of two phases 1. the preupgrade Phase – that chack the upgrade possibilities and 2. the actual upgrade phase – that map packages between previous and current versions of the software packages. Issue – 01: After running ‘ sudo leapp preupgrade ‘ sometimes you find the below issue in ‘ /var/log/leapp/leapp-report.txt ‘. Detail: Risk Factor: high (inhibitor) Title: Leapp detected loaded kernel drivers which have been removed in RHEL 8. Upgrade cannot proceed. Summary: Support for the following RHEL 7 device drivers has been removed in RHEL 8: – pata_acpi Key: f08a07da902958defa4f5c2699fae9ec2eb67c5b Remediation: 1. Disable detected kernel drivers in order to proceed with the upgrade process using the rmmod or modprobe -r . rmmod – Simple program to remove a module from the Linux Kernel modprobe – Add and remove modules from the Linux Ke...

ORA-00800: soft external error arguments

The problem as stated: After upgrading the Oracle Database from 12c to 19c the following error generated in the alert log file. Actual Oracle Error Code: ORA-00800 After Upgrading from 12c to 19c ORA-00800: soft external error, arguments occured Oracle Database Enterprise 19c fails to start with error: ORA-00800: soft external error, arguments: [Set Priority Failed], [VKTM] Why does Insights prevent Oracle grid services from starting How to configure the User slice to allow Real-Time Scheduling for user processes In Alert Log: Errors in file /u01/app/oracle/diag/rdbms/orclproddbone/orclprod/trace/psbcdb_vktm_3529.trc (incident=1200048) (PDBNAME=CDB$ROOT): ORA-00800: soft external error, arguments: [Set Priority Failed], [VKTM], [Check traces and OS configuration], [Check Oracle document and MOS notes], [] Incident details in: /u01/app/oracle/diag/rdbms/orclproddbone/orclprod/incident/incdir_1200048/psbcdb_vktm_3529_i1200048.trc 2023-10-30T10:04:53.536165+06:00 Error attempting to elev...

The Oracle Management Server (OMS) host and port specified via OMS_HOST and EM_UPLOAD_PORT is not available

The Oracle Management Server (OMS) host and port specified via OMS_HOST and EM_UPLOAD_PORT is not available. 1.0. error message: Error Message: The Oracle Management Server (OMS) host and port specified via OMS_HOST and EM_UPLOAD_PORT is not available. Pass in a valid hostname and port number for the OMS to successfully deploy the agent. 1.1. deploy log: Log: /opt/gc_inst/em/EMGC_OMS1/sysman/agentpush/2023-11-07_16-09-23-PM/applogs/dblivesrv_deploy.log Execution of command cd /opt/agent/ADATMP_2023-11-07_16-09-23-PM;/opt/agent/ADATMP_2023-11-07_16-09-23-PM/agentDeploy.sh -ignorePrereqs ORACLE_HOSTNAME=dblivesrv AGENT_BASE_DIR=/opt/agent OMS_HOST=oemsrv.localdomain EM_UPLOAD_PORT=4903 AGENT_INSTANCE_HOME=/opt/agent/agent_inst b_doDiscovery=false START_AGENT=false b_forceInstCheck=true -force AGENT_PORT=3872 on host dblivesrv Failed 1.2. oms details: [oracle@oemsrv ~]$ $OMS_HOME/bin/emctl status oms -details Oracle Enterprise Manager Cloud Control 13c Release 5 Copyright (c) 1996, 2...