How to install Oracle Linux on Raspberry Pi

Did you know that Oracle Linux is also available for ARM processors? That means that you can install Oracle Linux on an SD card for a Raspberry Pi as well. Below I will show you how to do that with a Mac.

tl;dr

  1. Download the latest Oracle Linux image for ARM
  2. Uncompress the image with xz, for example: xz -dkv rpi3-ol7.6-image-20181116.img.xz
  3. Flash the SD card with the Oracle Linux image, using dd, for example: dd if=rpi3-ol7.6-image-20181116.img of=/dev/disk2 bs=16000000
  4. Put the SD card into your Raspberry Pi and boot it up

Continue reading “How to install Oracle Linux on Raspberry Pi”

csv2db – the little CSV command line loader you always wanted

It was over the last holiday season that I wanted to take some time and play around a bit with data. The outcome was rather different than I initially expected. Rather than having worked with the data, I spent a lot of time trying to get some CSV data loaded into a database. I knew that there are great tools such as SQL Developer out there that make loading CSV data trivial, but I wanted something that I could execute via the command line, not requiring a GUI. The simple reason was that I wanted to script the loading part, rather than having to execute some manual, potentially error prone steps whenever loading some data again. Too late I found out, actually just last week, that SQLcl already had what I was after, a load command that does exactly what I wanted:

SQL> help load
LOAD
-----

Loads a comma separated value (csv) file into a table.
The first row of the file must be a header row. The columns in the header row must match the columns defined on the table.

The columns must be delimited by a comma and may optionally be enclosed in double quotes.
Lines can be terminated with standard line terminators for windows, unix or mac.
File must be encoded UTF8.

The load is processed with 50 rows per batch.
If AUTOCOMMIT is set in SQLCL, a commit is done every 10 batches.
The load is terminated if more than 50 errors are found.

LOAD [schema.]table_name[@db_link] file_name

Unfortunately back then Google didn’t offer me this insight when looking for “load csv data into oracle” and so I was stuck with the methods I already knew and that I found as too cumbersome to deal with. After all, all I wanted was a simple tool that loaded data from CSV files into a table and match the column names with the header of the file:

cat people.csv

"first_name","last_name","city"
"Gerald","Venzl","San Francisco"
"Andreas","Pumberger","New York City"

SELECT * FROM PEOPLE

FIRST_NAME  LAST_NAME  CITY
----------  ---------  -------------
Gerald      Venzl      San Francisco
Andreas     Pumberger  New York City

Continue reading “csv2db – the little CSV command line loader you always wanted”

How to download the latest GitHub repo release via command line

I just fiddled around a bit to find out how to download the latest GitHub release via the command line. Turns out that GitHub doesn’t provide a universal download URL to release binaries like it does for the release browser page itself. The latest release page can always be reached via https://github.com/ORGANIZATION/REPO/releases/latest, e.g. https://github.com/gvenzl/csv2db/releases/latest. Unfortunately that is not true for the binaries, which are available under https://github.com/ORGANIZATION/REPO/archive/RELEASE_TAG.zip and https://github.com/ORGANIZATION/REPO/archive/RELEASE_TAG.tar.gz but not under something generic like https://github.com/ORGANIZATION/REPO/archive/latest.zip and https://github.com/ORGANIZATION/REPO/archive/latest.tar.gz

Continue reading “How to download the latest GitHub repo release via command line”

How to install Python 3 on Oracle Linux

You can install Python 3 on your Oracle Linux 7 environment with three simple steps:

  1. sudo yum install -y yum-utils
  2. sudo yum-config-manager --enable *EPEL
  3. sudo yum install -y python36

As a first step, in case you don’t have it yet on your system, is to install the yum-utils package. This package includes the yum-config-manager which allows you to easily enable and disable yum repositories, amongst other tasks.

Continue reading “How to install Python 3 on Oracle Linux”

How to enable auto start/shutdown for Oracle Database 18c Express Edition on Linux

Oracle Database 18c Express Edition can be enabled for automatic startup and shutdown with the Linux operating system. This will not only allow you not to worry about starting and stopping the database but it will also ensure that the database is properly shutdown before the machine is powered off. Enabling auto startup/shutdown is done via two simple commands:

  1. systemctl daemon-reload
  2. systemctl enable oracle-xe-18c

These commands will have to be executed either via the root user or with root privileges:

[root@localhost ~]# systemctl daemon-reload
[root@localhost ~]# systemctl enable oracle-xe-18c
oracle-xe-18c.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig oracle-xe-18c on

For more information about starting and stopping Oracle Database XE, have a look at the documentation.

How to install Oracle Database 18c XE on Linux

The new version of the free Oracle Database edition, Oracle Database 18c Express Edition, just got released for Linux 64-bit. Getting started is really simple on Oracle Linux, basically a three step process of downloading the RPM file, installing it and then configuring the database. On other Red Hat  compatible Linux distributions you will also have to download the Oracle Database Preinstall RPM alongside the XE RPM file. Here is a quick guide on how to setup Oracle Database 18c XE.

tl;dr

Oracle Linux

  1. Download the RPM file from Oracle Technology Network
  2. Run “yum -y localinstall oracle-database*18c*
  3. Run “/etc/init.d/oracle-xe-18c configure

Other Red Hat compatible Linux distribution

  1. Download the RPM file from Oracle Technology Network
  2. Download the Oracle Database Preinstall RPM via “curl -o oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm
  3. Run “yum -y localinstall oracle-database*18c*
  4. Run “/etc/init.d/oracle-xe-18c configure

Continue reading “How to install Oracle Database 18c XE on Linux”

Oracle Database 18c Express Edition is Generally Available!

Oracle just released the new version of Oracle Database Express Edition (XE), a free edition of Oracle Database. This release means something special to me, as I have been closely involved in it and with the great team that brought us Oracle Database 18c XE.

Continue reading “Oracle Database 18c Express Edition is Generally Available!”

Autonomous Database: Creating an Autonomous Data Warehouse Instance

In my previous post I have shown how quick and easy it is to create an Oracle Autonomous Transaction Processing instance. In this post I want to show that the same applies for an Oracle Autonomous Data Warehouse, short ADW, instance. As a matter of fact, both services are running on the very same Oracle Autonomous Database infrastructure so you will see that the steps are the very same as with Autonomous Transaction Processing.

Just like with ATP, you can try ADW yourself today via the Oracle Free Cloud Trial.

tl;dr

To create an instance you just have to follow these three simple steps:

  1. Log into the Oracle Cloud Console and choose “Autonomous Data Warehouse” from the menu.
  2. Click “Create Autonomous Data Warehouse
  3. Specify the name, the amount of CPU and storage, the administrator password and hit “Create Autonomous Data Warehouse

Continue reading “Autonomous Database: Creating an Autonomous Data Warehouse Instance”

Autonomous Database: Creating an Autonomous Transaction Processing Instance

In this post I’m going to demonstrate how quick and easy one can create an Autonomous Transaction Processing, short ATP, instance of Oracle’s Autonomous Database Cloud Services. Oracle’s ATP launched on the 7th of August 2018 and is the general purpose flavor of the Oracle Autonomous Database. My colleague SQLMaria (also known as Maria Colgan 😉 ) has already done a great job explaining the difference between the Autonomous Transaction Processing and the Autonomous Data Warehouse services. She has also written another post on what one can expect from Oracle Autonomous Transaction Processing. I highly recommend reading both her articles first for a better understanding of the offerings.

Last but not least, you can try ATP yourself today via the Oracle Free Cloud Trial.

Now let’s get started. Provisioning an ATP service is, as said above, quick and easy.

tl;dr

To create an instance you just have to follow these three simple steps:

  1. Log into the Oracle Cloud Console and choose “Autonomous Transaction Processing” from the menu.
  2. Click “Create Autonomous Transaction Processing
  3. Specify the name, the amount of CPU and storage, the administrator password and hit “Create Autonomous Transaction Processing

Continue reading “Autonomous Database: Creating an Autonomous Transaction Processing Instance”

Autonomous Database Blog series

Oracle has just released the Oracle Autonomous Transaction Processing Cloud Service. This is the second service of the Oracle Autonomous Database Cloud Services, after Oracle Autonomous Data Warehouse Cloud Service which launched earlier this year. I have been asked to produce some collateral for the new offerings which will surface here as well as on other sites. I hope they will be interesting for you and give you some insights into the technologies, how they work, and how you can get the most out of them.

All blog posts will be marked with the tag Oracle Autonomous Database to make it easier for you to filter them.

If you are interested and want to read and hear even more on Oracle Autonomous Database you should also follow SQLMaria‘s blog: https://sqlmaria.com/category/autonomous-database/