Installing SQLDeveloper and SQLCL on CentOS

As is becoming usual in the UK, the nation has been left somewhat confused in the aftermath of yet another “epoch-defining” vote.
In this case, we’ve just had a General Election campaign in which Brexit – Britain’s Exit from the EU – played a vanishingly small part. However, the result is now being interpreted as a judgement on the sort of Brexit that is demanded by the Great British Public.
It doesn’t help that, beyond prefixing the word “Brexit” with an adjective, there’s not much detail on the options that each term represents.
Up until now, we’ve had “Soft Brexit” and “Hard Brexit”, which could describe the future relationship with the EU but equally could be how you prefer your pillows.
Suddenly we’re getting Open Brexit and even Red-White-and-Blue Brexit.
It looks like the latest craze sweeping the nation is Brexit Bingo.
This involves drawing up a list of adjectives and ticking them off as they get used as a prefix for the word “Brexit”.
As an example, we could use the names of the Seven Dwarfs. After all, no-one wants a Dopey Brexit, ideally we’d like a Happy Brexit but realistically, we’re likely to end up with a Grumpy Brexit.

To take my mind off all of this wacky word-play, I’ve been playing around with CentOS again. What I’m going to cover here is how to install Oracle’s database development tools and persuade them to talk to a locally installed Express Edition database.

Specifically, I’ll be looking at :

  • Installing the appropriate Java Developer Kit (JDK)
  • Installing and configuring SQLDeveloper
  • Installing SQLCL

Sound like a Chocolate Brexit with sprinkles ? OK then… Continue reading

Advertisements

Automated Testing Frameworks and General Rule-Breaking in PL/SQL

If there’s one thing that 2016 has taught us is that rules (and in some cases, rulers) are made for breaking. Oh, and that it’s worth putting a fiver on when you see odds of 5000-1 on Leicester winning the League.

Having lacked the foresight to benefit from that last lesson, I’ve spent several months looking at Unit Testing frameworks for PL/SQL. In the course of this odyssey I’ve covered:

This post is a summary of what I’ve learned from this exercise, starting with the fact that many of the rules we follow about good programming practice are wrong…
Continue reading

(Almost) Everything you ever wanted to know about SQLDeveloper Unit Testing but were afraid to ask

The Political fallout from Brexit continues unabated.
In the immediate aftermath of the vote, David Cameron resigned as Prime Minister, triggering a power-struggle to succeed him.
Secret pacts, double-crosses and political “assassination” followed in short order.
It was like watching an episode of Game of Thrones although, mercifully, without the full-frontal nudity.
As for the Labour Party, they have captured the Zeitgeist…by descending into the sort of internal conflict for which the word “internecine” was invented.

Following the current trend that promises are made for breaking, this post has arrived a little bit later than advertised.
I write most of this stuff on the train to and from work, and, as they have been unusually punctual of late, my Sprint 1 velocity is somewhat lower than anticipated.
So, with apologies for my tardiness…
Continue reading

User-Defined Context Menus in SQLDeveloper

“What are those birds ?”, Deb asked as we lay drowsing by the pool. “Must be seagulls”, I replied confidently.
We may have been in Tenerife rather than Southend, but they were definitely gulls, and we were right next to the sea.
“They’re not seagulls”, Deb stated emphatically, “if they were, they’d be squawking like a bunch of Welsh women fighting over the last pair of shoes in the sale!”
I forbore to comment on this. After all, I’d had recent, painful, experience of Welsh squawking the previous evening.
We’d arrived at the hotel, just in time to watch England come second in the Rugby…to Wales.
Let me tell you squawking wasn’t the half of it.
As usual my emergency backup nationality ( born in Auckland) was no defence against the joyous derision pouring forth from my better half.

Fortunately, the Spanish aren’t big on Rugby so I’ve had a week of relative quiet on that front.
As you’ve no doubt noticed by now, I’m not much of an ornithologist, so I’ve had to find something else to help while away the long hours beside the pool.

Step forward something that I’ve been puzzling over for some time, namely, just what options are available if you want to put together a User-Defined Context Menu for SQLDeveloper.

About now, someone is bound to mention Java. However, my Java is more rusty than a 1973 Ford Cortina that’s been parked in Cardiff Bay for two weeks.

Besides, it’s perfectly possible to knock up some fairly respectable SQLDeveloper extensions using just XML and some SQL and PL/SQL. However, when it comes to Context Menus there doesn’t seem to be one single place for definitive documentation.
Therefore, after much trial and error, I’m going to take this opportunity to set out the options that I have managed to get working, together with examples.

What I’m going to cover is :

  • How to add a context menu to SQLDeveloper
  • Where on the Navigator Tree you can add it
  • How to get more than one item on a Context Menu
  • The various types of input field you can code
  • How to use Context Menus to execute SQL statements and PL/SQL blocks

Before we go any further, I think I should state that these examples were written and tested on SQLDeveloper 4.0.3 running against an Oracle XE 11g database.
Continue reading

SQLDeveloper XML Extensions and auto-navigation

It’s official, England are now the second best cricket team in the British Isles !
After all, Scotland were dispatched with ease and as for Wales…they didn’t even make it to the Cricket World Cup.
OK, technically they did because they’re part of England for the purposes of cricket…although you’d be hard pressed to get them to admit it.
Ireland are, of course, some way in front having actually managed to actually win the odd game against Test Playing Nations.
Whilst it takes quite some effort to find silver lining in the cloud of English Cricket’s latest debacle, the same cannot be said if SQLDeveloper is your Oracle Database IDE of choice … Continue reading

Installing SQLDeveloper 4 on Mint and Ubuntu – Minus the Alien

Deb recently bought a new kettle.
Now, a kettle used to simply boil water and turn itself off when it was done.
Not this thing.
It lights up as it boils and announces the fact that it’s finished with a melodious ping.
It’s got gauges and lights and switches.
I’ve decided that it’s probably a Dalek in disguise.
Like Daleks (or at least, the original Daleks), it can’t go up stairs – or if it can, it’s not advertising the fact.
Every morning, descending to the kitchen is filled with trepidation.
When will the Dalek tire of vaporizing innocent water molecules and move on to World Domination…

Doc-tor ! Doc-tor ! I feel like a ket-tle !

Doc-tor ! Doc-tor ! I feel like a ket-tle !

I wouldn’t be entirely surprised to find that, like most whizzy modern appliances, it runs on Java.
Which brings us, by a fairly circuitous route, to the topic at hand – SQLDeveloper.

Oracle’s latest incarnation of it’s IDE does indeed run on Java – the version 7 JDK to be precise.
In this post, I’ll go through the steps required on Mint to :

  • Install the Java 7 JDK
  • Install SQLDeveloper 4
  • Persuade SQLDeveloper 4 to play nicely with Java
  • Add SQLDeveloper to the Cinnamon Menu

The good news is that we can do all of this without the messy alien conversion of an rpm package to .deb format.

NOTE – I’ve followed these steps on Mint13, but they should be pretty much the same for any Debian Distro.
Anyway, without further ado…

Continue reading