ORE - Install 1.3.1


Installing Oracle R Enterprise. Oracle R Enterprise server is installed in an Oracle Database


  • Oracle R Enterprise is certified with R 2.13.2 only.
  • When installing the client, it must use the same ORE version than the database server.


  • On the client:
  • On the server
ore.doEval(function() packageVersion("ORE"))



Download these two zip archives:

  • Oracle R Enterprise Client Supporting Packages
  • Oracle R Enterprise Client Packages

They contain the following packages:

  • Supporting Packages:
    • DBI: R Database Interface
    • ROracle: OCI based Oracle database interface for R
    • png: Read and write PNG images
  • Client:
    • ORE: Oracle R Enterprise
    • OREBase: Oracle R Enterprise - base
    • OREdm: Oracle R Enterprise - dm (data mining)
    • OREeda: Oracle R Enterprise - Exploratory data analysis
    • OREgraphics: Oracle R Enterprise - graphics
    • OREpredict: Oracle R Enterprise - model prediction
    • OREstats: Oracle R Enterprise - stats
    • ORExml: Oracle R Enterprise - R objects to XML



  • Supporting
install.packages("C:/temp/ore-supporting-win-x86_64/supporting/DBI_0.2-5.zip", repos = NULL)
install.packages("C:/temp/ore-supporting-win-x86_64/supporting/ROracle_1.1-9.zip", repos = NULL)
install.packages("C:/temp/ore-supporting-win-x86_64/supporting/png_0.1-4.zip", repos = NULL)
  • Client. You must install the client before you can run Oracle R Enterprise
install.packages("C:/temp/ore-client-win-x86_64/client/OREbase_1.3.1.zip", repos = NULL)
install.packages("C:/temp/ore-client-win-x86_64/client/OREdm_1.3.1.zip", repos = NULL)
install.packages("C:/temp/ore-client-win-x86_64/client/OREeda_1.3.1.zip", repos = NULL)
install.packages("C:/temp/ore-client-win-x86_64/client/OREgraphics_1.3.1.zip", repos = NULL)
install.packages("C:/temp/ore-client-win-x86_64/client/OREpredict_1.3.1.zip", repos = NULL)
install.packages("C:/temp/ore-client-win-x86_64/client/OREstats_1.3.1.zip", repos = NULL)
install.packages("C:/temp/ore-client-win-x86_64/client/ORExml_1.3.1.zip", repos = NULL)
install.packages("C:/temp/ore-client-win-x86_64/client/ORE_1.3.1.zip", repos = NULL)

Example of output:

Warning in install.packages :
  package ‘C:/temp/ore-supporting-win-x86_64-1.3.1/supporting/DBI_0.2-5.zip’ is not available (for R version 2.13.2)
Installing package(s) into ‘C:/Program Files/R/R-2.13.2/library’
(as ‘lib’ is unspecified)
package 'DBI' successfully unpacked and MD5 sums checked


The Oracle Database required libraries and PL/SQL procedures to enable to support an Oracle R Enterprise client.

setx R_HOME "C:\Program Files\R\R-2.13.2"

From the zip: ore-server-windows, execute install.bat.

The script:

  • copies several libraries to $ORACLE_HOME/lib.
  • 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.

The installation creates an administrative role RQADMIN and a user role RQROLE. The roles are used as follows:

  • RQADMIN grant the creation of R scripts that execute using the database embedded R engine
  • RQROLE grant the execution of R code via SQL queries

See the demo_user.(bat|sh) script. Otherwise:

  • grant rqrole to <Each ORE user>
  • grant execute on rqsys.rqGroupEvalImpl for each user.
  • Create all the synonyms listed in rquser.sql for each user.



From a client

# Load ORE packages and dependencies
# DBI, ROracle, OREbase, MASS, OREstats,
# OREgraphics, OREeda, ORExml, ORE
# Change the following connection settings:
user     <- "scott"
password <- "tiger"
sid      <- "mysid"
host     <- "myhost"
port     <- 1521
all      <- TRUE
cat("Connecting to ORE\n")
cat("    User:", user, "\n")
cat("    SID: ", sid, "\n")
cat("    Host:", host, "\n")
ore.connect(user, sid, host, password, port, all)

that you can add in a startup script

ORE Database function

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

  • ore.attach(USER, SID, host, password) establishes a database connection using the schema or user name, the database SID, machine hostname, and password, and creates an environment that maps database table names to R objects (ore.frame) from the schema referenced in the database connection. At this time, views are not mapped. If you use the all parameter of ore.connect when you attach to a database, ore.attach is executed automatically.
  • ore.sync() synchronizes with your schema (account) in the Oracle Database. ore.connect can perform this command. If you use the all parameter of ore.connect when you attach to a database, ore.sync is executed automatically.
  • ore.detach(“SCHEMA_NAME”) detaches from the schema.
  • ore.ls() lists all objects in the schema you are currently connected to.

ORE Objects

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"
[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.


Scripts have been added as demos to the ORE package.

To access a complete listing of them type

demo(package = "ORE")

To run one of these scripts, specify the name of the demo in a demo function call. For example, to run aggregate.R, type

demo("aggregate", package = "ORE")
table_apply.R   Execute R code on all rows of a table passed in at once
aggregate.R     Demonstrates aggregations. See also summary.R
analysis.R      Demonstrates basic analysis and data processing operations
basic.R         Demonstrates basic connectivity to database
binning.R       Demonstrates binning in R
columnfns.R     Demonstrates use of column functions
corr.R          Correlation matrix (Pearson's, Spearman/Kendalls)
crosstab.R      Frequency cross-tabulations. Also see freq.R
derived.R       Handling derived columns
distributions.R Distribution, Density, and Quantile Functions
doEval.R        Demonstrates support for database-enabled parallel simulations
freqanalysis.R  Frequency cross-tabulations. Also see crosstab.R
graphics.R      Demonstrates visual analysis (boxplot, histogram)
group_apply.R   Execute R code for different sets of rows, one set per group
hypothesis.R    Hypothesis Testing Functions(binomial, chi square, T test, etc.)
matrix.R        Matrix operations
nulls.R         Demonstrates handling of nulls in SQL vs. NAs in R
push_pull.R     Demonstrates collaborative processing between database and client
rank.R          Ranking of observations (ranking, handling ties, etc.)
reg.R           Multivariate Regression
row_apply.R     Execute R code on each row
sql_like.R      Demonstrates how R commands map to SQL operations
stepwise.R      Stepwise Multivariate Regression
summary.R       Demonstrates summary functionality

Documentation / Reference

Powered by ComboStrap