Creating AWS RDS Oracle instances for personal dev projects

AWS (as in any cloud provider) for spinning something up ondemand for a quick test. Need an Oracle database? Couple of clicks and you’re done.

With the RDS options on AWS be careful of the EC2 type if you’re trying to keep costs down. For example if you leave the DB Instance Size at ‘Standard’, you only get db.m4 and db.m5 instances which are definitely not your cheapest options:

If you select ‘Burstable’, the smallest instance size you can select is a db.t3.small:

According to the Simple Monthly Calculator, at 100% 24/7 usage for a month the cost is around $57/month:

If you’re usage for development is going to be low, and/or if you can stop the instance when you’re not using it (and only pay for storage), for example at 10% usage for a month you can get the cost down to around $8:

Running Oracle 19c in a Docker container: part 2: server up and running

Following on from my first attempt to get Oracle 19c running in a Docker container and running out of disk space in my VM, I increased the disk space to 40GB and restarted the steps to build the image. It took about 1.5hrs to complete building and doing the install into the image. Although building an image is a one time activity, unless you’re making changes to the image that’s still a long time, and not something you can do on a regular basis or on demand.

Next, starting up an container from the image, using the provided docker command from the docs:

docker run --name <container name> \
-p <host port>:1521 -p <host port>:5500 \
-e ORACLE_SID=<your SID> \
-e ORACLE_PDB=<your PDB name> \
-e ORACLE_PWD=<your database passwords> \
-e ORACLE_CHARACTERSET=<your character set> \
-v [<host mount point>:]/opt/oracle/oradata \

It then takes around 30mins before the server is actually up and running. At least it gives you some percentage status outputs as it’s starting up, but again, not really practical for starting a server up ondemand or on a whim. For reference, this is on my HP DL380 G7 server with dual 2.4GHz Xeons, running in an Ubuntu 18.04 VM with 4 vCpus and 8GB RAM.

Up and running:

LSNRCTL for Linux: Version - Production on 24-MAY-2019 04:55:03
Copyright (c) 1991, 2019, Oracle. All rights reserved.
Starting /opt/oracle/product/19c/dbhome_1/bin/tnslsnr: please wait…
TNSLSNR for Linux: Version - Production
System parameter file is /opt/oracle/product/19c/dbhome_1/network/admin/listener.ora
Log messages written to /opt/oracle/diag/tnslsnr/8363ae964727/listener/alert/log.xml
Version TNSLSNR for Linux: Version - Production
Start Date 24-MAY-2019 04:55:04
Uptime 0 days 0 hr. 0 min. 1 sec
Trace Level off
Security ON: Local OS Authentication
Listener Parameter File /opt/oracle/product/19c/dbhome_1/network/admin/listener.ora
Listener Log File /opt/oracle/diag/tnslsnr/8363ae964727/listener/alert/log.xml
Listening Endpoints Summary…
The listener supports no services
The command completed successfully

Prepare for db operation
8% complete
Copying database files
31% complete
Creating and starting Oracle instance
32% complete
36% complete
40% complete
43% complete
46% complete
Completing Database Creation
51% complete
54% complete
Creating Pluggable Databases
58% complete
77% complete
Executing Post Configuration Actions
100% complete
Database creation complete. For details check the logfiles at:
Database Information:
Global Database Name:ORADB1
System Identifier(SID):ORADB1
Look at the log file "/opt/oracle/cfgtoollogs/dbca/ORADB1/ORADB1.log" for further details.
SQL*Plus: Release - Production on Fri May 24 05:17:49 2019
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Standard Edition 2 Release - Production

Created a connection in SQLDeveloper and can connect!

Running Oracle 19c in a Docker container: part 1: out of disk space on my VM

This should be filed under “Can you? Yes. Should you? Probably not”

I tried creating a Docker container running Oracle 19c from Oracle official dockerfiles, and straight out of the gate ran out of diskspace:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ERROR - There is not enough space available in the docker container. The container needs at least 18 GB, but only 14 GB are available.
Removing intermediate container b53a5e13a45c
The command '/bin/sh -c chmod ug+x $INSTALL_DIR/*.sh &&     sync &&     $INSTALL_DIR/$CHECK_SPACE_FILE &&     $INSTALL_DIR/$SETUP_LINUX_FILE &&     rm -rf $INSTALL_DIR' returned a non-zero code: 1

ERROR: Oracle Database Docker Image was NOT successfully created.
ERROR: Check the output and correct any reported problems with the docker build operation.

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            3.9G     0  3.9G   0% /dev
tmpfs           798M  1.3M  797M   1% /run
/dev/sda2        30G   12G   17G  41% /

The container needs at least 18GB? Of course it does.

Time to expand my VM disk space (using notes from when I previously had to do this here), and try again.

Oracle Linux 7: “one of the configured repositories failed”

After a fresh install of Oracle Linux 7.4 and trying to run a ‘sudo yum update’ I get:

One of the configured repositories failed (Latest Unbreakable Enterprise Linux Server 7 Server (x86_64)

Following the recommendations following the error didn’t help, and this post suggested trying a ‘sudo yum clean’, but this didn’t fix it either.

Checking if I have network connectivity, it’s seems I can’t ping or ping I’ve come across this before with RHEL/CentOS installs and forgetting to enable the network interface options during install. Checking /etc/sysconfig/network-scripts/ifcfg-* the ONBOOT property was set to no. Changing it to yes and rebooting did the trick.