We put out new versions of ORDS every 3 months, and sometimes more frequently than that.

When a new version is available, example 24.2 came out last week, you’ll need to make plans to uptake that sooner vs later. Our new maintenance windows are now 18 months vs 5 years.

How to test the ORDS mid-tier components

ORDS is composed to two parts:

  1. the Java code that runs in WebLogic, Tomcat, or by itself (standalone)
  2. the database code that is stored in the ORDS_METADATA schema

When you do an ‘ords install’ – you’re either installing or upgrading the database code. When you do an ‘ords serve’ – you’re kicking off the mid tier java code.

Starting up ORDS 24.2 whilst 24.1 is running

I’m not going to update the database ORDS_METADATA bits, I’m just going to startup ORDS 24.2, at the same time as my ORDS 24.1 is running.

I have ORDS 24.1 running now on port 8181, using configuration folder /ords/new_config, so if I want to startup another ords on the same machine, I need to specify a different port.

I don’t need to touch my configuration files, I can simply specify the http(s) port directly when I invoke ords, e.g.

ords --config c:\ords\new_config serve --port 8080

I can see that ORDS happily starts up, listening on port 8080. Otherwise it would fail, as it couldn’t bind onto port 8181 as another process (ORDS 24.1!) had already ‘grabbed it.’

So at this point I have the new ORDS 24.2 java code running on my machine, connected to a database with the ORDS 24.1 PL/SQL code in it.

Alright let’s test something, like these new status codes…

Reading the 24.2 release notes, I can see this is apparently pretty important as it’s listed FIRST.

Ok, the first one is pretty easy to test.

We can pick a REST Enabled schema (HR), and LOCK the database account. So when we make a request for a resource in that schema, when ORDS_PUBLC_USER attempts to proxy connect to HR, it will fail.

Tip: use a dummy account, you don’t want to break something, real.

ALTER USER HR ACCOUNT LOCK;

We can see the new status code, ‘570,’ pops back out, exactly as expected. Cool!

Wait, why is this ‘cool?’

If you’re monitoring your applications, including ‘ORDS,’ and you have alarms or notifications firing on errors, you can setup much more intelligent rules now that there are 6 new status codes for 6 specific issues, vs one big generic code for many different types of issues.

Observability is a big deal, and now hopefully you can have a more clear picture of exactly what’s happening in your Oracle Database’s associated web tier(s).

🔖 this 🔗: All ORDS Status Codes (Docs)

Author

I'm a Distinguished Product Manager at Oracle. My mission is to help you and your company be more efficient with our database tools.

Write A Comment