I am not the first one telling you the exciting news about Oracle Database 23ai - generally available as of May 2nd, 2024 - and all the innovative new features that come with it for application developers, like JSON Relational Duality. I am late to the party for this one, and a great job was done here already from the Oracle side staring with the availability of the free version, e.g., Gerald Venzl here, and externally like Oracle-Base here, and we saw the reactions on social media, e.g., Lukas Eder here. I could go on, but I don't want to bore you.
However, one thing I missed seeing highlighted not enough yet is the integration we now have with JSON Relational Duality and our Oracle Database API for Mongo DB, short Mongo API. And it does not take you more than "2 seconds" to enable this in our VirtualBox Appliance. And that's all I wanted to share with you today.
First, download and import our updated VirtualBox Appliance. If you are unfamiliar with this, then glance over Jeff Smith's comprehensive blog here. The site also has a link to download the appliance, so if you want to save one click right away, then click here to go to the download page.
Second, after downloading, importing, and starting the VirtualBox Appliance, you only need to do two things.
The reconfiguration of ORDS is a straightforward single command to change one property in ORDS to enable the Mongo API listener. Do these commands as the oracle user in the Virtualbox:
/bin/bash /home/oracle/ords/bin/ords --config /home/oracle/ords_config config set standalone.http.port 8080
/bin/bash /home/oracle/ords/bin/ords --config /home/oracle/ords_config config set mongo.enabled true
/bin/bash /home/oracle/ords/bin/ords --config /home/oracle/ords_config config set security.verifySSL false
This is an update coming from the user community forum. The initial setup of ORDS in the VB was that enabling the MongoDB API disabled listening on the standard http port. There is no conflict between running ORDS as http server *and* running the MongoDB API. Thanks to the community, this is what it's about!
ORDS starts automatically in the VirtualBox, so if you want to take advantage of the newly enabled Mongo API, you need to restart ORDS. To restart the ORDS, one way is the following command.
nohup /bin/bash /home/oracle/ords/bin/ords --config /home/oracle/ords_config serve --apex-images /home/oracle/apex_images
If you do it in the foreground or check nohup.out, you should see the following entry in the ORDS startup sequence
Add port forwarding for Mongo API to the VirtualBox.
Voilä, that was it. You are ready to use JSON Duality Views with any Mongo tool or API, either in the VirtualBox Appliance, or on the host system to use your desktop tools and development environment.
You can test whether everything worked fine right away, using the HR user as follows. This user has all the privileges set up. Assuming you have Mongo Shell installed, the following commands will connect you to HR using the Mongo API
export URI='mongodb://hr:oracle@localhost:27017/hr?authMechanism=PLAIN&authSource=$external&ssl=true&retryWrites=false&loadBalanced=true'
mongosh --tlsAllowInvalidCertificates $URI
You have access to your data both relationally and in document-style:
There's more to come in the future, which you'll have to wait for a little bit longer. But that's no reason for you not to get started today.
Here are a couple of pointers for you to get started:
Now it's up to you to get rolling. Enjoy the Oracle Database 23ai and experience the most powerful converged database on the market. And don't forget to report your feedback, questions, bugs, enhancement requests, etc on the Forums.
Hermann is a Senior Director of Product Management in the Oracle Database organization. He and his team focus on Oracle's core functionality, such as Oracle Partitioning, the Oracle Optimizer, and analytical SQL. His team also looks after semi-structured data processing, such as the relational SQL/JSON capabilities, Oracle Text, and more recently Autonomous JSON Database and the Oracle Database API for Mongo DB.
Hermann has held several positions at Oracle in Sales Consulting and Consulting, dealing with the database for quite some time
Next Post