I have set in ORDS without APEX when I try to enable the schema, I get an error. What am I doing wrong?
BEGIN
ORDS.ENABLE_SCHEMA(p_enabled => TRUE,
p_schema => 'DEVUSER',
p_url_mapping_type => 'BASE_PATH',
p_url_mapping_pattern => 'devuser',
p_auto_rest_auth => FALSE);
commit;
END;
Error report -
ORA-20024: REST enablement for maintained schema disallowed : DEVUSER
ORA-06512: на "ORDS_METADATA.ORDS", line 183
ORA-06512: на "ORDS_METADATA.ORDS_INTERNAL", line 281
ORA-06512: на "ORDS_METADATA.ORDS_INTERNAL", line 688
ORA-06512: на "ORDS_METADATA.ORDS_INTERNAL", line 640
ORA-06512: на "ORDS_METADATA.ORDS_INTERNAL", line 779
ORA-06512: на "ORDS_METADATA.ORDS", line 167
ORA-06512: на line 3
The most probable cause is because the schema has been created as an Oracle Maintained user. An Oracle Maintained user cannot be enabled for ORDS based REST services.
In order to correct this problem, you must delete and recreate the target schema.
1.To drop the user:
alter session set "_ORACLE_SCRIPT"=true;
drop user DEVUSER;
alter session set "_ORACLE_SCRIPT"=false;
2.Recreate the user:
create user DEVUSER identified by <PASSWORD>;
grant create session to <SCHEMA>;
Perform any other grants needed for this user. If you have data to save, export it first ( using Datapump, for example ) and import it back again.