APEX_UTIL.SET_SECURITY_GROUP_ID( APEX_UTIL.FIND_SECURITY_GROUP_ID( p_workspace => 'teacher' ));

   apex_util.create_user(
   p_user_name => 'teacher',
   p_web_password => 'ChangeMe@1234',
   p_developer_privs => 'ADMIN:CREATE:DATA_LOADER:EDIT:HELP:MONITOR:SQL',
   p_email_address => '[email protected]',
   p_default_schema => 'teacher',
   p_change_password_on_first_use => 'N' );

   end;

Error report -
ORA-20001: Package variable g_security_group_id must be set.
ORA-06512: at "APEX_210100.WWV_FLOW_API", line 485
ORA-06512: at "APEX_210100.WWV_FLOW_API", line 520
ORA-06512: at "APEX_210100.WWV_FLOW_FND_USER_INT", line 1731
ORA-06512: at "APEX_210100.HTMLDB_UTIL", line enter code here  1245
ORA-06512: at line 5

does the Oracle Autonomous database allow developer to create apex workspace via the programming method? any API available? Does the OCI for Java SDK support the creation of APEX?

1

There are 1 best solutions below

8
Mónica Godoy On

To add workspaces to your APEX instance, please use the ADD_WORKSPACE procedure.

Example:

BEGIN
    APEX_INSTANCE_ADMIN.ADD_WORKSPACE (
        p_workspace_id       => 8675309,
        p_workspace          => 'MY_WORKSPACE',
        p_primary_schema     => 'SCOTT',
        p_additional_schemas => 'HR:OE' );
END;

To create APEX users on Autonomous Database, please note:

Application Express Administration Services and the Oracle Application Express development environment on Autonomous Database use Database Accounts authentication. This authentication method uses the database account user name and password to authenticate users.