This chapter explains how to install and administer Oracle R Enterprise Server. This chapter includes these topics:
Oracle R Enterprise includes several components on the server. Together these components enable an Oracle R Enterprise client to interact with Oracle R Enterprise Server.
Oracle Database Enterprise Edition
Oracle R Distribution or open source R
Oracle R Enterprise Server
The rqsys
schema, described in About the RQSYS Schema
Metadata and executable code in sys
Oracle R Enterprise Server libraries in $ORACLE_HOME/lib
(Linux and UNIX) or %ORACLE_HOME%\bin
(Windows)
Oracle R Enterprise R packages in $ORACLE_HOME/R/library
(%ORACLE_HOME%\R\library
on Windows)
The Oracle R Enterprise packages and supporting packages on the server support embedded R execution. These same packages must be installed separately on each client computer. (See About the Oracle R Enterprise Packages).
See Also:
Figure 1-2 for an illustration of the server and client components of Oracle R Enterprise.
The rqsys
schema is the system account for Oracle R Enterprise in Oracle Database. It contains metadata, PL/SQL packages, and other executable code that is used internally by Oracle R Enterprise Server.
The Oracle R Enterprise Server installation process creates rqsys
as a locked account with an expired password. The rqsys
user does not have the CREATE SESSION
privilege.
A single script called server
manages the installation and administration of Oracle R Enterprise Server. You can rerun the server
script whenever you need to install, uninstall, upgrade, or configure server-side components of Oracle R Enterprise.
The server
script supports the following operations:
Installs Oracle R Enterprise Server
Uninstalls Oracle R Enterprise Server
Upgrades Oracle R Enterprise Server and migrates data from the earlier installation
Installs the supporting packages, if they are available
Creates or configures a database user, if one does not exist
Note:
You can use the server
script to install the supporting packages and create users, or you can choose to perform these tasks separately, as described in the following sections:
The server
script supports a set of command-line arguments that direct its activities. The script can be run in interactive mode, in batch mode, or in hybrid mode. If you run the script without arguments, it installs or upgrades Oracle R Enterprise Server in interactive mode; it attempts to install the supporting packages; and it creates or configures a database user.
The command-line arguments for the server
script are described in the following table. The arguments for the script are the same for Linux, UNIX, and Windows. You can obtain a listing of the arguments with brief descriptions by executing the following on a Linux or UNIX system:
./server.sh -h
or
./server.sh --help
On a Windows system, you can obtain a listing of the arguments with brief descriptions by executing the following:
server.bat -h
or
server.bat --help
Table 4-1 SERVER Script Command-Line Arguments
Argument | Description |
---|---|
|
Never prompt. |
|
Install or upgrade Oracle R Enterprise Server. An installation or upgrade includes the following by default:
|
|
Uninstall Oracle R Enterprise Server:
|
|
Create or configure a database user for Oracle R Enterprise (the default). |
|
When uninstalling Oracle R Enterprise Server, keep the R packages and libraries under Oracle home but remove the database objects. Allows Oracle R Enterprise support to be removed from a single database instance or pluggable database (PDB) without affecting other databases in Oracle home. |
|
When uninstalling Oracle R Enterprise Server, remove the R packages and libraries under Oracle home in addition to the database objects. |
|
When combined with |
|
When combined with |
|
Grant the |
|
The |
|
The name of a pluggable database (PDB) in a multitenant container database (CDB). Multitenant architecture enables an Oracle database to function as a container database that includes zero, one, or many pluggable databases. For information about multitenant architecture, see Oracle Database Concepts. |
|
Permanent tablespace for |
|
Temporary tablespace for |
|
|
|
Permanent tablespace for Oracle R Enterprise user. |
|
Temporary tablespace for Oracle R Enterprise user. |
|
Oracle R Enterprise user password. |
|
Oracle R Enterprise database user name. |
If your Linux or UNIX or Windows system meets the requirements specified in System Requirements, then this command performs a default, first-time installation of Oracle R Enterprise Server:
For Linux or UNIX:
./server.sh
For Windows:
server.bat
As shown in Example A-1, a default, interactive installation performs the following:
Prints out information about the environment
Prompts for the password and permanent and temporary tablespaces for rqsys
Prompts whether to install the supporting packages. (Installs the supporting packages by default if they are available.)
Prompts whether to create a user account for Oracle R Enterprise. (Creates a user by default if one does not exist.) When creating a user, prompts for the permanent and temporary tablespaces.
This example shows an installation like the one in A Default Interactive Installation, but specified to run in batch mode.
For Linux or UNIX:
./server.sh -y --install --setup-user --sys ORASYSPSWD, --perm SYSAUX --temp TEMP --rqsys RQSYSPSWD --user-perm USERS --user-temp TEMP --pass RQUSERPSWD --user RQUSER
For Windows:
server.bat -y --install --setup-user --sys ORASYSPSWD, --perm SYSAUX --temp TEMP --rqsys RQSYSPSWD --user-perm USERS --user-temp TEMP --pass RQUSERPSWD --user RQUSER
The server
script automatically creates or configures a user if one does not already exist. If you supply the name of an existing user, the script configures it to support Oracle R Enterprise.
See Example 7-2.
This example shows how the server
script could be run to grant the rqadmin
role to the user created in A Default Batch Installation. The --admin
argument is only available in batch mode.
For Linux or UNIX:
./server.sh -y --setup-user --admin --sys ORASYSPSWD - -pass RQUSERPSWD --user RQUSER
For Windows:
server.bat -y --setup-user --admin --sys ORASYSPSWD - -pass RQUSERPSWD --user RQUSER
Before installing Oracle R Enterprise Server, verify your system environment, and ensure that your user ID has the proper permissions.
The operating system must conform to the requirements specified in Oracle R Enterprise System Requirements.
Oracle Database must be installed and configured as described in Installing and Configuring the Database for Oracle R Enterprise.
Note:
You can install Oracle R Enterprise Server in a pluggable database (PDB) in a multitenant environment. See Oracle Database Administrator's Guide
R must be installed as described in Installing R for Oracle R Enterprise.
Table 4-2 Environment Variable Requirements for Oracle R Enterprise Server
Platform | Environment Variable Requirement |
---|---|
all |
On Windows, you can find the value of Oracle home and the Oracle instance identifier in the Windows Registry. If more than one Oracle home or Oracle instance exist on this computer, then you can specify the required values in environment variables. See Creating and Modifying Environment Variables on Windows. |
Linux |
|
|
|
|
|
Microsoft Windows |
You can find the value of the R home directory in the Windows Registry. If more than one R home exist on this computer, then you can specify the required value in an environment variable. See Creating and Modifying Environment Variables on Windows. |
The operating system user that installs Oracle R Enterprise Server must meet the requirements described in this section.
Table 4-3 User Requirements for Oracle R Enterprise Server Installer
Platform | User Requirement |
---|---|
Linux and UNIX |
|
Microsoft Windows |
|
The Oracle R Enterprise Server installation script uses system authentication to connect to the database identified by ORACLE_HOME
and ORACLE_SID
. System authentication is based on the operating system credentials of the user instead of the database credentials.
For example, on a Linux system, the Oracle R Enterprise installation script uses this statement to start SQL*Plus without a password:
$ORACLE_HOME/bin/sqlplus / as sysdba
Membership in a special operating system group enables system authentication for Oracle Database. The operating system group is created during installation of the database, and the identity of the installer is automatically assigned to the group. The generic name for the group is OSDBA. On Linux and UNIX, the name for OSDBA is dba
. On Windows, the name for OSDBA is ora_dba
.
The user that installs Oracle R Enterprise Server must belong to OSDBA.
See Also:
"Using Operating System Authentication" in Oracle Database Administrator's Guide
"Overview of Operating System Authentication Enabled at Installation" in Oracle Database Platform Guide for Microsoft Windows
As described in "About Operating System Authentication", the Linux or UNIX user ID that runs the Oracle R Enterprise Server installation script must belong to the dba
group. Membership in the dba
group is also required for running other Oracle R Enterprise scripts on the server. On Windows, the dba
group is called ora_dba
.
To determine the group membership of your Linux or UNIX user ID, type this command:
% groups
dba othergroup
To determine the group membership of your Windows user ID:
ora_dba
.Note:
To install Oracle R Enterprise Server without needing to respond to visual prompts, use a batch mode installation such as that described in "A Default Batch Installation" and "User Configuration in Batch Mode".
To install Oracle R Enterprise Server:
Ensure that your system satisfies the requirements specified in Oracle R Enterprise Server Requirements.
Create an installation directory for the Oracle R Enterprise server components. The directory can have any name. For example:
/oreserver_install_dir
Download the Oracle R Enterprise Server installation files and supporting packages from the Oracle R Enterprise Downloads page on the Oracle Technology Network:
Accept the license agreement and download the Oracle R Enterprise Server files for your platform to your installation directory.
Accept the license agreement and download the Oracle R Enterprise Supporting packages for your platform to your installation directory.
The installation directory now contains two zip files.
ore-server-platform-arch-version.zip ore-supporting-platform-arch-version.zip
For AIX 7, the installers have the following names:
ore-server-aix7-ppc64-1.5.zip ore-client-aix7-ppc64-1.5.zip
Unzip the files.
unzip ore-server-platform-arch-version.zip unzip ore-supporting-platform-arch-version.zip
The installation directory looks like this after you unzip both files:
For Linux or UNIX:
/oreserver_install_dir ore-server-platform-arch-version.zip ore-supporting-platform-arch-version.zip server.sh /server /supporting
For Windows:
\oreserver_install_dir ore-server-platform-arch-version.zip ore-supporting-platform-arch-version.zip server.bat \server \supporting
For Linux or UNIX, run server.sh
. For Windows, run server.bat
. The script performs a default, first-time installation of Oracle R Enterprise Server, as described in A Default Interactive Installation.
For Linux or UNIX:
./server.sh
For Windows:
server.bat
See Also:
Example A-1 for an example with output.
The Oracle R Enterprise server installation script creates log files in the server subdirectory of the installation directory. Examine the log files to verify the success of the installation process.
The following commands on a Linux or UNIX system list the log files:
cd ./oreserver_install_dir/server
ls *.log
outcdb.log rqconfig.log rqdrop.log rqgrant.log rqinst.log rqpdrp.log rqproc.log rquser.log
If there are problems with the installation and you are unable to resolve them, you can request help from My Oracle Support or from the Oracle R Enterprise discussion forum.
My Oracle Support — https://support.oracle.com
Oracle R Enterprise Forum —
https://forums.oracle.com/community/developer/english/business_intelligence/data_warehousing/r
After connecting as described in Connecting Oracle R Enterprise Client to Oracle R Enterprise Server, you can test some of the basic functionality of Oracle R Enterprise with these commands:
## Is the ORE client connected to the ORE server? ## The output of this command should be TRUE. ore.is.connected() ## List the available database tables ore.ls() ## Push an R dataframe to a database table CARS <- ore.push(cars) head(CARS) ## Run embedded R ore.doEval(function() { 123 })
You can further verify the success of the installation by running the Oracle R Enterprise demo scripts. If a script runs to completion without errors, then the example is successful.
The example scripts are located in $ORACLE_HOME/R/library/ORE/demo
.
This R command provides a list of available examples:
demo(package="ORE")
These commands run two of the examples. The aggregate
script tests the use of an R function on data that is resident in database memory; the row_apply
script tests embedded R execution.
demo("aggregate", package="ORE") demo("row_apply", package="ORE")
This command exits from R.
q()
You can install Oracle R Enterprise Server in one or more pluggable databases (PDBs) within a multitenant environment. Oracle R Enterprise Server must be installed in a pluggable database, not in the root database.
If you have more than one instance of Oracle R Enterprise Server installed in a Multitenant Container Database (CDB) and you want to uninstall one instance but retain the others, you can perform a partial uninstall as described in Performing a Partial Uninstall.
See Also:
Oracle R Enterprise User's Guide for information about connecting to a pluggable database.
Oracle Database Concepts for an introduction to multitenant architecture.
Oracle Database Administrator's Guide for information about managing a multitenant environment.