ORDS (Oracle REST Data Services) 19.4 introduced a new feature called Oracle SQL Developer Web (SDW), a graphical user interface for querying & managing database objects. In this blog post I will explain how you can enable this feature on ORDS 19.4.
For the complete installation steps for ORDS, I refer to my previous two blog posts (here and here) or the official documentation.
The documentation for SQL Developer Web can be found here.
Step 1: activate SDW in ORDS
- during the advanced command-line installation of a new version of ORDS 19.4, select option 1 for the question “Enter a number to select a feature to enable [1] SQL Developer Web [2] REST Enabled SQL [3] None [1]:”
- for an existing installation of ORDS 19.4, add the following two lines to the defaults.xml configuration file (in my case under /home/oracle/ords194/conf/ords) and restart ORDS:
<entry key="feature.sdw">true</entry> <entry key="restEnabledSql.active">true</entry>
Note: you cannot enable SDW without enabling REST-enabled SQL.
Step 2: enable REST access for database user
To allow a database user to access SQL Developer Web, you need to execute the following script with a DBA user (in my case, I REST-enabled access for the database user DBA_MHOYS with alias “mhoys” (please note that it’s important to put the p_url_mapping_pattern in lower case):
BEGIN ords_admin.enable_schema( p_enabled => TRUE, p_schema => 'DBA_MHOYS', p_url_mapping_type => 'BASE_PATH', p_url_mapping_pattern => 'mhoys', p_auto_rest_auth => FALSE ); commit; END;
Step 3: log-in to SQL Developer Web
Use a web browser to access SQL Developer Web using the address <servername>:port/ords/sql-developer
On the first log-in screen, enter the alias that you defined in step 2 (in my case: “mhoys”):
Click on Next. On the second log-in screen, enter the schema name and password:
Victory! I’m seeing the DBA screen because I granted my user DBA_MHOYS the PDB_DBA role:
grant PDB_DBA to DBA_MHOYS;
Non-DBA users will see a different screen:
HTH
Matthias