Way back in 2017, in the time before time…I talked about a new type III JDBC driver that used Oracle REST Data Services in a mid-tier to connect to a REST enabled Oracle Database.
SQLcl supports this JDBC driver.
All you need are –
- the driver (jar)
- ORDS running for your database(s)
- a REST enabled schema
- the REST Enabled SQL service enabled
In Autonomous you already have those requirements taken care of. ALL you need is to grab the driver, which you can get here.
With that JAR downloaded, copy it to your SQLcl/lib directory.
And you’re ready to connect!
Autonomous Example (admin)
All of your Oracle Autonomous Database cloud services (Data Warehouse, Transaction Processing, JSON, …) will have an ADMIN user. It will be REST enabled out-of-the-box so you can login with SQL Developer Web.
Using your ADMIN database user password, you can now login.
My Always Free Transaction Processing Service base URL is the same I would use to login to SQL Developer Web or access a RESTful Web Service.
Quite a bit. We’re no longer going to be in a transaction world where I can roll things back, or even COMMIT when I want to. We’re in the HTTPS/REST world – so think, AUTOCOMMIT.
Every request or command we make – is going to be its own transaction, even running in its own database connection. So if you’re going to use this for benchmarking, it will probably be slower than using the regular JDBC driver.
You don’t have to use ADMIN
Remember, you can use ANY REST enabled schema. And you can manage these accounts using SQL Developer Web.
REST Enabled schemas can be used to login to SQLDev Web & publish RESTful Web Services.
You don’t have to use SQLcl, either
It’s a JDBC driver. SQLcl is just our vendor provided utility that happens to support it. Theoretically you could use this in any of your Java applications wanting to connect to an Oracle Database!
Note that with SQLcl 22.4 and the latest JDBC driver, it appears that the JDBC URL has become much easier: user/[email protected]://ORDSHost…/ords/USER/ instead of user/[email protected]:oracle:orest:@https://ORDSHost…/ords/USER/
Anton and I lost a bit of time today trying to get this to work… Right up until I asked him: Did you read this ReadMe on the download page?
Thanks for all you do here, we all really appreciate it!
Yeah I hadn’t realized this either till I saw someone do it on a team Zoom call…