Enable SODA for Your Service

Before you can use SODA APIs for your Oracle Database Exadata Express Cloud Service, you need to setup a database account with the appropriate grants and tablespace attributes.

There are a couple of ways to enable your service for SODA:

Using the Service Console to Enable SODA

To enable your service for SODA from the Service Console:

  1. Go to the service console for your service and open the Manage page of the service console. See About Manage.

    The Manage page displays.

  2. Click Document Store.

    The Create Document Store dialog appears.

  3. To specify a schema that already exists to manage your Document Collections:

    1. Select Existing Schema.

    2. Select the schema name from the drop down list.

    Note:

    You can specify the Oracle Database default schema. See Find the Default Schema Name and Set the Password.
  4. To create a new schema to manage your Document Collections:

    1. Select New Schema.

    2. Enter the schema name in the text box.

    3. For Password, enter the schema password.

    4. For Confirm Password, re-enter the schema password.

  5. To enable REST based operations on the schema, select Enable SODA for REST.

  6. Click Create Document Store.

  7. Click Done.

Enabling SODA Manually

Note:

It is recommended that you enable SODA using the Service Console rather than enabling manually. See Using the Service Console to Enable SODA.

The following settings are required for the database account:

  • Grant required roles and privileges

    In order to enable SODA for a user the service administrator must grant the SODA_APP role to that schema. SODA requires the SODA_APP role to be granted to the user, which is the schema name, that will be used to work with collections. The underlying tables used to store document collections will be stored in this schema.

    To allow SODA interactions, if not already granted, the following grants are also needed:

    • CREATE_SESSION

    • CREATE_TABLE

    • CREATE_SEQUENCE

    • CREATE_TRIGGER

    • CREATE_PROCEDURE

    • CREATE_VIEW

  • Automatic Segment Space Management (ASSM)

    The tablespace must have ASSM enabled.

  • To enable SODA for REST, execute:

    exec ords.enable_schema;
    commit;

To manually grant required roles and privileges:

  1. Connect with SQL*Plus, SQLcl or SQL Developer as the PDB_ADMIN user. See Connect SQL*Plus, Connect SQLcl, or Connect SQL Developer.

  2. In SQL*Plus, issue the following commands where schemaName is the name of the schema you are configuring for use with SODA:

    GRANT SODA_APP to schemaName;
    GRANT CREATE SESSION to schemaName;
    GRANT CREATE TABLE to schemaName;
    GRANT CREATE SEQUENCE to schemaName;
    GRANT CREATE TRIGGER to schemaName;
    GRANT CREATE PROCEDURE to schemaName;
    GRANT CREATE VIEW to schemaName;