4.3.2 Install OML4R Server Using rqcfg.sql

Instructions for installing OML4R Server for Oracle Database 19c and later.

After installing R, install OML4R Server by running the /oml4rserver_install_dir/server/rqcfg.sql script and providing values for the arguments in the following table.

Table 4-3 Arguments to the rqcfg.sql Installation Script

Argument Description

define permtbl

Specify a permanent tablespace for the RQSYS schema.

define temptbl

Specify a temporary tablespace.

define orahome

Specify the ORACLE_HOME directory.

define rhome

Specify the R_HOME directory.

  1. At your operating system prompt, start SQL*Plus, log in to your PDB directly and run the rqcfg.sql script. To capture the log, spool the installation steps to an external file. The following example uses the PDB PDB1 and gives example values for the script arguments.
    $ sqlplus / as sysdba 
    SQL> spool install.txt 
    SQL> alter session set container=PDB1; 
    ...for your system and R version...
    SQL> define permtbl = SYSAUX
    SQL> define temptbl = TEMP
    SQL> define orahome = /u01/app/oracle/product/21.3.0.0/dbhome_1
    SQL> define rhome = /usr/lib64/R
    SQL> @/oml4rserver_install_dir/server/rqcfg.sql &permtbl &temptbl &orahome
        &rhome

    Open the install.txt file to see if any errors occurred.

  2. At your operating system prompt, create the ORE script under the ORACLE_HOME/bin directory and make it executable. You need to make sure the environment variables ORACLE_HOME and R_HOME are correctly set before running below command.
    $ cat >$ORACLE_HOME/bin/ORE <<EOF
    #!/bin/sh
    R_LIBS_USER="$ORACLE_HOME/R/library"
    export R_LIBS_USER
    $R_HOME/bin/R \$@
    EOF
    $ chmod +x $ORACLE_HOME/bin/ORE
  3. Download and install the OML4R 2.0 supporting packages for your system as described in Install the OML4R Supporting Packages