ORDS 19.2 onwards have introduced new features for Oracle Rest services with APEX.
To install ORDS 19.2, follow below steps –
- download ORDS from Oracle website
- Download APEX from Oracle website
- Make sure Apex is installed on the Database (in my case apex 19.2 and Oracle DB 12.1.0.2)
- If you are building an environment for existing application (like migrating or upgrading), DO NOT IMPORT APEX APPLICATION UNTILL ORDS IS INSTALLED.
- in my example, I am going to install ORDS on weblogic/forms 12.2.1.3.0 installed on Linux 7.9 operating system
- I created a directory in middleware home as apex_ords
- copy both ords and apex binaries to this dir.
- At the time of writing this doc, Apex is – apex_19.2_en.zip and ORDS is – ords-19.4.6.142.1859.zip
- unzip both with commands –
- unzip -q -d apex192 apex_19.2_en.zip
- unzip -q -d ords ords-19.4.6.142.1859.zip
- Now before installation, you need sysdba privilleges to install ORDS and if you do not want to use sysdba privilleges then share the script name – ords_installer_privileges.sql with DBA and ask him to run it for you with the user you want to install the ORDS. This script is available in installed directory where you have extracted your ords zip file.
- I have sysdba privillege so I will use the simple approach –
- Following steps to install –
- java -jar ords.war install advanced
- this will give below options to enter –
Specify the database connection type to use.
Enter number for [1] Basic [2] TNS [3] Custom URL [1]:
Enter the name of the database server [dbname.net]:
Enter the database listen port [1521]:
Enter 1 to specify the database service name, or 2 to specify the database SID [1]:
Enter the database service name [db-service-name]:
Enter 1 if you want to verify/install Oracle REST Data Services schema or 2 to skip this step [1]:
Enter the database password for ORDS_PUBLIC_USER:
Confirm password:
Requires to login with administrator privileges to verify Oracle REST Data Services schema.
Enter the administrator username:dbadmin
Enter the database password for dbadmin:
Confirm password:
Connecting to database user: pdbadmin url: jdbc:oracle:thin:@//dbname.net:1521/db-service-name
Retrieving information.
Enter the default tablespace for ORDS_METADATA [SYSAUX]:
Enter the temporary tablespace for ORDS_METADATA [TEMP]:
Enter the default tablespace for ORDS_PUBLIC_USER [USERS]:
Enter the temporary tablespace for ORDS_PUBLIC_USER [TEMP]:
Enter 1 if you want to use PL/SQL Gateway or 2 to skip this step.
If using Oracle Application Express or migrating from mod_plsql then you must enter 1 [1]:
Enter the PL/SQL Gateway database user name [APEX_PUBLIC_USER]:
Enter the database password for APEX_PUBLIC_USER:
Confirm password:
Enter 1 to specify passwords for Application Express RESTful Services database users (APEX_LISTENER, APEX_REST_PUBLIC_USER) or 2 to skip this step [1]:
Enter the database password for APEX_LISTENER:
Confirm password:
Enter the database password for APEX_REST_PUBLIC_USER:
Confirm password:
Enter a number to select a feature to enable [1] SQL Developer Web [2] REST Enabled SQL [3] None [1]:
2021-10-08T14:06:45.227Z INFO reloaded pools: []
Installing Oracle REST Data Services version 19.4.6.r1421859
… Log file written to /home/appuser/ords_install_core_2021-10-08_160645_00374.log
… Verified database prerequisites
… Created Oracle REST Data Services proxy user
… Created Oracle REST Data Services schema
… Granted privileges to Oracle REST Data Services
… Created Oracle REST Data Services database objects
… Log file written to /home/appuser/ords_install_datamodel_2021-10-08_160719_00671.log
… Log file written to /home/appuser/ords_install_apex_2021-10-08_160732_00615.log
Completed installation for Oracle REST Data Services version 19.4.6.r1421859. Elapsed time: 00:01:00.401
Next Now run it as standalone to see if its installed successfully –
java -jar ords.war standalone
Uninstall –
If for some reason you want to unintsall and see below error –
Uninstalling Oracle REST Data Services
… Log file written to /home/appuser/ords_uninstall_core_2021-10-08_153951_00328.log
2021-10-08T13:39:52.356Z SEVERE Error executing script: ords_uninstall.sql Error: ORA-20021: ERROR: Cannot drop user ORDS_PUBLIC_USER ORA- 01940: cannot drop a user that is currently connected
ORA-06512: at line 49
ORA-06512: at line 49
This could be due to wrong or incomplete ords installation, there could be many reasons for this, like least privilleges or incomplete installation.
in this case, you need to make sure that there is no db connection from ords_public_user.
then run the uninstall script.