In my previous two blog posts (Part-A and Part-B) I detailed 4 steps for how you can install ORE on your servers and on your client machines.
I also mentioned a possible issue you may encounter if you try to install ORE on a Windows server. This blog post will look at this issue and how you can workaround it and get ORE installed.
The problem occurs when I when to install the ORE Supporting packages.
I was prompted to install these into a new library directory. If you get this error message then something is wrong and you should not proceed with installing these packages. If you do proceed and install them in a new library directory then they will not be seen by ORE and the database (as they were not installed in the $ORACLE_HOME/R/library) and when you go to run ORE from within R you will get errors like the following
package ‘Cairo’ successfully unpacked and MD5 sums checked
package ‘DBI’ successfully unpacked and MD5 sums checked
package ‘png’ successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package ‘png’
package ‘ROracle’ successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package ‘ROracle’
If I try the ore.connect I get the following errors.
ore.connect(user="RQUSER", sid="orcl", host="localhost", password="RQUSER", port=1521, all=TRUE)
Loading required package: ROracle
Error in .ore.oracleQuerySetup() :
ORACLE connection requires ROracle package
In addition: Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there is no package called ‘ROracle’
To overcome this ORE install issue all you need to do is to close down your R Gui, then add the following lines to the Rprofile file. The Rprofile file is located in R\etc directory C:\Program Files\R\R-3.0.1\etc. Add the following lines:
# Add $ORACLE_HOME/R/library to .libPaths() for ORE packages
.libPaths("C:/app/oracle/product/11.2.0/dbhome_1/R/library")
The above line will tell R to look in or to include the R directory in the Oracle home as part of its search path. You many need to change the directory above to point to your Oracle home. When you log into the R Gui the path above will be included. Now you can install the packages and then import the packages. This time they will be installed in the $ORACLE_HOME/R/library. When you open the R Gui and run the command to load the ORE package and to connect to your ORE schema you should not receive any error messages.> library(ORE)
> ore.connect(user="RQUSER", sid="orcl", host="localhost", password="RQUSER", port=1521, all=TRUE)
Now you should have ORE installed and working on your Windows server.