How to install Oracle Database 18c XE on Windows

Get up and running with the free Oracle Database edition on Windows

Oracle Database 18c XE Successful InstallationIn my previous post, I demonstrated how you can install Oracle Database 18c XE on Linux. In this post, you will learn how you can install Oracle Database 18c XE on Windows. I am performing the installation on Windows 10 but it should remain the same for all Windows versions.

Preparing for the installation

Before you can start the installation, you will have to download the Oracle Database 18c XE Windows installer zip file. Head over to https://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html, click on “Accept License Agreement” and download the “Oracle Database 18c Express Edition for Windows x64” zip file.

Oracle 18c XE Download page

Once you have downloaded the zip file, extract it anywhere.

Oracle Database 18c XE extracted folder

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

How to install Oracle Linux on a Raspberry Pi – the easy way

Etcher flashingIn one of my past posts I showed how one can install Oracle Linux on a Raspberry Pi from a Mac via the command line. Luckily my colleague Philippe pointed out to me that things can be even much, much easier thanks to Etcher, an open source tool to flash SD cards and USB drives. Etcher is available for Mac, Linux and Windows, which should make the following steps generic.

tl;dr

  1. Download the latest Oracle Linux image for ARM
  2. Flash your SD card using Etcher
  3. Put the SD card into your Raspberry Pi and boot it up

Continue reading “How to install Oracle Linux on a Raspberry Pi – the easy way”

How to set the date and time on Linux

A quick post for how to set the date and time on Oracle Linux via the date command. This post is more for my own documentation but hey, it might help others as well. To set a date or time you have to pass on the information via a formatted string to the date command. I find calling date twice, once for the date and once for the time, the easiest. The +%D format option allows you to pass on the date as YYYY-MM-DD, e.g. 2019-08-01 for the 1st of August 2019. To set the time, I use the +%T format option to pass on the time as HH24:MI:SS, e.g. 22:31:04.

date +%D -s 2019-08-01
date +%T -s 22:31:04

Format:

date +%D -s YYYY-MM-DD
date +%T -s HH24:MI:SS

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”