X

Best practices, news, tips and tricks - learn about Oracle's R Technologies for Oracle Database and Big Data

  • August 1, 2017

Oracle R Enterprise and Database Upgrades

After a database upgrade, a set of maintenance steps is required to update the new ORACLE_HOME with the entire set of ORE components.  For example, if the proper migration steps are not followed, ORE embedded R functions will return errors such as:

  ORA-28578: protocol error during callback from an external procedure

The ORE server installation consists of three components:

  1. Oracle Database schema (RQSYS) and schema-related objects.
  2. Oracle Database shared libraries for supporting Oracle R Enterprise clients.
  3. Oracle R Enterprise packages and supporting packages installed on the Operating System.

After a database upgrade, the RQSYS schema and dependent database components must be migrated to the new ORACLE_HOME. The ORE packages must also be installed to the new database location.

The instructions provided in this post are required to migrate Oracle R Enterprise 1.5.0 from an initial database installation to a new database after a database upgrade. In this case, Oracle Database was upgraded from version 12.1.0.2 to version 12.2.0.1. Oracle R Distribution and Oracle R Enterprise are not upgraded, only migrated to the new ORACLE_HOME.

The critical step for ORE maintenance after a database upgrade is to run the server installation script against the new ORACLE_HOME.  In this case, the server installation operation can be seen as a patching step, as it will try to fix what is missing.  Thus, it  creates a new path to ORACLE_HOME into ORE's metadata.  Simply run server.sh with the --no-user to transfer ORE to the new ORACLE_HOME:

$ ./server.sh --no-user

We pass the --no-user flag assuming an ORE user is alredy created in the original database. As always, back up the RQSYS and ORE user schema prior to upgrade.

After executing the ORE server script, verify the ORE configuration script is pointing to the new ORACLE_HOME and the ORE dependent libraries ore.so and librqe.so are in the new ORACLE_HOME.  Under sysdba:

SQL> select * from sys.rq_config;

NAME
--------------------------------------------------------------
VALUE
--------------------------------------------------------------
R_HOME
/usr/lib64/R

R_LIBS_USER
/u01/app/oracle/product/12.2.0.1/dbhome_1/R/library

VERSION
1.5

..
..
 

SQL> select library_name, file_spec from all_libraries where owner = 'RQSYS';

LIBRARY_NAME
-----------------------------------------------------------------
FILE_SPEC
-----------------------------------------------------------------
RQ$LIB
/u01/app/oracle/product/12.2.0.1/dbhome_1/lib/ore.so

RQELIB
/u01/app/oracle/product/12.2.0.1/dbhome_1/lib/librqe.so


Finally, test the Oracle R Enterprise installation against the upgraded ORACLE_HOME by running product demos.

 

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha
Oracle

Integrated Cloud Applications & Platform Services