Install and Remove APEX from CDB PDB databases Oracle

Install and Remove APEX from CDB PDB databases Oracle

I am getting the following error of APEX while upgrade the PDB database from lower verstion to upper version by unplug and plug.

Error:
ERROR at line 1: ORA-65346: The PDB version is lower and components (APEX) are missing in CDB.

Check the APEX detail with following

select COMP_ID, VERSION, STATUS from CDB_REGISTRY where COMP_ID='APEX' order by CON_ID;

select r.COMP_NAME, r.VERSION, c.NAME, c.CON_ID from CDB_REGISTRY r, V$CONTAINERS c where r.CON_ID=c.CON_ID and r.COMP_ID='APEX' order by CON_ID;

Remove the Apex from CDB
Go to the Oracle home apex directory

cd %ORACLE_HOME%\apex

2. Connect with CDB$ROOT and check all pdb is open state.

sqlplus sys as sysdba
alter pluggable database open all;

3. Remove APEX from the CDB$ROOT and all pluggable database.

sqlplus "sys/syspass as sysdba" @apxremov_con

4. Recompile all invalid objects

@?\rdbms\admin\utlrp.sql
select object_name, status from dba_objects where status='INVALID';

5. Check registry for APEX entry.

select COMP_ID, STATUS from DBA_REGISTRY where COMP_ID='APEX';
No row selected.

Install APEX
1. Go to the Oracle home apex directory

cd %ORACLE_HOME%\apex

2. Connect with CDB$ROOT and check all pdb is open state.

sqlplus sys as sysdba
alter pluggable database open all;

3. Install apex in PDB1 database

Syntex:
@apexins.sql tablespace_apex tablespace_files tablespace_temp images

Example:
alter session set container=PDB1;
@apexins.sql SYSAUX SYSAUX TEMP /i/

4. you can also change password for apex.

SQL> @apxchpwd.sql

5. Create the APEX_LISTENER and APEX_REST_PUBLIC_USER users

SQL> @apex_rest_config.sql

6. Unlock the apex user.

ALTER USER APEX_PUBLIC_USER IDENTIFIED BY Password ACCOUNT UNLOCK;

Advertisements

One thought on “Install and Remove APEX from CDB PDB databases Oracle

  1. Pingback: Upgrade with unplug and plug Pluggable Database PDB in Oracle | Smart way of Technology

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.