With the first release of Oracle Graph Server 20.1 at the beginning of 2020, Oracle made the product easier to install and maintain than ever before. What was “lost” deep into your Oracle Database $ORACLE_HOME before, is now available as a stand-alone installer making it easy to install, update and remove. It follows the Oracle Linux / RHEL standards for file locations and is finally enterprise deployment friendly.

First, what is Oracle Graph Server?

The Oracle Graph Server is the Oracle product for Property Graphs. It is a package containing the in-memory analytics server for graphs as well as all the libraries required for graph applications. The in-memory analytics server is called PGX (Parallel Graph AnalytiX). It is a graph toolkit that provides a graph query language, optimized analytics algorithms, and machine learning support to extract insights hidden in the connections across datasets at high-performance and extreme scale.

A graph database is a database that uses graph structures for semantic queries with nodes, edges, and properties to represent and store data.

A graph relates the data items in the store to a collection of nodes and edges, the edges representing the relationships between the nodes. The relationships allow data in the store to be linked together directly and, in many cases, retrieved with one operation.

In the past, before Oracle Graph Server 20.1, …

While PGX started as an independent development by OracleLabs, it has been packaged with the Oracle Database from the 12.2 release: this is the first one supporting Property Graphs. It wasn’t a separate installation, all the files were packaged with the database itself. The result is that any Oracle Database from release 12.2 (and up to release 19c at the time of writing) has all the PGX libraries and files inside the $ORACLE_HOME.

Oracle Graph Server: before PGX was inside the database home
The old location of Graph Server before version 20: inside the $ORACLE_HOME of the database.

This is, in my opinion, one of the reasons why Property Graphs have been unknown for quite some time in the Oracle world. The people interested in using them (analysts) had no access to the tool because of its location. The people with access to the files (DBAs) had no interest in it (and many weren’t aware it was there). For security reasons, it was extremely complicated to provide safe access to users to PGX.

A second reason making Property Graph not easily accessible was the licensing required. Until December 2019 it required an extra license for “Spatial and Graph” which covered both the spatial and graph. If you were interested only in graphs you still had to pay for spatial as well…

In December 2019 Oracle made a change in its licensing making the Machine Learning and Spatial and Graph features of the database free to use with all on-premises and cloud releases.

A clean and simple stand-alone installer

Oracle Graph Server 20.1 is the first one being available as a stand-alone installer. It is delivered as an RPM (RPM Package Manager) which can be installed with a single command. The pros are that it does everything you need: create folders in the default places for applications and configuration files, create a user and a group for security, prepare a service to start the Graph Server at boot. The cons are mainly that you can’t decide where the files will go, or what user and group will own it.

The steps to install Oracle Graph Server are now extremely simple. Of course, you must first make sure to be using a supported environment.

Officially the documentation says you need an Oracle Linux 6 or 7 64bit or similar (like RHEL, CentOs etc.) and with Oracle JDK 8 or 11. Unofficially as long as you can install from an RPM you are good, and even Linux systems not supporting RPM could work by taking some workarounds. I’m not going to cover them here as that’s an unsupported way and I wouldn’t suggest it for anything else than testing or personal curiosity.

You must download the Graph Server RPM file from the official download page. Once you have the file it is as simple as execution a single command: yum localinstall oracle-graph-<version>.rpm
You can also install the file by using RPM itself: rpm -i oracle-graph-<version>.rpm

Oracle Graph Server: verify it's a supported environment
Make sure to use a supported environment.
Oracle Graph Server: YUM to install the RPM
The RPM file can easily be installed by using YUM.

Once the installation is done, various changes have been done to your environment. All the binaries and libraries of the Oracle Graph Server are now located in /opt/oracle/graph/, all the configuration files are located in /etc/oracle/graph/, and a new user and group have been added to your system: oraclegraph.
All the Graph Server files, configuration included, are owned by root with the group oraclegraph having the minimum required right depending on the file itself.

To allow a user to edit the configuration or freely use the Graph Server, you only have to add the new group to it: usermod -a -G oraclegraph <your user>

Oracle Graph Server: folders created and a new group added
The installer places the binaries in /opt, the configuration and /etc and secure everything by restricting access to the newly created oraclegraph group only.
Oracle Graph Server: a service is created
The installed prepared a service that can be enabled and started.

To make things easier if you want to start the Oracle Graph Server when the system boots a new service has been prepared. It isn’t enabled or started, but it is ready for it without requiring any change.
The logs are also located in a standard location: /var/log/oracle/graph

Why is an RPM package better?

This is a huge change compared to the previous location, right in the middle of the $ORACLE_HOME of your database, which was also owned by the database owner.

Not only the location is safer now, but it allows you to deploy Oracle Graph Server on a separate environment without the need to install the Oracle Database. This allows you to better split the workload between the database resources and the in-memory Graph Server, which could be needy from a memory point of view.

This new release packaging also makes it easy to update as RPM can deal with it (always good to back the configuration files as, sometimes, they need to be changed to include new pieces and that could replace your configuration in case of update).

You can find more information about Oracle Graph Server on the product page, including links to the developers’ guide.