Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-20987: APEX - Schema does not exist when invoking APEX_INSTANCE_ADMIN.ADD_SCHEMA

MarkStewartJun 28 2023 — edited Jun 28 2023

I am migrating two existing APEX applications from a development server to a new production server. Each application is in a separate workspace. Long story, but I have had troubles importing the applications. I finally got one to import into a workspace; the other one would not import into a separate workspace.

Current development setup:

Workspace WATLAS, Application ATLAS, Schema ATLASD

Workspace WREAL, Application REAL, Schema REALD

I was able to create a Workspace WSATLAS and WREAL, with the associated Schemas.

  • Imported ATLAS into WATLAS.
  • Import of REAL into WREAL failed; unable to determine reason.
  • Imported REAL into WATLAS successfully, only schema available was ATLASD.

Then tried several things, got the REALD schema defined in the

I tried

  • Using the APEX App Builder's Manage Service → Request Database Schema, both ways, new and existing:
  •    Request a new schema
    
  •    Use an existing schema
    
  • APEX_INSTANCE_ADMIN.ADD_SCHEMA

Results:

Request new schema:

You are requesting that the schema RTX_NWD be created and assigned to your workspace.
Warning
Warning: The schema you are requesting is already used by other workspace(s). The Application Express administrator may deny your request to assign this schema to your workspace.

Use an existing schema

Red pop-up:
1 error has occurred
Invalid Schema

I tried the APEX_INSTANCE_ADMIN.ADD_SCHEMA but I got the following:

exec APEX_INSTANCE_ADMIN.ADD_SCHEMA(p_workspace=>'ATLAS_ITAR', p_schema=>'RTX_NWD');
BEGIN APEX_INSTANCE_ADMIN.ADD_SCHEMA(p_workspace=>'ATLAS_ITAR', p_schema=>'RTX_NWD'); END;

*
ERROR at line 1:
ORA-20987: APEX - Schema does not exist - Contact your application administrator.
ORA-06512: at "APEX_200200.WWV_FLOW_ERROR", line 1040
ORA-06512: at "APEX_200200.WWV_FLOW_ERROR", line 1407
ORA-06512: at "APEX_200200.WWV_FLOW_INSTANCE_ADMIN", line 716
ORA-06512: at line 1

It seems that APEX knows about the schema REALD, but the relationships are not lined up somewhere.

This post has been answered by MarkStewart on Jun 29 2023
Jump to Answer
Comments
Post Details
Added on Jun 28 2023
2 comments
406 views