Playing with Oracle REST Data Services (ORDS)

ordsI think it’s been about 18 months since I first wrote about installing ORDS 3, but since then I’ve done little more than dabble. For historical reasons, we are fronting APEX and exposing data as web services using Oracle HTTP Server and mod_plsql, which comes with its own set of pros and cons.

During the OTN Cloud Developer Day we were supposed to be using ORDS to expose our tables as web services, and my lack of ORDS experience was evident. 🙂 Since then I’ve been determined to take a proper look at ORDS. If you’ve been looking at the website homepage recently, you will know that process has started in earnest.

It’s by no means complete and the more I play with this stuff, the more rewriting I find myself doing, but I’m well on my way to understanding this stuff now.

For someone used to using mod_plsql and Data Access Descriptors (DADs), the authentication model and configuration of database connections in ORDS seems a little weird at first. I tied myself up in knots a few times before I understood it. While you’re getting to grips with this stuff, I would advise regularly flipping back to a clean VM snapshot, so you can approach things with a clean slate. I kept jumping to conclusions, only to find some of my results/issues were due to remnants of previous tests.

The official ORDS documentation is not the best. It’s like you need a decent grasp of the situation, or the documentation won’t make sense. Not that helpful when you’re coming to it fresh. 🙂 The documentation for the OAUTH and ORDS packages is pretty poor. I found myself just using trial and error to figure stuff out because stuff was just plain missing from the docs. I swear this is one of the examples.

Examples

The following example creates a .

EXECUTE ORDS.DEFINE_MODULE(

There are also things like this, which don’t really help.

Examples

The following example ...

EXECUTE ORDS.ENABLE_OBJECT((
   p_enabled      => ...,
   p_schema       => '...',
   p_object       => '...',
   p_object_type  => '...',
   p_object_slias => '...',
   p_auto_rest_auth => ...);

One of the last articles I did was the SQL Developer one, which in hindsight was a mistake. Some, but not all, of the SQL Developer screens allow you to see the package calls it is using to get the job done, which would have saved me a lot of time. Having said that, I probably learned a lot more because of the rough ride. 🙂

Like I said, I’m still learning so don’t give me a hard time if I’ve goofed up, but by all means drop me a line if you spot any mistakes and I’ll correct them. 🙂

Cheers

Tim…

PS. Jeff Smith just reminded me that SQLcl can export ORDS module definitions, so I’ve added it to the SQL Developer article here.

PPS. Added in the SODA functionality also.

Fedora 24 and Oracle 12c

fedoraFedora 24 was released a few days ago. As usual I had a play around with it and tried installing Oracle on it.

First comes the warnings, because people keep misunderstand why I do this. Do not install Oracle on Fedora before reading this!

With that out of the way, here’s what I did.

No real drama here. It was pretty much the same as Fedora 23 in that respect.

It’s kind-of hard to get excited about a new version of Fedora since I switched my desktop from Fedora to Mac. One thing that was interesting is the change to the upgrade process. In previous releases I used “fedup” to do it. Now it’s pretty much done using DNF (YUM). If you are interested, you can read about it here.

Cheers

Tim…

Video : CASE Expressions and CASE Statements

Today’s video is about CASE expressions and CASE statements.

The guest in today’s video is Scott Wesley, who is currently plugging his new book called Pro jQuery in Oracle Application Express. He will no doubt use the vast quantities of money he makes from the books sales to throw outlandishly extravagant barbecues, because that’s all they do down under. 🙂

Cheers

Tim…

EU Referendum : Oh Hell No!

If you care, you’ve probably heard the UK voted to leave the European Union (EU) yesterday. Suffice to say I’m gutted!

I’ve just deleted most of the content this post because it contained a lot of inflammatory and negative comments. I could question the motives of the leavers, but what good would that do now. IMHO this is a dark day for the UK.

For all my friends around the world, I would just like you to know I wanted to remain part of something bigger than this little island…

Cheers

Tim…

PS. If anyone has got an EU passport going spare it could come in really handy!

PPS. One of my colleagues just described what I’m going through as the 5 stages of grief. I think he is correct.

 

My Glamorous Life : What’s the point?

Last night I put out a video of my trip home.

I’ve written about the My Glamorous Life series of videos before (here). A couple of people commented recently that “nothing happens in them” and they are “quite boring”. That’s the point really. 🙂

  • The travelling sounds kind-of glamorous, but most of it is very dull. Being at different places is great. Travelling to and from them is as dull as ditch water. A series of clips of walking down corridors, standing in queues, taking shuttles, planes and taking trains really shows how much hassle it is to do even small trips.
  • Although the hotel rooms themselves are nice, it can get hard to remember where you are as they are all the same. 🙂
  • I wasn’t expecting it originally, but recording the experience actually makes the process a little more fun and gives me something to focus on.
  • There will sometimes be other things that creep into the series that are not there to prove how boring things are. Stuff like sightseeing. Remember, I like being places, I just don’t like getting to/from them. 🙂

I’ll probably continue to do these to keep me occupied while I’m travelling. 🙂

Just a couple of other things to clear up, based on questions/comments.

  • The videos of the conferences are a different thing entirely. These are about making memories of the events for myself.
  • This is not a “direction change” for the channel. It’s just something for me to do when I’m on the road. When I’m at home I will continue to do the technical stuff.

Cheers

Tim…