4.3.2 Prepare to Use OML4R Server with R-4.4.1

Instructions for downloading and installing the OML4R Server packages built under R-4.4.1.

  1. Go to the Oracle Machine Learning for R Downloads page, accept the license agreement, and download the OML4R Server and Supporting packages built under R-4.4.1.

    Note:

    Use the same installation directory for all OML4R Server and Supporting components.
  2. Go to the installation directory and unzip the downloaded file.
    $ unzip oml4r-server-r4.4.1-linux8-x86-64-2.0.zip
    $ unzip oml4r-supporting-r4.4.1-linux8-x86-64-2.0.zip
    

    When you unzip the file, the server.sh directory is extracted along with the /server and /supporting directories.

    The content for server file appears as follows:

    $ ls 
          server  server.sh  supporting
    $ ls server
    librqe.so                                          rqd0706000.sql
    migration                                          rqd0807000.sql
    omlrdbmig.sql                                      rqd0908000.sql
    omlrdwgrd.sql                                      rqdrp.sql
    omlre21.sql                                        rqgrant.sql
    omlrrelod.sql                                      rqpdrp00.sql
    omlru21.sql                                        rqpdrp01.sql
    ORE_2.0_R_x86_64-unknown-linux-gnu.tar.gz          rqpdrp02.sql
    OREbase_2.0_R_x86_64-unknown-linux-gnu.tar.gz      rqpdrp03.sql
    OREcommon_2.0_R_x86_64-unknown-linux-gnu.tar.gz    rqpdrp04.sql
    OREdm_2.0_R_x86_64-unknown-linux-gnu.tar.gz        rqpdrp05.sql
    OREdplyr_2.0_R_x86_64-unknown-linux-gnu.tar.gz     rqpdrp06.sql
    OREeda_2.0_R_x86_64-unknown-linux-gnu.tar.gz       rqpdrp07.sql
    OREembed_2.0_R_x86_64-unknown-linux-gnu.tar.gz     rqpdrp08.sql
    OREgraphics_2.0_R_x86_64-unknown-linux-gnu.tar.gz  rqpdrp09.sql
    OREmodels_2.0_R_x86_64-unknown-linux-gnu.tar.gz    rqproc.sql
    OREpredict_2.0_R_x86_64-unknown-linux-gnu.tar.gz   rqsys.sql
    OREserver_2.0_R_x86_64-unknown-linux-gnu.tar.gz    rqu0001000.sql
    ore.so                                             rqu0102000.sql
    OREstats_2.0_R_x86_64-unknown-linux-gnu.tar.gz     rqu0203000.sql
    ORExml_2.0_R_x86_64-unknown-linux-gnu.tar.gz       rqu0304000.sql
    rqadmin.sql                                        rqu0405000.sql
    rqcfg.sql                                          rqu0506000.sql
    rqcrt.sql                                          rqu0607000.sql
    rqd0100000.sql                                     rqu0708000.sql
    rqd0201000.sql                                     rqu0809000.sql
    rqd0302000.sql                                     rquncfg.sql
    rqd0403000.sql                                     rquser.sql
    rqd0504000.sql                                     rqviw.sql
    rqd0605000.sql
    

    The content for supporting directories file appears as follows:

    $ ls supporting/
    arules_1.7-3_R_x86_64-unknown-linux-gnu.tar.gz
    assertthat_0.2.1_R_x86_64-unknown-linux-gnu.tar.gz
    Cairo_1.6-2_R_x86_64-unknown-linux-gnu.tar.gz
    cli_3.3.0_R_x86_64-unknown-linux-gnu.tar.gz
    crayon_1.5.1_R_x86_64-unknown-linux-gnu.tar.gz
    DBI_1.1.2_R_x86_64-unknown-linux-gnu.tar.gz
    dplyr_1.0.9_R_x86_64-unknown-linux-gnu.tar.gz
    ellipsis_0.3.2_R_x86_64-unknown-linux-gnu.tar.gz
    fansi_1.0.3_R_x86_64-unknown-linux-gnu.tar.gz
    generics_0.1.2_R_x86_64-unknown-linux-gnu.tar.gz
    glue_1.6.2_R_x86_64-unknown-linux-gnu.tar.gz
    lazyeval_0.2.2_R_x86_64-unknown-linux-gnu.tar.gz
    lifecycle_1.0.1_R_x86_64-unknown-linux-gnu.tar.gz
    magrittr_2.0.3_R_x86_64-unknown-linux-gnu.tar.gz
    pillar_1.8.1_R_x86_64-unknown-linux-gnu.tar.gz
    pkgconfig_2.0.3_R_x86_64-unknown-linux-gnu.tar.gz
    png_0.1-8_R_x86_64-unknown-linux-gnu.tar.gz
    purrr_0.3.4_R_x86_64-unknown-linux-gnu.tar.gz
    R6_2.5.1_R_x86_64-unknown-linux-gnu.tar.gz
    rlang_1.0.2_R_x86_64-unknown-linux-gnu.tar.gz
    ROracle_1.5-0_R_x86_64-unknown-linux-gnu.tar.gz
    statmod_1.4.36_R_x86_64-unknown-linux-gnu.tar.gz
    tibble_3.2.1_R_x86_64-unknown-linux-gnu.tar.gz
    tidyselect_1.1.2_R_x86_64-unknown-linux-gnu.tar.gz
    utf8_1.2.2_R_x86_64-unknown-linux-gnu.tar.gz
    vctrs_0.4.2_R_x86_64-unknown-linux-gnu.tar.gz
    
  3. Run the following commands to install OML4R server and supporting packages to CDB$ROOT:
    $ ./server.sh
    
    Oracle R Enterprise 2.0 Server.
     
    Copyright (c) 2012, 2022 Oracle and/or its affiliates. All rights reserved.
     
    Checking platform .................. Pass
    Checking R ......................... Pass
    Checking R libraries ............... Pass
    Checking ORACLE_HOME ............... Pass
    Checking ORACLE_SID ................ Pass
    Checking sqlplus ................... Pass
    Checking ORACLE instance ........... Pass
    Checking CDB/PDB ...................   Perform operation in a root container? [yes or no]yes
    Pass
    Checking ORE ....................... Pass
    
    Choosing RQSYS tablespaces
      PERMANENT tablespace to use for RQSYS [list]: 
    SYSAUX
    SYSTEM
    USERS
      PERMANENT tablespace to use for RQSYS [list]: SYSAUX
      TEMPORARY tablespace to use for RQSYS [list]: 
    TEMP
      TEMPORARY tablespace to use for RQSYS [list]: TEMP
     
    Current configuration
      R Version ........................ R version 4.4.1 (2024-06-14)
      R_HOME ........................... /usr/lib64/R
      R_LIBS_USER ...................... <ORACLE HOME PATH>/R/library
      ORACLE_HOME ...................... <ORACLE HOME PATH>
      ORACLE_SID ....................... orcl
      CDB .............................. CDB$ROOT
      
      Existing R Version ............... 
      Existing R_HOME .................. 
      Existing ORE data ................ None
      Existing ORE code ................ None
      Existing ORE libraries ........... 1.5.1
     
      RQSYS PERMANENT tablespace ....... SYSAUX
      RQSYS TEMPORARY tablespace ....... TEMP
     
      Operation ........................ Install/Upgrade
     
    Proceed? [yes] yes
     
    Removing R libraries ............... Pass
    Removing ORE libraries ............. Pass
    Installing R libraries ............. Pass
    Installing ORE libraries ........... Pass
    Configuring the database ............ Pass
    Removing ORE packages .............. Pass
    Installing ORE packages ............ Pass
    Removing ORE script ................ Pass
    Creating ORE script ................ Pass
    Removing migration scripts ......... Pass
    Installing migration scripts ....... Pass
    Installing supporting packages ..... Pass
     
    Done
    
  4. Run the following commands to install OML4R server and supporting packages to PDB:
    $ ./server.sh
     
    Oracle R Enterprise 2.0 Server.
     
    Copyright (c) 2012, 2022 Oracle and/or its affiliates. All rights reserved.
     
    Checking platform .................. Pass
    Checking R ......................... Pass
    Checking R libraries ............... Pass
    Checking ORACLE_HOME ............... Pass
    Checking ORACLE_SID ................ Pass
    Checking sqlplus ................... Pass
    Checking ORACLE instance ........... Pass
    Checking CDB/PDB ...................   Perform operation in a root container? [yes or no]no
      PDB to use for ORE installation [list]: 
    ORCLPDB
      PDB to use for ORE installation [list]: ORCLPDB
    Checking CDB/PDB ................... Pass
    Checking ORE ....................... Pass
    
    Choosing RQSYS tablespaces
      PERMANENT tablespace to use for RQSYS [list]: 
    EXAMPLE
    SYSAUX
    SYSTEM
    USERS
      PERMANENT tablespace to use for RQSYS [list]: SYSAUX
      TEMPORARY tablespace to use for RQSYS [list]: 
    TEMP
      TEMPORARY tablespace to use for RQSYS [list]: TEMP
     
    Current configuration
      R Version ........................ R version 4.4.1 (2024-06-14)
      R_HOME ........................... /usr/lib64/R
      R_LIBS_USER ...................... <ORACLE HOME PATH>/R/library
      ORACLE_HOME ...................... <ORACLE HOME PATH>
      ORACLE_SID ....................... orcl
      PDB .............................. ORCLPDB
     
      Existing R Version ............... R version 4.4.1 (2024-06-14)
      Existing R_HOME .................. /usr/lib64/R
      Existing ORE data ................ None
      Existing ORE code ................ None
      Existing ORE libraries ........... 2.0
      
      RQSYS PERMANENT tablespace ....... SYSAUX
      RQSYS TEMPORARY tablespace ....... TEMP
     
      Operation ........................ Install/Upgrade
     
    Proceed? [yes] yes
     
    Removing R libraries ............... Pass
    Installing R libraries ............. Pass
    Configuring the database ............ Pass
    Removing ORE script ................ Pass
    Creating ORE script ................ Pass
    Installing supporting packages ..... Pass
     
    Done
    
  5. Set up a user.

    You can create a user for OML4R using the rquser.sql script included in the server folder. The example below creates a user named rquser with the password rquser, and grants unlimited quota on the USERS tablespace.

    SQL> alter session set container=<PDB name>;
    
    Session altered.
    
    SQL> @<path to unzipped server folder>/server/rquser.sql rquser USERS TEMP unlimited 
    
    Session altered.
    
    Enter value for password: rquser
    old   1: create user &&1 identified by &password
    new   1: create user rquser identified by rquser
    old   2: default tablespace &&2
    new   2: default tablespace USERS
    old   3: temporary tablespace &&3
    new   3: temporary tablespace TEMP
    old   4: quota &&4 on &&2
    new   4: quota unlimited on USERS
    
    User created.
    
    
    Session altered.
    

    Make sure to grant the necessary privileges to the user.

    SQL> grant create session, create table, create view, create procedure, create mining model to rquser;
    
    Grant succeeded.
    

    RQADMIN role is required to create or manage OML4R scripts.

    SQL> grant rqadmin to rquser;
    
    Grant succeeded.
    

    Grant EXECUTE privileges on CTX PL/SQL package.

    GRANT EXECUTE ON CTXSYS.CTX_DDL TO rquser;