Contents

Title and Copyright Information

Preface

Audience

Documentation Accessibility

Related Documents

Conventions

What's New in Oracle R Enterprise?

New Features for Release 1.3

New Features for Release 1.1

1 Overview of Oracle R Enterprise Installation

Oracle R Enterprise Installation Steps

2 Prerequisites

Operating System Requirement

R Requirement

Oracle R Distribution

Install R on Windows

Install R on Linux

Install Oracle R Distribution on Linux 5

Install Oracle R Distribution on Linux 6

Install R on Red Hat Enterprise Linux 6

Using MKL

Install R on Oracle Exadata

Oracle Database Requirement

Patching Oracle Databases

3 Download Oracle R Enterprise Software

Download from Oracle Technology Network

4 Install Server

Before You Install the Server

Required Privileges

Environment Variables

Server Installation Overview

Install Server on Linux

Install Server on Oracle Exadata

Oracle Exadata Install Steps

5 Install Client

Client Packages

Oracle R Enterprise Client Supporting Packages

Oracle R Enterprise Client Packages

Load the ORE Packages

Install Client on Microsoft Windows

Install Client on Linux

6 Administrative Tasks

Troubleshoot the Installation

Oracle R Enterprise Users

Create a User

Required GRANTs

Deprecated Grants

Configure Oracle Wallet (Optional)

Start Oracle R Enterprise Client

Start the Oracle R Enterprise Client on Microsoft Windows

Start the Oracle R Enterprise Client on Linux

Connect to an Oracle Database

Validate Oracle R Enterprise Installation

Control Memory Used by Embedded R

Upgrade Oracle R Enterprise

Uninstall Oracle R Enterprise

Uninstall Oracle R Enterprise Client

Uninstall Oracle R Enterprise Server

Index

Oracle® R Enterprise

Installation and Administration Guide

Release 1.3 for Linux and Windows

E36763-04

December 2012

Oracle R Enterprise Installation and Administration Guide, Release 1.3 for Linux and Windows

E36763-04

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Primary Author:  Margaret Taft

Contributor:  The Oracle Database 12c documentation is dedicated to Mark Townsend, who was an inspiration to all who worked on this release.

This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:

U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government.

This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.

This software or hardware and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.

Preface

This book describes how to install and administer Oracle R Enterprise Release 1.3.

Audience

This document is intended for anyone responsible for installing or administering Oracle R Enterprise.Oracle R Enterprise. Installation of Oracle R Enterprise requires knowledge of R and the Oracle Database.

Documentation Accessibility

For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.

Access to Oracle Support

Oracle customers have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired.

Related Documents

These manuals describe Oracle R Enterprise:

Oracle R Enterprise Installation and Administration Guide (this manual)

Oracle R Enterprise User's Guide

Oracle R Enterprise Release Notes

For information about Oracle Database, see the Oracle Database Documentation Library 11g Release 2 (11.2).

Conventions

The following text conventions are used in this document:

Convention | Meaning
boldface | Boldface type indicates graphical user interface elements associated with an action, or terms defined in text or the glossary.
italic | Italic type indicates book titles, emphasis, or placeholder variables for which you supply particular values.
monospace | Monospace type indicates commands within a paragraph, URLs, code in examples, text that appears on the screen, or text that you enter.

What's New in Oracle R Enterprise?

This section describes new features relating to installation and administration of Oracle R Enterprise. It includes the following sections:

New Features for Release 1.1

New Features for Release 1.3

New Features for Release 1.3

Oracle R Enterprise Release 1.3 includes these new features:

Installation and administration information has moved from Oracle R Enterprise User's Guide to Oracle R Enterprise Installation and Administration Guide (this manual).

Release 1.3 requires R 2.15.1; see R Requirement

Installation of Oracle R Distribution uses http://public-yum.oracle.com/ only.

You can now Control Memory Used by Embedded R

Deprecated Grants

New Features for Release 1.1

Oracle R Enterprise Release 1.1 includes these new features:

Support for IBM AIX: The Oracle R Distribution and Oracle R Enterprise are supported on AIX 5.3 and higher.

Support for Solaris: The Oracle R Distribution and Oracle R Enterprise are supported on Solaris 10 and higher for both 64-bit SPARC and 64-bit x386 (Intel) processors.

Improved mathematics libraries in R

You can now use the improved Oracle R Distribution with support for dynamically picking up either the Intel Math Kernel Library (MKL) or the AMD Core Math Library (ACML) with Oracle R Enterprise.

Sun Performance Library for Solaris (SUNPERF), the high performance math library for Solaris 10, is supported on Solaris SPARC and Solaris x86.

Server runs on Windows

The Oracle R Enterprise server now runs on 64-bit and 32-bit Windows operating systems.

Support for Oracle Wallet

R scripts no longer need to have database authentication credentials in clear text. Oracle R Enterprise is integrated with Oracle Wallet for that purpose.

Improved installation

The installation scripts have been improved with more prerequisite checks and detailed error messages. Error messages provide specific instructions on remedial actions.

1 Overview of Oracle R Enterprise Installation

R is an open source statistical programming language and environment. For information about R, see the R Project for Statistical Computing at http://www.r-project.org.

Oracle R Enterprise is a component of the Oracle Advanced Analytics Option of Oracle Database Enterprise Edition. For detailed information about Oracle R Enterprise, including links to software downloads, go to Oracle R Enterprise at http://www.oracle.com/technetwork/database/options/advanced-analytics/r-enterprise/index.html.

For information about Oracle R Enterprise architecture and how to use Oracle R Enterprise, see the Oracle R Enterprise User's Guide.

There are several Oracle R Enterprise Installation Steps.

Oracle R Enterprise Installation Steps

Oracle R Enterprise consists of a server and one or more clients. The server and client can reside on the same system or on different systems.

You must perform these major tasks to install Oracle R Enterprise:

Verify that all of the Prerequisites are satisfied. In particular

Make sure that Operating System Requirement is satisfied.

Make sure that the correct version of Oracle database is installed on the server, as described in Oracle Database Requirement

Install R as described in R Requirement.

Install Oracle R Enterprise Server components on the server as described in Install Server.

Install Oracle R Enterprise Client components on each of the client systems, as described in Install Client.

Note:

Oracle R Enterprise client and server must be the same version. For example, Oracle R Enterprise 1.3 Client is the only client that can connect to an Oracle R Enterprise 1.3 Server.

After you install client and server, you create at least one user and start the client, as described in Administrative Tasks.

2 Prerequisites

First decide which platforms the Oracle R Enterprise server and clients will run on. For example, you might install the server on Linux and the client on Microsoft Windows.

Then install the required software before you install Oracle R Enterprise:

Operating System Requirement

R Requirement (includes installation instructions)

Oracle Database Requirement

Operating System Requirement

Verify that one of these supported operating systems is installed on both client and server. Client and server can be installed on different operating systems.

Linux x86-64, client and server

Oracle Linux Release 5 Update 6 through Oracle Linux 6

Red Hat Enterprise Linux Release 5 Update 6 through Red Hat Enterprise Linux 6

To download Oracle Linux Release 5 Update 6 Media Pack for x86_64 (64 bit), go to http://www.oracle.com/us/technologies/linux/index.html).

Microsoft Windows XP, Vista, or Windows 7 64-bit, client only

Oracle R Enterprise is also supported on

Oracle Exadata running Oracle Linux

Linux x86-64 Oracle Linux Release 5 Update 5 or higher or Red Hat Linux 5 Update 5 or higher.

R Requirement

You must install R on the server and all clients.

Note:

Oracle R Enterprise 1.3 is certified with R 2.15.1.

Oracle R Enterprise 1.0, 1.1, and 1.2 are certified with R 2.13.2.

Oracle R Distribution (for Linux and similar platforms) was created to work with Oracle R Enterprise.

For Windows, the version of R that you download from CRAN at http://www.r-project.org works with Oracle R Enterprise.

For Linux, the free Oracle R Distribution was created to work with Oracle R Enterprise.

Installation of R depends on the platform:

Install R on Windows

Install R on Linux

Install R on Oracle Exadata

Oracle R Distribution

Oracle R Distribution is Oracle's free distribution of the open source R environment for Linux.

It is recommended that you use Oracle R Distribution with Oracle R Enterprise for these reasons:

Oracle R Distribution has been enhanced for faster performance by taking advantage of hardware specific math library implementations, such as Intel's MKL libraries for high performance mathematical computations on x86 hardware.

Oracle R Distribution has been compiled with the flags that are required by Oracle R Enterprise.

Note:

If you install R from CRAN, you must ensure that R is compiled with the correct flags for Oracle R Enterprise.

Oracle offers support for users of Oracle R Distribution on Oracle Linux 5 Update 6 and higher, Oracle Linux 6, and Red Hat Enterprise Linux 5 Update 6 and higher.

For installation information, see Install R on Linux.

Install R on Windows

Follow these steps to install R 2.15.1 on Windows:

Go to http://www.r-project.org; click CRAN under the heading Download, Packages.

Select a CRAN Mirror.

Click Download R for Windows.

Click base.

Under the heading Other builds, click Previous releases in the third bullet.

Click R 2.15.1 (June, 2012) to start the download.

Note:

If you are installing a version of Oracle R Enterprise earlier than 1.3, download R 2.13.2 (September, 2011).

When the download completes, double click the executable that you downloaded, R-2.15.1-win.exe, to launch the Windows installer for R. Follow the instructions to complete the installation.

Note:

It is strongly recommended that you perform a full R installation on 64-bit Windows platforms, so that 64-bit R is installed. (The full R install for 64-bit Windows installs both 32-bit R and 64-bit R.) The Oracle R Enterprise 64-bit Windows Server requires 64-bit R.

You can quickly check that R was installed by starting R from the command line. You will see this startup message for 32-bit R:

R version 2.15.1 (2012-06-22) -- "Roasted Marshmallows"
Copyright (C) 2012 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i386-pc-mingw32/i386 (32-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
Install R on Red Hat Enterprise Linux 6

Install R on Linux

It is recommended that you install Oracle R Distribution. Installation on Red Hat Enterprise Linux 6. requires a rebuild.

This section describes how to install Oracle R Distribution on Oracle Linux or Red Hat Linux. To install Oracle R Distribution on Oracle Exadata Machine, see Install R on Oracle Exadata.

The exact steps depend on the version of Linux where you install Oracle R Distribution:

Install Oracle R Distribution on Linux 5

Install Oracle R Distribution on Linux 6

Install R on Red Hat Enterprise Linux 6

If the Intel Math Kernel Library is available on your system and you wish to use them, see Using MKL.

Install Oracle R Distribution on Linux 5

Oracle R Distribution for Linux 5 allows you to install a version of R 1.13.2 or a version of R 2.15.1 that is designed to work with Oracle R Enterprise. Oracle R Distribution supports Oracle Enterprise Linux 5 and Red Hat Enterprise Linux 5.

Go to http://public-yum.oracle.com/ and follow these steps to install R:

Become root; for example use

sudo su -

Install the yum repository as follows:

cd /etc/yum.repos.d

Use this command to get el5.repo:

wget http://public-yum.oracle.com/public-yum-el5.repo

Open a text editor on the file just downloaded public-yum-el5.repo.

Set

"enabled=1" for [el5_addons]

"enabled=1" for [el5_latest]

This step is optional.

Type the following commands in a shell to check that your yum repository is configured correctly:

sudo yum repolist

The output should look like this:

sudo yum repolist
$ sudo yum repolist
Loaded plugins: aliases, changelog, downloadonly, kabi, presto, refresh-packagekit, security, tmprepo, verify, versionlock
Loading support for kernel ABI
el5_latest                                              | 1.4 kB     00:00
el5_latest/pri                                          |  12 MB     00:07
el5_latest                                                           9713/9713
ol6_UEK_latest                                          | 1.2 kB     00:00
ol6_UEK_latest/primary                                  | 4.3 MB     00:02
ol6_UEK_latest                                                      106/106
ol6_addons                                               | 1.2 kB     00:00
ol6_addons/primary                                       |  11 kB     00:00
ol6_addons                                                            52/52
ol6_latest                                               | 1.4 kB     00:00
ol6_latest/primary                                       |  23 MB     00:14
ol6_latest                                                       18112/18112
repo id            repo name                                 status
el5_latest         Oracle Linux 6Server Latest (x86_64)           9,713
ol6_UEK_latest     Latest Unbreakable Enterprise Kernel for Oracle Linux 6Server (x86_64) 106
ol6_addons         Oracle Linux 6Server Add ons (x86_64)              52
ol6_latest          Oracle Linux 6Server Latest (x86_64)             18,112
repolist: 27,983

Make sure that both the el5_addons and ol5_u6_base repository are listed. The list of repository can be different depending on the Linux version and current user's configuration of yum.

To install R, use the following command:

yum install R.x86_64

You can quickly check that R was installed by starting R from the command line. You will see this startup message:

Oracle Distribution of R version 2.15.1  (--) -- "Roasted Marshmallows"
Copyright (C)  The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-unknown-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

R version 2.15.1 (2012-06-22) -- "Roasted Marshmallows"
Copyright (C) 2012 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i386-pc-mingw32/i386 (32-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

Install Oracle R Distribution on Linux 6

Oracle R Distribution for Linux 6 allows you to install a version of R 2.15.1 that is designed to work with Oracle R Enterprise.

Note:

Oracle R Distribution is available for Oracle Enterprise Linux 5 and 6 and Red Hat Enterprise Linux 5.

To install R on Red Hat Enterprise Linux 6, see Install R on Red Hat Enterprise Linux 6.

Go to http://public-yum.oracle.com/ and follow these steps to install R:

Become root; for example use

sudo su -

Install the yum repository as follows:

cd /etc/yum.repos.d

Use this command to get ol6.repo:

wget http://public-yum.oracle.com/public-yum-ol6.repo

Open a text editor on the file just downloaded, public-yum-ol6.repo.

Set

"enabled=1" for [ol6_addons]

"enabled=1" for [ol6_latest]

This step is optional.

Type the following commands in a shell to check that your yum repository is configured correctly:

sudo yum repolist
$ sudo yum repolist
Loaded plugins: aliases, changelog, downloadonly, kabi, presto, refresh-packagekit, security, tmprepo, verify, versionlock
Loading support for kernel ABI
el5_latest                                              | 1.4 kB     00:00
el5_latest/pri                                          |  12 MB     00:07
el5_latest                                                           9713/9713
ol6_UEK_latest                                          | 1.2 kB     00:00
ol6_UEK_latest/primary                                  | 4.3 MB     00:02
ol6_UEK_latest                                                      106/106
ol6_addons                                               | 1.2 kB     00:00
ol6_addons/primary                                       |  11 kB     00:00
ol6_addons                                                            52/52
ol6_latest                                               | 1.4 kB     00:00
ol6_latest/primary                                       |  23 MB     00:14
ol6_latest                                                       18112/18112
repo id            repo name                                 status
el5_latest         Oracle Linux 6Server Latest (x86_64)           9,713
ol6_UEK_latest     Latest Unbreakable Enterprise Kernel for Oracle Linux 6Server (x86_64) 106
ol6_addons         Oracle Linux 6Server Add ons (x86_64)              52
ol6_latest          Oracle Linux 6Server Latest (x86_64)             18,112
repolist: 27,983

The list of repository can be different depending on the Linux version and current user's configuration of yum.

To install R, use the following command:

yum install R.x86_64

You can quickly check that R was installed by starting R from the command line.

Oracle Distribution of R version 2.15.1  (--) -- "Roasted Marshmallows"
Copyright (C)  The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-unknown-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

Install R on Red Hat Enterprise Linux 6

You must rebuild Linux 6 Oracle R Distribution RPMs from the source RPMs on Red Hat 6 before you install R.

Follow these steps to rebuild the RPMs on Red Hat Enterprise Linux 6:

Create an RPM build directory structure:

mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}

Set up RPM tools to use your own build tree (to avoid root login):

echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros

Download the R 2.15.1 SRPM (*.src.rpm) from Oracle's public yum at http://public-yum.oracle.com/repo/OracleLinux/OL6/addons/x86_64/R-2.15.1-1.el6.src.rpm.

Save them to the rpmbuld/SRPMS directory.

Rebuild for Red Hat Enterprise Linux 6 using rpmbuild. For example,

rpmbuild --rebuild~/SRPMS/R-2.15.1-1.el6.src.rpm

Note that if any dependencies are missing you will need to yum install them as root.

The binary RPMs will be built and saved under ~/rpmbuild/RPMS.

Login as root: and run the commands to install. You use commands of the form

rpm -i <path to rpmbuild/RPMS/<R-core RPM >

For example,

rpm -i /refresh/home/rpmbuild/RPMS/x86_64/R-core-2.15.1-1.el6.x86_64.rpm

You can quickly check that R was installed by starting R from the command line. R starts up with:

[oracle@celvpint1001 ~]$ R

Oracle Distribution of R version 2.15.1  (--) -- "Roasted Marshmallows"
Copyright (C)  The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-unknown-linux-gnu (64-bit)

Using MKL

The Intel Math Kernel Library (MKL) includes highly vectorized and threaded Linear Algebra, Fast Fourier Transforms (FFT), Vector Math and Statistics functions. Oracle R Distribution includes support that dynamically picks up the Intel Math Kernel Library (MKL) if MKL is installed on your system.

Follow these steps to use MKL with Oracle R Distribution:

Add libmkl_rt.so, $R_HOME/lib, and $ORACLE_HOME/lib to the LD_LIBRARY_PATH system environment variable.

Start R and execute this Oracle R Distribution function Sys.BlasLapack():

R> Sys.BlasLapack()
     $vendor
     [1] "Intel Math Kernel Library (Intel MKL)"
     $nthreads
     [1] -1

The vendor value returned indicates the presence of MKL instead of R's internal BLAS.

In order to get the speedup provided by MKL, you must set the MKL_THREADING_LAYER environment variable to GNU before you invoke Oracle R Distribution on your system. In the Bash shell, set the variable as follows:

export MKL_THREADING_LAYER=GNU

Install R on Oracle Exadata

Oracle R Distribution is recommend for Oracle Exadata. You must install R on every Exadata Compute Server, as described in Install R on Linux.

Using http://public-yum.oracle.com/ is the recommended way to install R on Oracle Exadata.

Oracle Database Requirement

Oracle R Enterprise requires Oracle 11.2 Enterprise Edition; the Oracle Database can be installed on Oracle Linux or Red Hat Linux.

The 64-bit version of the database must be installed for Linux or Red Hat Linux. You can check that the proper database is installed by examining $ORACLE_HOME/bin/oracle.

In order for certain Oracle R Enterprise functionality to work properly, the Oracle Database must include the patch that fixes bug number 11678127; Oracle 11.2.0.3 or later includes this fix.

If you cannot upgrade to Oracle 11.2.0.3, you can use Oracle 11.2.0.1 or 11.2.0.2 if you install the patch that fixes bug number 11678127. For basic information about patching an Oracle Database, see Patching Oracle Databases.

Use one of these solutions to install the required patch on the system where you install the Oracle R Enterprise server:

For Oracle 11.2.0.1.0: on Linux: Patch number 12598677 fixes bug number 11678127

For Oracle 11.2.0.2.0 on Linux: Patch number 12976544 fixes bug number 11678127

Patching Oracle Databases

Patches for Oracle products are downloaded from My Oracle Support (http://support.oracle.com). Access to My Oracle Support requires a CSI (Customer Support ID).

Note:

A given patch may not be available on all supported platforms at any given time. Check My Oracle Support to see if a patch is available for your platform.

After you download patches, install them using OPatch, described in Oracle Universal Installer and OPatch User's Guide 11g Release 2 (11.2) for Windows and UNIX.

Before you apply a patch, review README.txt. The patch may require other patches. Also make sure that the latest version of OPatch is installed.

3 Download Oracle R Enterprise Software

You can obtain the archives that contain Oracle R Enterprise software as follows:

Download from Oracle Technology Network

Download from Oracle Technology Network

Oracle R Enterprise software for both client and server is available for download from Oracle Technology Network. You must have a free Oracle Technology Network account in order to download software. See http://www.oracle.com/technetwork/community/join/why-join/index.html for information.

To download software for Oracle R Enterprise, go to Oracle R Enterprise Downloads at http://www.oracle.com/technetwork/database/options/advanced-analytics/r-enterprise/ore-downloads-1502823.html.

Before you can download any files, you must accept the OTN License Agreement.

You must download the client or server software plus the client supporting packages; for example to install the client on Microsoft Windows, you must download Oracle R Enterprise Client Packages for Windows Platform and Oracle R Enterprise Client Supporting Packages for Windows Platform.

To download the latest software, click the links for your platform for your platform and the release of Oracle R Enterprise that you are installing. These are the downloads for Oracle R Enterprise 1.3 on Windows and Linux:

Microsoft Windows:

Oracle R Enterprise Client Packages for Windows Platform (includes client packages for both 32-bit and 64-bit architectures)

Oracle R Enterprise Client Supporting Packages for Windows Platform (includes client supporting packages for both 32-bit and 64-bit architectures)

Linux 64-bit:

Oracle R Enterprise Client Packages for Linux 64-bit Platform

Oracle R Enterprise Client Supporting Packages for Linux 64-bit Platform

Oracle R Enterprise Server Install for Oracle Database on Linux 64-bit

Click the link for the software that you require. Sign on using your Oracle Technology Network login.

An archive is downloaded for all platforms. Save the archive on your local system and unzip it.

4 Install Server

This chapter describes how to install the Oracle R Enterprise server on Linux. You can also install the server on Oracle Exadata, as described in Install Server on Oracle Exadata.

Install the same release of Oracle R Enterprise for both client and server.

Install the server as follows:

Make sure that the Prerequisites for Linux are satisfied.

You can install the server on Linux only.

Make sure that Oracle Database Requirement is installed on the system where you plan to install the server. Make sure that any required patches are installed properly.

Install R, as described in R Requirement.

Install R before you install the server.

Before you start the server installation, check that you can run R. This usually means that the R executable is in your PATH environment variable.

Make sure that the Required Privileges are satisfied. If you do not run the install script from an appropriate account, the script will fail.

Set the Environment Variables ORACLE_HOME, ORACLE_SID, LD_LIBRARY_PATH, and PATH.

Read Server Installation Overview or go to Install Server on Linux to begin the install.

Follow the directions in Install Server on Linux or Install Server on Oracle Exadata to install the server.

Install the Oracle R Enterprise Client Supporting Packages.

Before you can run Oracle R Enterprise, you must create at least one user, as described in Oracle R Enterprise Users. Then you can Validate Oracle R Enterprise Installation.

Before You Install the Server

The install scripts for the Oracle R Enterprise server require:

You must run the script from an account that has Required Privileges.

You must properly set certain Environment Variables.

This section also contains the Server Installation Overview that explains how the installation script works.

Required Privileges

Important: Before you start installation, make sure that:

You have DBA privileges, that is, you can run as oracle:

On Linux, you must be a member of the DBA group; the user oracle satisfies this requirement. Note that root is not usually a member of the DBA group.

If necessary, users can be added to the DBA group with

useradd -G dba <username>

In any case, make sure that you are logged in to an account in which you can run sqlplus / as sysdba before you run the install script.

You have write privileges at the operating system level to the directory $ORACLE_HOME/lib; the user oracle satisfies this requirement

In summary, for all platforms, you can use the account that you used to install the database to install the server. Check that you can run R from this account.

Environment Variables

Make sure that these environment variables exist and are defined properly:

Add $ORACLE_HOME/lib to LD_LIBRARY_PATH

Add $ORACLE_HOME/bin to PATH

Define the variable $ORACLE_SID; it contains the SID for the database where you install Oracle R Enterprise.

Server Installation Overview

The installation scripts for the server works as follows:

Before the Oracle R Enterprise server install starts, it checks for the presence of an R installation.

Once the script verifies that R is known to be installed and its location known via PATH, the install checks for the presence of these libraries in $R_HOME/lib/. In particular, the script checks for

$R_HOME/lib/libR.so

$R_HOME/lib/libRblas.so

$R_HOME/lib/libRlapack.so

Next the script checks the location of the database installation by checking for the presence of environment variable ORACLE_HOME and ORACLE_SID.

If ORACLE_HOME is set, the install expects that the $ORACLE_HOME/lib directory is present.

Before you start the script check that ORACLE_HOME and ORACLE_SID are present and properly set.

Next the script checks the Oracle database instance information. The check includes looking for environment variable ORACLE_SID and then connecting to the instance by starting

sqlplus  /as sysdba

Logging into the database as sysdba is critical for the install script to proceed.

If sqlplus fails to connect to the database instance, the install process aborts.

Before you start the installation script, check that you can connect to the database using this sqlplus command.

If Oracle R Enterprise has been installed on the database, that is, if you installed release 1.0, 1.1, or 1.2, then the installer expects to find a user name RQSYS in dba_users table and the Oracle R Enterprise version number details in SYS.RQ_CONFIG. The installer uses this information subsequently to install the correct SQL packages.

The script prompts you to optionally enter the names of permanent and temporary table spaces for the RQSYS schema; the default schemas are SYSAUX and TEMP.

At this point, the install script has determined it has found the prerequisites satisfactory and proceeds to do the actual installation.

The install script now attempts to copy libraries to $ORACLE_HOME/lib.

If $ORACLE_HOME/lib is not writable then the installer errors out.

The install script now installs the RQSYS schema. Installing the schema requires logging into the database as SYSDBA.

Finally, the ORE packages are installed under $ORACLE_HOME/R/library.

Install Server on Linux

These directions describe how to install Oracle R Enterprise on Oracle Linux or Red Hat Linux on the Linux x86-64 platform. To install the server on Oracle Exadata, see Install Server on Oracle Exadata.

Review Before You Install the Server before you run the installation script. Make sure that all environment variables are properly set and that all required directories are present.

Follow these steps to install the server:

Install a Database that satisfies Oracle Database Requirement. Make sure that any required patches are installed properly. If the Database is already installed, make sure that it satisfies the requirements.

Install R, as described in R Requirement.

Make sure that these environment variables exist and are defined properly:

Add $ORACLE_HOME/lib to LD_LIBRARY_PATH

Add $ORACLE_HOME/bin to PATH

Define the variable $ORACLE_SID; it contains the SID for the database where you install ORE.

You must have DBA privileges that is, you can run as oracle. The install scripts run SQL*Plus / as sysdba and write to ORACLE_HOME.

Download ore-server-linux-x86-64-1.3.zip as described in Download Oracle R Enterprise Software. If you install the server on Oracle Database 11g Release 2 (11.2), you must download the archive.

Unzip ore-server-linux-x86-64-1.3.zip into an empty directory on your local system. This creates a directory containing library files, SQL scripts, and the install shell script install.sh.

Run install.sh. to create objects in the SYS and RQSYS schemas.

This script copies ORE packages to $ORACLE_HOME/R/library and R_LIBS_USER.

The script executes rqinst.sqlwith SYSAUX and TEMP as the default and temporary tablespaces.

The script creates all SQL objects required by Oracle R Enterprise in the RQSYS user schema. The RQSYS schema is created as a locked account with expired password and no connect privileges.

Install the Oracle R Enterprise Client Supporting Packages ore-supporting-linux-x86-64-1.3.zip as follows:

Unzip the download. Go to the directory where you unzipped the archive and run these commands:

ORE CMD INSTALL DBI_0.2-5_R_x86_64-unknown-linux-gnu.tar.gz
ORE CMD INSTALL ROracle_1.1-7_R_x86_64-unknown-linux-gnu.tar.gz
ORE CMD INSTALL png_0.1-4_R_x86_64-unknown-linux-gnu.tar.gz

After installation completes, create at least one user, as described in Oracle R Enterprise Users. It may be necessary to make certain GRANTs to users who perform certain tasks; see Required GRANTs.

You may wish to use Oracle Wallet, especially if you plan to run scripts in light-out mode. For information, see Configure Oracle Wallet (Optional)

Validate Oracle R Enterprise Installation.

Install Server on Oracle Exadata

The Oracle Exadata Database Machine is a complete preoptimized and preconfigured package of software, servers, and storage that provides an optimal solution for all database workloads. It combines Oracle Exadata Storage Server Software, Oracle Database software, and Sun hardware components to deliver extreme performance in a highly available and highly secure environment. Along with Oracle's unique clustering and workload management capabilities, the Database Machine is also well-suited for consolidating multiple databases onto a single grid.

These directions describe how to install Oracle R Enterprise on Oracle Exadata.

Oracle Exadata Install Steps

An Oracle Database Machine consists of several compute nodes, along with storage and other facilities. Oracle R Enterprise server must be installed on every compute node), that is on every server where the database is installed.

Follow these steps to install Oracle R Enterprise server on Oracle Exadata:

Install the following software on each compute node:

Oracle R Distribution, as described in Install R on Linux

Oracle R Enterprise Server, as described in Install Server on Linux; make sure that you follow all steps, including installation of the Oracle R Enterprise Client Supporting packages

Each compute node has it's own ORACLE_HOME, ORACLE_SID, and PATH environment variable.

You must install the following software on each Oracle R Enterprise client, as described in Install Client:

Oracle R Distribution

Oracle R Enterprise Client packages

Oracle R Enterprise Client supporting packages

The client systems must be able to communicate with the server The clients can run on Microsoft Windows or on Linux.

5 Install Client

Typically, you install the server first and then ask your clients (database-users) to install client software and connect to the database.

Install the same release of Oracle R Enterprise for both client and server.

Installation of Oracle R Enterprise consists of installing two sets of Client Packages

Installation steps depend on the platform:

Install Client on Microsoft Windows

Install Client on Linux

Client Packages

When you install Oracle R Enterprise client, you install two sets of R packages

Oracle R Enterprise Client Supporting Packages

Oracle R Enterprise Client Packages

Oracle R Enterprise Client Supporting Packages

These Open-Source R packages are installed when you install the client supporting packages for Oracle R Enterprise:

Both Oracle R Enterprise client and server require the client supporting packages. If client and server are installed on different systems, the supporting packages must be installed on both systems.

DBI provides the database interface (DBI) definition for communication between R and relational database management systems.

png is used to read and write PNG images.

ROracle provides the Oracle database interface (DBI) driver for R.

Oracle R Enterprise Client Packages

These packages are part of Oracle R Enterprise; they are installed when you install the client packages:

OREbase is the base package for Oracle R Enterprise. It provides basic functionality such as ore.attach().

OREstats provides the model framework for Oracle R Enterprise

OREgraphics provides graphics support for Oracle R Enterprise

OREeda provides linear and stepwise linear egression for Oracle R Enterprise (ore.lm() and ore.stepwise())

ORExml provides XML support for Oracle R Enterprise

OREdm build mining models using Oracle Data Mining algorithms

OREpredict make predictions using R models and database tables

ORE provides base support for Oracle R Enterprise

Load the ORE Packages

Use this command to load the ORE packages into R:

library(ORE)

Install Client on Microsoft Windows

The Oracle R Enterprise client is supported on Microsoft Windows XP or later for 64-bit architectures. The client requires R 2.15.1 for Oracle R Enterprise 1.3, R 2.13.2 for earlier versions.

To install the client, you must install two sets of packages:

Oracle R Enterprise Client Supporting Packages

Oracle R Enterprise Client Packages

The downloads for Windows client support both 32-bit and 64-bit architectures.

After you have installed R, as described in Install R on Windows, follow these steps to install the two sets of R packages for the Oracle R Enterprise Windows client:

As described in Download Oracle R Enterprise Software, download these two zip archives:

ore-supporting-windows-1.3.zip, the client supporting packages

ore-client-windows-1.3.zip, the Oracle R Enterprise packages.

Unzip ore-supporting-windows-1.3.zip to your local system. This creates a top level ore-supporting-windows-1.3 directory whose subdirectory structure mimics a CRAN-like repository.

Unzip ore-client-windows-1.3.zip to your local system. This creates a top level ore-windows-1.3 directory whose subdirectory structure mimics a CRAN-like repository.

Start either 32-bit or 64-bit R 2.15.1 (or R 2.13.2) from the All Programs group of the Windows Start menu. Since the R Windows binary packages contain bundles for both 32-bit and 64-bit architectures, either architecture of R can be used during the installation.

You can install both sets of R packages (supporting and client) from either the R Console or from the R GUI.

To install both sets of packages from the R Console, type

install.packages(c("ROracle", "png"),
                 repos = "file:///<DEP_PATH>/ore-supporting-windows-1.3",
                 type = "win.binary")
install.packages("ORE", repos = "file:///<ORE_PATH>/ore-client-windows-1.3",
                 type = "win.binary")

where <DEP_PATH> and <ORE_PATH> are the unzip directory locations of ore-supporting-windows-1.3.zip and ore-windows-1.3.zip files respectively. The install.packages function calls produce the message "successfully unpacked and MD5 sums checked" for each installed package.

To install both sets of packages from the R GUI, follow these steps:

From the main menu, select Packages then Install package(s) from local zip files

Navigate to

<DEP_PATH>\ore-supporting-windows-1.3\bin\windows\contrib\2.15

where <DEP_PATH> is the unzip directory you used for the ore-supporting-windows-1.3.zip file.

Select DBI_0.2-5.zip, ROracle_1.1-7.zip, and png_0.1-4.zip.

Click Open. Each package will produce the message "successfully unpacked and MD5 sums checked" message in the R Console.

From the main menu, select Packages then Install package(s) from local zip files.

Navigate to

<ORE_PATH>\ore-client-windows-1.3\bin\windows\contrib\2.15

where <ORE_PATH> is the directory where you unzipped the ore-windows-1.3.zip file.

Select OREbase_1.3.zip, OREstats_1.3.zip, OREgraphcs_1.3.zip, OREeda_1.3.zip, ORExml_1.3.zip, OREdm_1.3.zip, OREpredict_1.3.zip, and ORE_1.3.zip.

Click Open. Each package will produce the message "successfully unpacked and MD5 sums checked" message in the R Console.

After the installation completes, install the server; then you can Start the Oracle R Enterprise Client on Microsoft Windows.

Install Client on Linux

The Oracle R Enterprise client is supported on Oracle Linux or Red Hat Linux. The client requires R 2.15.1 for Oracle R Enterprise 1.3, R 2.13.2 for earlier versions.

This section describes how to install a client on a Linux system that does not have the server installed on it. It is not necessary to perform these steps on a Linux system that has the server installed on it.

To install the client you must install two sets of packages:

Oracle R Enterprise Client Supporting Packages

Oracle R Enterprise Client Packages

After you have installed R on Linux as described in Install R on Linux, follow these steps to install the two sets of R packages for the Oracle R Enterprise Linux 64-bit client:

Download Oracle Instant Client Basic Package for 64-bit from Linux from Instant Client Downloads for Linux x86-64 (http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html).

The Oracle Instant Client includes all files required to run OCI, OCCI, and JDBC-OCI applications. The ROracle R package is an OCI application.

Go to Oracle Database Instant Client (http://www.oracle.com/technetwork/database/features/instant-client/index-100365.html) for installation instructions.

Note:

You must have either Oracle Database or Oracle Instant Client installed on any Linux system where you install Oracle R Enterprise Client.

Add the path where you unzipped or installed the Oracle Instant Client libraries to your LD_LIBRARY_PATH.

Download the client supporting R packages ore-supporting-linux-x86-64-1.3.zip from http://www.oracle.com/technetwork/database/options/advanced-analytics/r-enterprise/ore-downloads-1502823.html.

Unzip ore-linux-x86-64-1.3.zip to your local system. This creates the directory ore-supporting-linux-x86-64-1.3 containing these files:

DBI_0.2-5_R_x86_64-unknown-linux-gnu.tar.gz
ROracle_1.1-7_R_x86_64-unknown-linux-gnu.tar.gz
png_0.1-4_R_x86_64-unknown-linux-gnu.tar.gz

Download the Oracle R Enterprise client packages ore-client-linux-x86-64-1.3.zip from http://www.oracle.com/technetwork/database/options/advanced-analytics/r-enterprise/ore-downloads-1502823.html.

Unzip ore-client-linux-x86-64-1.3.zip to your local system. This creates the directory ore-client-linux-x86-64-1.3 containing these files:

ORE_1.3_R_x86_64-unknown-linux-gnu.tar.gz
OREbase_1.3_R_x86_64-unknown-linux-gnu.tar.gz
OREeda_1.3_R_x86_64-unknown-linux-gnu.tar.gz
OREgraphics_1.3_R_x86_64-unknown-linux-gnu.tar.gz
OREstats_1.3_R_x86_64-unknown-linux-gnu.tar.gz
ORExml_1.3_R_x86_64-unknown-linux-gnu.tar.gz
OREdm_1.3_R_x86_64-unknown-linux-gnu.tar.gz
OREpredict_1.3_R_x86_64-unknown-linux-gnu.tar.gz

Go to the directory ore-supporting-linux-x86-64-1.3. Type the following commands to install the client supporting R packages:

R CMD INSTALL DBI_0.2-5_R_x86_64-unknown-linux-gnu.tar.gz
R CMD INSTALL ROracle_1.1-7_R_x86_64-unknown-linux-gnu.tar.gz
R CMD INSTALL png_0.1-4_R_x86_64-unknown-linux-gnu.tar.gz

These commands generate the following messages to confirm successful installation of the packages:

* installing to library '<Your $R_HOME directory> /library'
* installing *binary* package 'DBI' ...
* DONE (DBI)
* installing to library '<Your $R_HOME directory> /library'
* installing *binary* package 'ROracle' ...
* DONE (ROracle)
* installing to library '<Your $R_HOME directory> /library'
* installing *binary* package 'png' ...
* DONE (png)

Go to the directory ore-linux-x86-64-1.3. Type the following commands to install the client packages:

R CMD INSTALL ORE_1.3_R_x86_64-unknown-linux-gnu.tar.gz
R CMD INSTALL OREbase_1.3_R_x86_64-unknown-linux-gnu.tar.gz
R CMD INSTALL OREeda_1.3_R_x86_64-unknown-linux-gnu.tar.gz
R CMD INSTALL OREgraphics_1.3_R_x86_64-unknown-linux-gnu.tar.gz
R CMD INSTALL OREstats_1.3_R_x86_64-unknown-linux-gnu.tar.gz
R CMD INSTALL ORExml_1.3_R_x86_64-unknown-linux-gnu.tar.gz
R CMD INSTALL OREdm_1.3_R_x86_64-unknown-linux-gnu.tar.gz
R CMD INSTALL OREpredict_1.3_R_x86_64-unknown-linux-gnu.tar.gz

Each command generates messages like the following to confirm successful installation of the packages:

* installing to library '<Your $R_HOME directory>/library'
* installing *binary* package '<>' ...
* DONE (<>)

After you have completed the client install, verify the install by connecting to a database that has been enabled for Oracle R Enterprise as discussed in Start the Oracle R Enterprise Client on Linux.

6 Administrative Tasks

If the installation is not successful, you can Troubleshoot the Installation.

After you have installed a server and at least one client, create at least one user:

Create Oracle R Enterprise Users

Make Required GRANTs for special purposes

Configure Oracle Wallet (Optional) to make connections more secure.

After you create a user, perform these tasks:

Start Oracle R Enterprise Client

Connect to an Oracle Database

Validate Oracle R Enterprise Installation

As system administrator, you can Control Memory Used by Embedded R.

If you installed any previous version of Oracle R Enterprise, you can Upgrade Oracle R Enterprise.; upgrade happens as part of install.

If necessary, you can Uninstall Oracle R Enterprise.

Troubleshoot the Installation

The installation script creates a log file on the server. Examine the log file even if the installation reports success. Search the log file for ERROR.

If you cannot resolve the problems, request help from Oracle Support or from the Oracle R Enterprise discussion forum.

Oracle R Enterprise Users

You must create at least one user for Oracle R Enterprise. Follow these steps to create a user for Oracle R Enterprise:

Create a User

Add any Required GRANTs

Create a User

To create an Oracle R Enterprise user, use

demo_user.sh (for Linux)

demo_user.bat (for Windows)

To run these scripts, start SQL*Plus / as sysdba.

Either of these scripts asks you if you want to create an ORE (Oracle R Enterprise) user. The script checks that Oracle Database and Oracle R Enterprise are installed and then creates a user.

After you create the user RQUSER, you can edit the user as necessary; for example, you can and should change the password.

Required GRANTs

Several additional GRANTs may be required depending on how you plan to use Oracle R Enterprise:

RQADMIN role Oracle R Enterprise installation creates the administrative role RQADMIN.

RQADMIN allows Oracle R Enterprise users to create and drop R scripts that use the database embedded R engine.

All users can execute such scripts; no special grant is required.

Note:

You should grant RQADMIN only to those users who need to have it, that is, to users who must create and drop R scripts that use the database embedded R engine.

To grant RQADMIN to RQUSER, start SQL*Plus as sysdba and type

GRANT RQADMIN to RQUSER

CREATE TABLE is needed by some functions that create temporary tables, such as ore.create() with a table argument.

To grant CREATE TABLE to RQUSER, start SQL*Plus as sysdba and type

GRANT CREATE TABLE TO RQUSER;

CREATE PROCEDURE is required by ore.groupApply()

To grant CREATE PROCEDURE to RQUSER, start SQL*Plus as sysdba and type

GRANT CREATE PROCEDURE TO RQUSER;

CREATE VIEW is required by ore.create() with a view argument and by the OREdm package.

To grant CREATE VIEW to RQUSER, start SQL*Plus as sysdba and type

GRANT CREATE VIEW TO RQUSER;

CREATE MINING MODEL is required by the OREdm package.

To grant CREATE MINING MODEL to RQUSER, start SQL*Plus as sysdba and type

GRANT CREATE MINING MODEL TO RQUSER;

Two GRANTs that were required for Oracle R Enterprise 1.1 are no longer required; see Deprecated Grants for details.

Deprecated Grants

The RQROLE role was granted to all users for Oracle R Enterprise 1.1. RQROLE is deprecated for Oracle R Enterprise 1.3.

This GRANT EXECUTE:

grant EXECUTE on rqsys.rqGroupEvalImpl to rquser;

is deprecated for Oracle R Enterprise 1.3 but was required for Oracle R Enterprise 1.1.

Configure Oracle Wallet (Optional)

The Oracle Wallet provides secure storage of user passwords and client certificates. An Oracle Wallet provides a secure way for embedded R scripts to avoid storing passwords in the script.

Follow these steps to configure Oracle Wallet with Oracle R Enterprise:

Configure Oracle Wallet and store the username and password. For information, see the discussions of Oracle Wallet in Oracle Database Security Guide.

Add the connection string used to create the wallet entry (for example, "mydb112_test") to map to the DB instance connection string in tnsnames.ora (Change the host name to be your database machine name and SID to be the SID of your database.):

mydb112_test =
      (DESCRIPTION =
         (ADDRESS =
            (PROTOCOL = TCP)
            (HOST = <host_name>)
            (PORT = 1521)
         )
         (CONNECT_DATA = (sid=<SID>))
      )

After you complete the steps, you can just use the connect string to connect to the database:

 ore.connect(conn_string = "mydb112_test", all = TRUE)

For more information about connecting using Oracle Wallet, see the R help for ore.connect().

Start Oracle R Enterprise Client

After you have installed a server and a client, follow these directions to start the client:

Start the Oracle R Enterprise Client on Microsoft Windows

Start the Oracle R Enterprise Client on Linux

Start the Oracle R Enterprise Client on Microsoft Windows

After the server is installed, you can launch the client.

To launch the Oracle R Enterprise client in a running session of R 2.15.1 (or R 2.13.2 for earlier releases), execute the following R code from the R Console. Before you execute the code, modify the connection information (user, sid, host, password, and port) for the database where the R Sever is installed:

# Load ORE packages and dependencies
# DBI, ROracle, OREbase, MASS, OREstats,
# OREgraphics, OREeda, ORExml, ORE
library(ORE)

# Connect to Oracle RDBMS
# Change the connection information below
ore.connect(user = "<USERNAME>",
            sid = "<SID>",
            host = "<HOST>",
            password = "<PASSWORD>",
            port = PORTNUMBER,
            all = TRUE)

For more information, see Connect to an Oracle Database.

To test that you can connect to the specified Oracle Database, type

ore.is.connected()

ore.is.connected returns TRUE if you are connected to the database, or FLASE if you are not connected.

After you set up Oracle Wallet, as described in Configure Oracle Wallet (Optional), you can connect as follows:

ore.connect(conn_string = "ore_wallet", all = TRUE)

ore_wallet is a connect string that has been registered with the Wallet.

As with all R commands, this code can be used during the initialization of an R session.

For more information on the initialization sequence of R on startup, type help(Startup) in the R Console.

Specify ore.connect in an embedded R function, otherwise all embedded R scripts automatically go to the same schema.

Start the Oracle R Enterprise Client on Linux

After the server is installed, you can launch the client.

Before you launch Oracle R Enterprise client, add these paths to the LD_LIBRARY_PATH environment variable:

The path where Oracle Instant Client libraries are installed. Otherwise loading of ROracle package will fail.

The path for the shared libraries libR.so, libRblas.so, and libRlapack.so from the installation of R 2.15.1 (or R 2.13.2 for earlier releases)

Start R 2.15.1 (or R 2.13.2 for earlier releases) from your favorite Linux shell. Next use ore.connect to connect to the Oracle Database where the server resides.

Launch the Oracle R Enterprise client by executing, after modifying the connection information (user, sid, host, password, and port), the following R code from the R Console:

# Load ORE packages and dependencies
# DBI, ROracle, OREbase, MASS, OREstats,
# OREgraphics, OREeda, ORExml, ORE
library(ORE)

# Connect to Oracle RDBMS
# Change the connection information below
ore.connect(user = "<USERNAME>",
            sid = "<SID>",
            host = "<HOST>",
            password = "<PASSWORD>",
            port = PORTNUMBER
            all = TRUE)

Your Oracle Database Administrator can provide you with suitable values for USERNAME, SID, HOST, PASSWORD, and PORT. These values provide connection information for the database.

For more information, see Connect to an Oracle Database.

After you set up Oracle Wallet, as described in Configure Oracle Wallet (Optional), you can connect as follows:

ore.connect(conn_string = "ore_wallet", all = TRUE)

ore_wallet is a connect string that has been registered with the Wallet.

As with all R commands, this code can be used during the initialization of an R session.

For information on the initialization sequence of R on startup, type help(Startup) in the R Console.

Connect to an Oracle Database

Oracle R Enterprise includes the following R functions that enable transparent access to Oracle Database tables and views:

ore.connect(user = "", sid = "", host = "localhost", password = "", port = 1521, service_name = NULL, conn_string = NULL,all = FALSE, type = c("ORACLE", "HIVE")) establishes a connection to an Oracle R Enterprise server running on an ORE database.

The call ore.connect() must precede all other calls to ORE functionality (except ore.is.connected()). There can only be one active ORE connection.

An ORE session can optionally end with a call to function ore.disconnect(). An ORE session is implicitly terminated when the R session ends.

To connect to an Oracle Database, specify user, sid, host, password, and port. conn_string is specified if you set up Oracle Wallet as described in Configure Oracle Wallet (Optional).

For examples of ore.connect(), see Connect to an Oracle Database.

Calling ore.connect() when an active ORE connection already exists results in disconnecting the active session prior to starting a new session.

If ore.is.connected() returns TRUE, an active connection exists.

ore.attach(schema, pos = 2, warn.conflicts = TRUE) attaches The named ORE schema's R environment to the R search path. When attached to the R search path, the ORE objects can be accessed by directly by name.

If you don't specify schema, the default schema, the one used to connect to the ORE database, is used.

By default the ORE database is attached in position 2 in the R search path, immediately after the user's workspace and before all previously attached packages and environment. The pos argument can be used to attach the ORE schema at a different location in the search path, but it cannot be attached at pos = 1.

If you use the all parameter of ore.connect when you attach to a database, ore.attach is executed automatically.

Use ore.detach(schema) to detach from schema.

ore.sync(schema, table, use.keys = TRUE) synchronizes ore.frame objects, representing database tables and views, in the ORE schema environment, on a per schema basis.

Oracle R Enterprise creates proxy objects in R that correspond to the tables or views in the database schema. These proxy objects contain metadata used by Oracle R Enterprise internally to provide transparency layer functionality.By default, ore.sync() uses the schema given in ore.connect(). The schema argument can be used to select a different schema to which the user has the appropriate access privileges.If table is not specified in an ore.sync function call, all tables and views whose name do not contain $ or begin with SYS_ are selected. Select all tables in a database schema can be expensive and so the recommended practice is to use table to limit the number of tables and views represented in the ORE schema environment.

ore.ls(schema, all.names = FALSE, pattern) lists all objects in the specified schema with names that match the regular expression pattern. all.names = FALSE lists names that do not start with . (period), such as internal functions or objects.

ore.ls() returns the objects available in the current ORE schema environment.

Objects created by Oracle R Enterprise are identified with the ore prefix. Pick any object returned by ore.ls() and type either class(OBJECTNAME) or class(OBJECTNAME$COLUMN_NAME).

For example,

R> class(NARROW)
[1] "ore.frame"
attr(,"package")
[1] "OREbase"

The prefix ore is applied to the class names. This indicates that the object is an Oracle R Enterprise created object that holds metadata (instead of contents) of the corresponding object in Oracle Database.

Validate Oracle R Enterprise Installation

The purpose of validation is to ensure that you can connect to the database that has now been enabled with Oracle R Enterprise from R and successfully useOracle R Enterprise.

The exact same steps validate a server installation or a client installation.

After you complete the installation, follow these steps to validate it:

Start R on a client. Load the Oracle R Enterprise Packages:

R> library(ORE)

Connect to the Oracle Database on the server. The exact command depends the details for the database to which you connect:

R> ore.connect(user = "rquser", sid = "orcl", host = "localhost", password = "rquser", port = 1521, all = TRUE)

In this command provide the values for user, sid, host, password, and port that are correct for your database. If you did not install the database, you may have to ask the DBA for these values.

Alternatively if the database is on the same machine, use ore.connect in this way.

ore.connect(“scott”, password=”tiger”, conn_string=””, all=TRUE)

Run several Oracle R Enterprise demos. This command provides a list of available demos:

R> demo(package = "ORE")

These commands illustrate how to run specific demos:

# Test the transparency layer
R> demo("aggregate", package = "ORE")

# Test embedded R:
R> demo("row_apply", package = "ORE")

Control Memory Used by Embedded R

As system administrator, you can control the memory resources between R and other processes running on system. For example, a properly-set minimum memory bound allows R to have enough memory to run in a reasonable amount of time while a properly-set maximum number prevents R from holding too much memory unnecessarily or starving other processes.

This feature limits the amount of R heap memory (vector and cons in R's terminology) that is automatically managed by R's gc mechanism. The C-type memory that may be allocated via call Calloc, Realloc, calloc, and malloc is not controlled by this feature. Such C-type memory is mainly created to hold intermediate or temporary values for completing computation in an R function implemented in C. The C-type memory that may be allocated and released explicitly by function is not controlled by this feature. Under normal circumstances, the amount of such memory is usually of limited size and does not affect memory usage of R significantly.

Oracle R Enterprise 1.3 allows a DBA to control R memory usage by specifying minimum vector heap, maximum vector heap, minimum cons cells, and maximum cons cells using the sys.rqconfigset SQL procedure.

Use these commands to set minimum vector heap, maximum vector heap, minimum cons cells, and maximum cons cells

sys.rqconfigset('MIN_VSIZE', '20M') sets minimum R vector heap memory to 20MB; default is 32MB

sys.rqconfigset('MAX_VSIZE', '100M') sets maximum R vector heap memory to 100MB,;default is 4GB

sys.rqconfigset('MIN_NSIZE', '500K') sets minimum number of R cons cells to 500x1024,; default is 1M

sys.rqconfigset('MAX_NSIZE', '10M')sets maximum number of R cons cells to 10x1024x1024; default is 20M

To set maximum vector heap memory and maximum cons cells to no limits,

exec sys.rqconfigset('MAX_VSIZE', NULL); exec sys.rqconfigset('MAX_NSIZE', NULL)

Upgrade Oracle R Enterprise

You can upgrade from any version of Oracle R Enterprise to the current version by reinstalling the product.

If you installed an earlier version of Oracle R Enterprise, you can upgrade to this release as follows:

To upgrade the Client, re-install the packages. See Install Client on Microsoft Windows or Install Client on Linux. You do not have to uninstall the client packages before you re-install.

To upgrade the Server, follow the steps in Install Server. When install.sh detects a previous version of Oracle R Enterprise, it asks if upgrade is needed. Answering No aborts the process; answering Yes starts the upgrade.

Follow all of the upgrade steps, including the installation of ore-supporting-linux-x86-64-1.3.zip.

Uninstall Oracle R Enterprise

You uninstall Uninstall Oracle R Enterprise by removing the packages and by running a script.

Uninstall Oracle R Enterprise Client

Follow these steps to uninstall Oracle R Enterprise client:

To remove the Oracle R Enterprise packages, start R and type these commands:

remove.packages("ORE")
remove.packages("ORExml")
remove.packages("OREeda")
remove.packages("OREgraphics")
remove.packages("OREstats")
remove.packages("OREbase")
remove.packages("ROracle")
remove.packages("DBI")
remove.packages("png")
remove.packages("OREdm")
remove.packages("OREpredict")

Uninstall Oracle R Enterprise Server

To uninstall Oracle R Enterprise server, execute

uninstall.sh (for Linux)

uninstall.bat (Windows)

Either script removes libraries installed in $ORACLE_HOME/lib and removes all installed SQL objects.

Index

C  D  I  L  M  O  P  R  S  U  V  W 

C

client installation

linux, 5.3

Windows, 5.2

client packages, 5.1

client supporting packages, 5.1.1

create users, 6.2.1

grants, 6.2.2

create users script, 6.2.1

D

database

connect to, 6.5

database patch, 2.3

database version, 2.3

downloads location, 1

I

installation

overview, 1

troubleshoot, 6.1

L

linux requirement, 2.1

M

Math Kernel Library, 2.2.3.4

memory usage

R, 6.7

MKL_THREADING_LAYER, 2.2.3.4

O

operating system requirement, 2.1

Oracle Database requirement, 2.3

linux, 2.3

Oracle R Distribution, 2.2.1

Oracle R Enterprise download, 3.1

Oracle Wallet

configure, 6.3

ore prefix, 6.5

ore.attach, 6.5

ore.connect, 6.4.2

ore.ls, 6.5

ore.sync, 6.5

overview, 1

P

packages

client, 5.1.2

R

R installation

Exadata, 2.2.4

linux, 2.2.3

Windows, 2.2.2

R requirement, 2.2

RQADMIN role, 6.2.2

S

server install

overview, 4.1.3

preparation, 4.1

privileges, 4.1.1

server installation

linux, 4.2

start client

linux, 6.4.2

Windows, 6.4.1

supporting packages, 5.1.1

sys.rqcofigset, 6.7

U

uninstall, 6.9

upgrade, 6.8

V

validate installation, 6.6

W

windows requirement, 2.1

Oracle Legal Notices

Copyright Notice

Copyright © 1994-2012, Oracle and/or its affiliates. All rights reserved.

Trademark Notice

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.

License Restrictions Warranty/Consequential Damages Disclaimer

This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

Warranty Disclaimer

The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

Restricted Rights Notice

If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:

U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007). Oracle America, Inc., 500 Oracle Parkway, Redwood City, CA 94065.

Hazardous Applications Notice

This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.

Third-Party Content, Products, and Services Disclaimer

This software or hardware and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.

Alpha and Beta Draft Documentation Notice

If this document is in prerelease status:

This documentation is in prerelease status and is intended for demonstration and preliminary use only. It may not be specific to the hardware on which you are using the software. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to this documentation and will not be responsible for any loss, costs, or damages incurred due to the use of this documentation.