To use OAAgraph
package functions with Oracle R Enterprise 1.5.1, follow these instructions to install and configure the PGX server in Oracle Database 12c, Release 2 (12.2).
Prerequisites
The following are prerequisites for using the OAAgraph package with Oracle R Enterprise:
Oracle Database 12c, Release 2 (12.2), Enterprise Edition, with the Oracle Spatial and Graph option installed.
For multi-tenant installations, install the Oracle Spatial and Graph in the CDB first and then the PDBs. Oracle recommends using thecatcon.pl
script first in the CDB and then in the PDBs.
The database initialization parameter MAX_STRING_SIZE
set to EXTENDED
.
Apply the PGQL Patch
PGQL (Property Graph Query Language) is a SQL-like query language for graphs. Apply Patch Number 25640325 to your Oracle Database 12.2 installation, which adds support for PGQL to the Oracle Spatial and Graph option of the database. On the My Oracle Support website, search for patch number 25640325. Download the patch, extract the contents of the zip file, and then follow the instructions in the README file.
Configure the PGX Server
After applying the patch, navigate to the $ORACLE_HOME/md/property_graph/pgx
directory and edit the file conf/server.conf
. The following is a minimal configuration:
{ "port": 7007, "enable_tls": false }
Caution:
The"enable_tls": false
line disables the Secure Sockets Layer (SSL) and Transport Layer Security (TLS). You might want to disable socket security for testing the connection; however Oracle strongly recommends that you turn on SSL/TLS for any production deployment.Configure the Environment to Use Oracle JDK 8
Make sure the java
binary on your PATH
points to a recent version of Oracle JDK 8. If you do not have the Oracle JDK 8 installed on your system, you can use the one that is bundled with the database. For example:
$ export ORACLE_HOME=/u01/app/oracle/product/12.2.0/dbhome_1 $ export JAVA_HOME=$ORACLE_HOME/jdk $ export PATH=$JAVA_HOME/bin:$PATH $ java -version java version "1.8.0_91" Java(TM) SE Runtime Environment (build 1.8.0_91-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
Verify the Spatial and Graph Option
To verify that the Spatial and Graph option is installed, do the following:
In SQL*Plus, log in to the database.
Run the create_pg
command.
exec opg_apis.create_pg('testgraph', 2, 4, 'SYSAUX', '');
If the command succeeds, then the option is installed.
If the command fails, see Oracle Big Data Spatial and Graph User's Guide and Reference for installation instructions.