2 Installing SODA for REST

Complete instructions are provided for installing SODA for REST.

To install SODA for REST:

  1. Ensure that Oracle Database 12c Release 1 (12.1.0.2) with Merge Label Request (MLR) bundle patch 20885778 is installed. (Patch 20885778 obsoletes patch 20080249.)

    Obtain the patch from My Oracle Support (https://support.oracle.com). Select tab Patches & Updates. Search for the patch number, 20885778 or access it directly at this URL: https://support.oracle.com/rs?type=patch&id=20885778.

  2. Start the database.

  3. Download Oracle REST Data Services (ORDS), and extract the zip file.

    For instructions, see Oracle REST Data Services Installation, Configuration, and Development Guide.

  4. Configure ORDS.

    • If the database uses standard port 1521:

      java -jar ords.war install
      
    • If the database uses a nonstandard port (any port except 1521):

      java -jar ords.war install advanced
      

    Note:

    When prompted:

    • Do not skip the step of verifying/installing the Oracle REST Data Services schema.

    • Skip the steps that configure the PL/SQL Gateway.

    • Skip the steps that configure Application Express RESTful Services database users.

    • Decline to start the standalone server.

    For more information, see Oracle REST Data Services Installation, Configuration, and Development Guide.

  5. Connect to the schema that you want ORDS to access.

  6. Enable ORDS in the schema by executing this SQL command:

    EXEC ords.enable_schema;
    COMMIT;
    
  7. Grant role SODA_APP to the database schema (user account) schema that you enabled in step 6:

    GRANT SODA_APP TO schema;
    
  8. Only if you are in a development environment:

    1. Remove the default security constraints:

      BEGIN
        ords.delete_privilege_mapping(
          'oracle.soda.privilege.developer',
          '/soda/*');
        COMMIT;
      END;
      

      This enables anonymous access to the service and is not recommended for production systems. For more information about security, see Security.

    2. Start ORDS in standalone mode:

      java -jar ords.war standalone
      

      For more information, see Oracle REST Data Services Installation, Configuration, and Development Guide.

      Note:

      Disabling security and running ORDS in standalone mode is not recommended in production environments.

  9. In a web browser, open:

    http://localhost:8080/ords/schema/soda/latest/
    

    Where schema is the lowercase name of the schema in which you enabled ORDS in step 6. If the installation succeeded, you see:

    {"items":[],"more":false}