Changing the Hostname and IP Address on a CentOS server and re-configuring Oracle and ORDS

I use VirtualBox quite a lot. Rather than going through the rigmarole of installing the software I need every time I want a new environment, I simply clone the VM I’ve already installed everything on.
One drawback with this approach is that, because I’ve already configured the network settings on this baseline VM, I can’t run two clones concurrently as they both have the same hostname and IP address.

What I’ll be covering here is :

The approach I’ve taken is to execute each step on the command line without the need for any interactive input. Therefore, it’s possible to take the steps described here as building blocks for a bash script (or scripts) to accomplish these tasks.
The exception is where I edit the contents of files. If you wanted to automate this, you can use something like…

sed -i s/192.168.56.220/192.168.56.225/g file_to_edit

…for the IP address and…

sed -i s/frea./rincewind./g file_to_edit

…for the hostname where file_to_edit is the file you want to change.

If you’ve found your way here in search of simply changing the hostname and/or the IP address on a CentOS7 server, then you can just skip all the database related stuff and start right here.

By the way, I’ve decided upon a new naming convention for my servers which makes use of Discworld characters. There may be the odd reference to this in what follows…

Continue reading

Advertisements

Customizing DML in an APEX Interactive Grid

It should have been quite a relaxing Cricket World Cup final. After all, it was England v New Zealand. I was guaranteed to be on the winning side.
After several hours of nerve-shredding tension had failed to separate the teams England were awarded the trophy on the basis of dumb luck hitting more boundaries. The result was born with stoicism by the Black Caps, whose philosophy would, in other countries, be known as “Elite Niceness”. By a cruel twist of fate, Ben Stokes – England’s star all-rounder and Man of the Match – was actually born in Christchurch.
Oracle APEX has it’s own star all-rounder in the shape of the Editable Interactive Grid ( see what I did there ?)
As well as presenting information in the same way as an Interactive Report, it allows users to perform DML operations on the records it displays – provided it’s based on a single table.
What we’re going to look at here is how to base an Interactive Grid (IG) on a Query rather than a table whilst retaining the ability to perform DML operations on the displayed records. To achieve this, we’ll be customizing the PL/SQL that is executed when a DML operation is invoked in the IG.
Continue reading

Oracle Express Edition – features new to 18cXE

I learned a number of things watching the recently concluded Women’s Soccer World Cup.

  • it is possible for a human body to be fouled in the penalty area without then falling over as if it has just been shot (see Lisa-Marie Utland for Norway against England for proof)
  • England have developed a happy knack of reaching the Semi-Final of every tournament they enter
  • Alex Morgan is a tea-drinker

There were some complaints that Morgan’s celebration of her goal against England were disrespectful. Personally, I though it was rather witty. Let’s face it, if she’d really want to stir up some controversy, she’d have mimed putting the milk in first.
That said, she is going to face a challenge at the Olympics next year were she may herself up against a united Great Britain team.
If you’re not up on your sporting geopolitics, Great Britain (for now at least) comprises four nations – England, Wales, Northern Ireland and Scotland.
Should Morgan need to celebrate in a similar vein, the tea will be just the start. She’ll then need to neck a pint of Brains SA (known as “Skull Attack” in Cardiff) followed by a Guinness ( there is no border in Ireland when it comes to the Black Stuff) before moving on to a Scotch single-malt chaser.

Anyone looking for an object lesson in how to up their game could do far worse than have a look at how Oracle Express Edition has evolved from 11g to 18c…

“Hey Megan, how much extra stuff did Oracle squeeze into 18c Express Edition ?”

Using the License documentation for 18c XE and that of 11g XE, I’ve compiled a list of features which are now included in Express Edition but were not in 11gXE.
This is mainly for my own benefit as I keep being surprised when I find another – previously Enterprise Edition only – feature in Express Edition.
I’ve also listed the new stuff that wasn’t previously available in any edition of Oracle 11g.

Anyhow, for anyone who might find it useful…

Continue reading

SQLcl ALIAS – because you can’t remember everything.

I want to find out which file is going to hold any trace information generated by my database session. Unfortunately, I keep forgetting the query that I need to run to find out.
Fortunately I’m using SQLcl, which includes the ALIAS command.
What follows is a quick run-through of this command including :

  • listing the aliases that are already set up in SQLcl
  • displaying the code that an alias will execute
  • creating your own alias interactively
  • deleting an alias
  • using files to manage custom aliases

Whilst I’m at it, I’ll create the alias for the code to find that pesky trace file too.
Continue reading

Great Football Managers and Oracle Unified Auditing

It’s quite a good time for English football at the moment. Not only have English clubs monopolised the finals of the two main European Club competitions this year, but Manchester City have made history by winning all three domestic competitions in the same season.
Note that this isn’t a British footballing first. Glasgow Rangers managed it way back in 1949. And whilst the European Cup ( Champions League if you must) has eluded City this season, Celtic managed that particular clean sweep in 1967.
In English football however, this particular treble is unprecedented. In fact, there are remarkably few managers who have been able to win every one of the major domestic honours in their entire career.
All of which will come in handy when looking for examples to illustrate the topic at hand, namely Oracle Unified Auditing.
With the aid of 18c Express Edition, we’ll be looking at :

  • The Oracle supplied Unified Auditing Policies that are enabled by default
  • Where to find the Audit Trail
  • How to create our own Unified Auditing Policy to monitor DML operations on specific objects

Continue reading

Easy Listening with Datapump in the SQLDeveloper DBA Module

There are a number of ways to transfer data between Oracle Databases, one of which is to use the PL/SQL Datapump API – DBMS_DATAPUMP.
If you wish to avail yourself of this utility but find the syntax a bit fiddly, you always have the option of getting SQLDeveloper to do (most of) it for you.
What we’re talking about here is how to persuade the SQLDeveloper DB module to :

  • Create and execute a custom Datapump export job
  • do most of the work creating an import of a subset of the exported data

Continue reading