4 Overview of Schema Level Configuration Override

This section describes schema level configuration override feature.

The schema level configuration override feature provides a mechanism to override configuration properties for a REST enabled schema. This allows authorized database users to customize Oracle REST Data Services (ORDS) on the fly. For example, a database user can use this mechanism to enable or disable an optional feature. Only a predefined subset of database schema level configurations can be overridden, global configurations cannot be overridden.

4.1 Features of Schema Level Configuration Override

This section lists the features of schema level configuration override.

The features of schema level configuration override are as follows:
  • Database users can override the configuration property for their schema with the ords PL/SQL API.
  • Database administrator can override the configuration property for any schema in the database with our ords_admin PL/SQL API.
  • The configuration value is cached for 10 mins. You must wait for 10 minutes before the new value becomes effective.

4.2 Overidable Configuration Properties

This section lists the overidable configuration properties.

Table 4-1 Overidable Configuration Properties

Key Descrption Scope Setting Override Value
restEnabledSql.active Specifies whether the REST-Enabled SQL service is active. REST- Enabled SQL is a prerequisite for SDW or Database Actions. SDW is disabled if the value is set to false. Schema
begin
ords.set_property(
p_key => 'restEnabledSql.active', p_value  => 'false');
commit;
end;
/
feature.sdw Specifies whether the Database Actions feature is active. Schema
begin
ords_admin.set_property(p_key => 'feature.sdw', p_value => 'false');
commit;
end;
/
debug.printDebugToScreen Specifies whether the error responses include stack trace. Schema
begin
ords_admin.set_property(p_key => 'debug.printDebugToScreen', p_value => 'true');
commit;
end;
/

4.3 Use Cases

This section shows some use cases for using the schema level configuration override feature.

Table 4-2 Use Cases of Schema Level Configuration Override feature

Scenario Solution
An Autonomous Database user wants to debug their ORDS REST Services. The database user sets the property to true for their schema as shown in the following code snippet:

ords.set_property(
   p_key => 'debug.printDebugToScreen',
   p_value  => 'true'
);
Administrator wants a REST-Enabled schema but not have a REST-Enabled SQL. The administrator sets the property to true for the relevant schema as shown in the following code snippet:
ords_admin.set_property(
   p_schema => 'REST_PRODUCTION',
   p_key => 'restEnabledSql.active',
   p_value  => 'true'
);
Administrator wants to completely disable SDW for a database. The administrator sets the property for every schema as shown in the following code snippet:
ords_admin.set_property(p_schema => 's1', p_key => 
'feature.sdw', p_value  => 'false');

ords_admin.set_property(p_schema => 's2', p_key => 
'feature.sdw', p_value  => 'false');
REST-Enabled schema wants to clear a property value that was previously set. The database user runs the following command:
ords.unset_property(p_key => 'debug.printDebugToScreen');

4.4 Scope and Visibility Matrix

This section describes how to configure the visibility and the scope for the database and schema users.

Table 4-3 Scope and Visibility Matrix

User Type Database Schema
Public
  • Only administrator can set a value that applies to all the schemas
  • USER_ORDS_PROPERTIES view shows the value, if it is set
  • Unprotected REST endpoint shows the value if it is set
  • Currently used for login message and SDW header and footer
  • Administrator and non-administrator user can set a value per schema
  • There is no default value that automatically applies to a schema
  • USER_ORDS_PROPERTIES view shows the value if it is set
  • Unprotected REST endpoint shows the value if it is set
PROTECTED
  • Only the administrator can set a value that applies for all the schemas
  • USER_ORDS_PROPERTIES view shows the value if it is set
  • Unprotected REST endpoint does not show value if it is set
  • Administrator and non-administrator user can set a value per schema
  • There is no default value that automatically applies to a schema
  • USER_ORDS_PROPERTIES view shows the value if it is set
  • Unprotected REST endpoint does not show the value if it is set
PRIVATE
  • Only administrator can set the value that applies for all the schemas
  • USER_ORDS_PROPERTIES view does not show a value if it is set
  • Unprotected REST endpoint does not show a value if it is set
  • Only the administrator can set a value per schema
  • There is no default value that automatically applies to a schema
  • USER_ORDS_PROPERTIES view does not show the value if it is set
  • Unprotected REST endpoint does not show the value if it is set