2015-01-25

It’s winter. I can tell. First, it’s still dark. Secondly it’s bitterly cold.

Standing on the platform at Milton Keynes Central, it would appear that we now have further evidence that being late is a train driver’s prerogative.

Hiking up the season ticket price is obviously the prerogative of train operators.

The last time I spent this much money to feel this cold, I found myself standing on the top of a mountain in the South Island of New Zealand.

Unlike the “Great” British Railway, installation and configuration of an Oracle Developer Day Appliance is somewhat simpler, not to mention more reliable.

What I’m going to cover here is the installation of a Developer Day Appliance in Virtual Box as well as some settings you might want to tweak to gain access to the Appliance Database from the Host OS.

Environment, Pre-Requisites and terminology

As always, when we’re talking about virtualization, there are going to be mentions of :

The Host – the machine and Operating System on which the virtualization software (in this case VirtualBox) is running

The Guest – the system that’s running inside the Virtual Machine

These instructions should work, irrespective of the Host OS we’re using.

In my case, I’m using Mint 17 as my Host with VirtualBox 4.3.20 installed.

If you need installation instructions for VirtualBox, you can find them here for Debian based systems or here for Windows.

Alternatively, you can check the fairly comprehensive documentation on the VirtualBox website.

As for the Developer Day Image itself, I’m going to be using the Database Application Development VM.

The system requirements for this are :

2GB RAM for the Guest OS

22GB of disk space (15 GB for the Image plus 5.6 GB for the download file)

One other point to note – the latest incarnation of the Database Application Development VM has port-forwarding for port 1521 enabled by default.

This is the port for the TNS listener on the database in the Image. If you already have an Oracle instance running on your host, you’ll probably want to ensure that either, it’s not using 1521 for TNS connections, or that you disable the port forwarding on the Developer Day Image once you’ve installed it.

We’ll come back to this port-forwarding malarkey in a bit.

Getting the software

Open your browser and head over to Oracle’s Pre-Build Developer VMs page.

This is part of Oracle’s Technet site and you will need a Technet account to download the software, if you don’t already have one. However, registration is free and relatively painless.

Have a look through the available images and select the one that contains the stuff your interested in.

In my case, I want to have a play around with the 12c Database, hence the choice of the Database Application Development VM.

NOTE : this page itself may be a bit out-of-date in terms of what each VM contains, so click the Downloads and Instructions link next to the VM you may be interested in. This will give you a more accurate inventory of what software the VM contains.

Anyway, once you’ve selected your VM, simply hit the Download icon, enter your Technet credentials and – depending on your connection speed – find something else to do for a bit.

Eventually, you will have a file in your Downloads directory called :

In case you were wondering, .ova files are Open VirtualBox Format. Creating a VM with this type of file is slightly different to setting one up for a .iso …

Setting up the VM

Start the Oracle VM VirtualBox Manager on your machine and from the menu, select File/Import Appliance



Appliance to Import is the file you’ve just downloaded :



Appliance Settings are all already completed so just click Import :

…and agree to the License



You’ll then see a progress bar….

And finally, you’ll see the new VM listed in VirtualBox Manager.

Now, let’s power it up and see what happens….

Once you see the desktop, click the big armoured penguin icon…

…and wait…

your patience will be rewarded with the introduction page to the hands-on sessions included in the image :

We can check that the database is up using the copy of SQLDeveloper available in the VM ( a connection for SYSTEM is already there).

Alternatively, we could just open a Terminal and login via SQL*Plus as SYSTEM ( all of the passwords are initially set to oracle).

Actually, that’s probably a point worth reiterating :

All of the accounts that you are likely to want to access on this VM have their password set to “oracle”

Either way connecting as SYSTEM will establish that the database is up. A couple of further queries will confirm the version of the Database and of APEX…

… as well as the identity and current status of the database itself :

Some Housekeeping

Time and Date

The first thing you’ll probably notice is that the time and date is defaulted to US Pacific Standard time (I think).

If you want to change this :

Go to the Applicationsmenu and select Utilities/Settings/Time and Date,

Click the Unlock button and then set the time and date that’s appropriate for your location.

Finally, click the Lock button.

Region and Language (as well as Keyboard)

If, like me, you have trouble remembering where the US keyboard layout puts the “@” symbol (not to mention the “|”) then you’ll probably want to re-configure the Keyboard settings to your locality, along with the Region settings :

Go to Applications/System Tools/Settings/Regions & Language.

To change the region settings, Hit the “+” button under Input Sources and select the appropriate region.

To change the Keyboard itself, first highlight the current Input Source – i.e. English (US) – then click add to add the source you require.

Once this is done, Highlight the English (US) entry again and hit the “-” button to remove it.

For Region Changes to take effect, the system will need to be restarted. The keyboard change, however, should take effect immediately.

Setting the APEX user not to Expire

Given that these images were initially created for Developer Day events, it is perhaps not surprising that the expiration of the APEX_PUBLIC_USER password after 6 months was not a primary consideration.

If you want to avoid this little inconvenience, then the simplest way is to change the DEFAULT profile, to which all database accounts in the image are assigned :

NOTE: In a production environment you’d probably want to take a bit more care here. However, the Developer Day Images are purely for research.

Accessing the Database running on the VM from the Host

Accessing the Database via TNS

As mentioned previously, port-forwarding of 1521 (The default SQL*Net port) is already pre-configured.

Therefore, assuming that you have an Oracle Client installed, you can connect to the database on the Guest (whilst it’s running) from the Host as follows :

Once you have a SQL prompt, you can check to see that you now have access to Oracle in all it’s 12c splendour…

For convenience, you can always add the following entries to $ORACLE_HOME/network/admin/tnsnames.ora on your host :

Accessing APEX

We can repeat the simple port-forwarding trick to make the APEX home page available on the Host as well.

In Virtual Box Manager, with the Developer Day VM highlighted, click Settings

Select Network

Click the Advanced arrow

Click the Port Forwarding button

Now Click the Add icon on the right-hand side of the window and enter the following values for each of the fields :

Name : http

Protocol : TCP

Host Port : 8080

Guest Port : 8080

Note : once again, you’ll probably want to change these values if you have a local instance of Oracle running on the Host.

Anyway, your rules should now look like this :

You can now hit the APEX main page from a browser in the host by entering :

Note – the credentials for the ADMIN user for APEX are :

Workspace : INTERNAL

Username : ADMIN

Password : oracle

And there you have it, a quick and simple (not to mention, cheap) way to get Oracle 12c installed on your local machine. Now, if only they’d do the equivalent for getting from Milton Keynes to London.

Filed under: Oracle, VirtualBox Tagged: acessing apex, connecting to a guest database from the host, default passwords, Developer Day image, keyboard configuration, port forwarding, region settings

Show more