My Oracle Support Banner

Error ORA-20987 Exporting Applications Using APEXExport (Doc ID 2681250.1)

Last updated on MAY 15, 2023

Applies to:

Oracle Application Express (APEX) - Version 5.1.4 and later
Information in this document applies to any platform.

Symptoms

On : APEX Flow Builder

When attempting to use APEXExport to export  Applications
the following error occurs.

ERROR
-----------------------
ORA-20987: APEX - Application 100 not found logged in as database user <random_dba_user>. - Contact your application administrator.
ORA-06512: at "APEX_040200.WWV_FLOW_ERROR", line 630
ORA-06512: at "APEX_040200.WWV_FLOW_ERROR", line 911
ORA-06512: at "APEX_040200.WWV_FLOW_UTILITIES", line 9989
ORA-06512: at line 1


STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1.- Give grants to a particular db user
SQL> grant apex_administrator_role to <random_dba_user>;
SQL> alter user <random_dba_user> default role all;


2.- Use APEXExport for the Workspace
$ export JAVA_HOME=$ORACLE_HOME/jdk
$ export PATH=$ORACLE_HOME/jdk/bin:$PATH
$ export CLASSPATH=.:$ORACLE_HOME/apex/utilities:$ORACLE_HOME/jdbc/lib/ojdbc6.jar

$ java oracle.apex.APEXExport -db localhost:<PORT>:$ORACLE_SID -user <random_dba_user> -password <thePassword> -expWorkspace 2>&1 1>/<path>t/expWorkspace.log

$ cat /<path>t/expWorkspace.log
Exporting Workspace 2224804081173615:'<WORKSPACE_NAME'
  Completed at <date-time>

3.-Use APEXExport for the applications
$ java oracle.apex.APEXExport -db localhost:<PORT>:$ORACLE_SID -user <random_dba_user> -password <thePassword> -instance 2>&1 1>/<path>/instance.log
Exception in thread "main" java.sql.SQLException: ORA-20987: APEX - Application 100 not found logged in as database user <random_dba_user>. - Contact your application administrator.
ORA-06512: at "APEX_040200.WWV_FLOW_ERROR", line 630
ORA-06512: at "APEX_040200.WWV_FLOW_ERROR", line 911
ORA-06512: at "APEX_040200.WWV_FLOW_UTILITIES", line 9989
ORA-06512: at line 1


Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.