title: Oracle Database error during REST services installation: PLS-00201: identifier 'ORDS.ENABLE_SCHEMA' must be declared
body: <p>Installed on CentOS 8.</p>
  <p>Tried both</p>
  <ul>
  <li>Oracle Database Express Edition (XE)</li>
  <li>Enterprise Edition</li>
  </ul>
  <p>from here <a href="https://www.oracle.com/database/technologies/oracle-database-software-downloads.html" rel="nofollow noreferrer">https://www.oracle.com/database/technologies/oracle-database-software-downloads.html</a></p>
  <p>ords.war taken from <a href="https://www.oracle.com/database/technologies/appdev/rest-data-services-downloads.html" rel="nofollow noreferrer">https://www.oracle.com/database/technologies/appdev/rest-data-services-downloads.html</a></p>
  <p>Installation went well</p>
  <pre><code>java -jar ords.war install
  </code></pre>
  <p><a href="https://docs.oracle.com/cd/E56351_01/doc.30/e58123/rest.htm#GUID-4F666968-86CF-44EC-9784-1DFCE88F908F" rel="nofollow noreferrer">https://docs.oracle.com/cd/E56351_01/doc.30/e58123/rest.htm#GUID-4F666968-86CF-44EC-9784-1DFCE88F908F</a></p>
  <p>On the step where I must execute PL/SQL procedure I am getting</p>
  <pre><code>[oracle@oracle-ee-8gb ~]$ sqlplus / as sysdba
  
  SQL*Plus: Release 19.0.0.0.0 - Production on Wed Jul 28 11:08:59 2021
  Version 19.3.0.0.0
  
  Copyright (c) 1982, 2019, Oracle.  All rights reserved.
  
  
  Connected to:
  Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
  Version 19.3.0.0.0
  
  SQL&gt; EXEC ords.enable_schema;
  BEGIN ords.enable_schema; END;
  
        *
  ERROR at line 1:
  ORA-06550: line 1, column 7:
  PLS-00201: identifier 'ORDS.ENABLE_SCHEMA' must be declared
  ORA-06550: line 1, column 7:
  PL/SQL: Statement ignored
  
  </code></pre>
  <p>Of course, first I tried with a newly created user - exactly for SODA purposes</p>
  <pre><code>CREATE USER JSONDB IDENTIFIED BY MyNewPassword;
  GRANT CONNECT, RESOURCE TO JSONDB;
  GRANT UNLIMITED TABLESPACE TO JSONDB;
  GRANT CREATE SESSION TO JSONDB;
  
  </code></pre>
  <p>and logged as</p>
  <pre><code>sqlplus JSONDB/MyNewPassword@localhost/ORCLCDB
  </code></pre>
  <p>Also tried to do the same on official Docker images <a href="https://github.com/oracle/docker-images/tree/main/OracleDatabase" rel="nofollow noreferrer">https://github.com/oracle/docker-images/tree/main/OracleDatabase</a> - same issue.</p>
  <p>Output when I activate REST with docker</p>
  <pre><code># docker run --name ords --network dbnet -p 8888:8888 -e ORACLE_HOST=oracledb -e ORACLE_PORT=1521 -e ORACLE_SERVICE=ORCLPDB1 -e ORACLE_PWD=*** -e ORDS_PWD=*** -e CONTEXT_ROOT=ords -v /root/ords-config-data:/opt/oracle/ords/config/ords oracle/restdataservices:21.2.0
  Requires to login with administrator privileges to verify Oracle REST Data Services schema.
  
  Connecting to database user: SYS AS SYSDBA url: jdbc:oracle:thin:@//oracledb:1521/ORCLPDB1
  
  Retrieving information.
  Enter a number to select a feature to enable:
     [1] SQL Developer Web  (Enables all features)
     [2] REST Enabled SQL
     [3] Database API
     [4] REST Enabled SQL and Database API
     [5] None
  Choose [1]:
  
  2021-07-28T14:17:01.072Z INFO        HTTP and HTTP/2 cleartext listening on host: localhost port: 8888
  2021-07-28T14:17:01.173Z INFO        The document root is serving static resources located in: /opt/oracle/ords/doc_root
  2021-07-28T14:17:02.540Z INFO        No pools configured yet
  2021-07-28T14:17:04.115Z INFO        Oracle REST Data Services initialized
  Oracle REST Data Services version : 21.2.0.r1741826
  Oracle REST Data Services server info: jetty/9.4.42.v20210604
  </code></pre>
  <p>Of course, it gives 404 because I can't make it to enable REST for the schema</p>
  <pre><code># curl -i -X PUT http://localhost:8888/ords/jsondb/soda/latest/mycoll
  HTTP/1.1 404 Not Found
  Content-Type: application/problem+json
  Content-Length: 336
  
  
  {
      &quot;code&quot;: &quot;NotFound&quot;,
      &quot;title&quot;: &quot;Not Found&quot;,
      &quot;message&quot;: &quot;The request could not be mapped to any database. Check the request URL is correct, and that URL to database mappings have been correctly configured&quot;,
      &quot;type&quot;: &quot;tag:oracle.com,2020:error/NotFound&quot;,
      &quot;instance&quot;: &quot;tag:oracle.com,2020:ecid/au4ymHSYbdm27PDCJ9KjsA&quot;
  }
  </code></pre>
  <p>Docker setup:</p>
  <pre><code># docker ps
  CONTAINER ID   IMAGE                            COMMAND                  CREATED          STATUS                    PORTS                                                                                  NAMES
  f26a03a15512   oracle/restdataservices:21.2.0   &quot;/bin/sh -c $ORDS_HO…&quot;   4 minutes ago    Up 4 minutes              0.0.0.0:8888-&gt;8888/tcp, :::8888-&gt;8888/tcp                                              ords
  6928780180b4   oracle-ee:latest                 &quot;/bin/sh -c 'exec $O…&quot;   51 minutes ago   Up 51 minutes (healthy)   0.0.0.0:1521-&gt;1521/tcp, :::1521-&gt;1521/tcp, 0.0.0.0:5500-&gt;5500/tcp, :::5500-&gt;5500/tcp   oracledb
  
  </code></pre>
  <p>Of course, I tried to install JDK locally and installing manually, not only using <a href="https://github.com/oracle/docker-images/tree/main/OracleRestDataServices" rel="nofollow noreferrer">https://github.com/oracle/docker-images/tree/main/OracleRestDataServices</a></p>
  <p>There's no option to even activate REST using SQL Developer
  <a href="https://i.stack.imgur.com/Syig6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Syig6.png" alt="enter image description here" /></a></p>