3 Replies Latest reply: May 2, 2013 9:27 AM by Kedar Gupte RSS

    Data cartridge error ORA-29400 when using ORE

      I have a question regarding the execution of R code within the Oracle R Enterprise package. I am running Windows 7 Enterprise SP1 64bit, R 2.15.0, Oracle including Patchset 17 and have installed the ORE supporting package, the ORE client as well as the ORE server according to the Oracle R Enterprise User's Guide. Everything works fine as long as I don't need to include further R packages. If I try for example

      doEval(function() {
      dat <- ore.pull(DATA_TABLE)

      which uses the ORE package by invoking ore.pull, I get the error message

      Error in .oci.GetQuery(conn, statement, ...) :
      ORA-29400: data cartridge error
      Error in function () : could not find function "ore.pull"
      ORA-06512: at "RQSYS.RQEVALIMPL", line 57

      The same error occurs when I try to use other R packages. Could you please tell me how I can execute functionality from other packages within ORE? Many thanks in advance.
        • 1. Re: Data cartridge error ORA-29400 when using ORE
          I don't know the windows environment, but under Linux, the way it works is that you have a .Rprofile or .Rprofile.site file that loads the ORE libraries.

          You might want to look why the customized .Rprofile files are not being run when you invoke the embedded R engine via the database (as doEval does).

          As a workaround, you could modify your function to something like

          doEval(function() {
          dat <- ore.pull(DATA_TABLE)

          you might also need to add some ore.connect(), ore.sync(), and ore.attach() calls.

          These are the commands that get added to the customized .Rprofile file when you install ORE, so in your case it looks like the R engine spawned by the database just can't find that customized .Rprofile file.
          • 2. Re: Data cartridge error ORA-29400 when using ORE

            I got the same problem. In RProfile.site I have added these lines:
            ore.connect("RQUSER", "emora", "localhost", "emora")

            Be sure your environment variables are set:
            R_HOME: C:\Program Files\R\R-2.13.2
            R_PROFILE_USER: C:\Program Files\R\R-2.13.2\etc

            adding the functions sync and attach solved the problem that ONTIME_S was not found
            mod <- ore.doEval(
            + function(param) {
            + ore.sync()
            + ore.attach()
            + dat <- ore.pull(ONTIME_S)
            + mod <- lm(ARRDELAY ~ DISTANCE + DEPDELAY, dat)
            + mod
            + });
            • 3. Re: Data cartridge error ORA-29400 when using ORE
              Kedar Gupte

              Thanks jemous for resolving the issue.
              The server side R execution requires loading the ORE packages and hence it is necessary to configure the RProfile.site file in <R_HOME>\etc. Also pls make sure to have environment variables R_HOME and R_PROFILE_USER set, with proper roles(ROLES-RQADMIN and RQROLE) and object permissions set for the schema that is being used. Works like a charm.

              Edited by: 1003742 on May 2, 2013 7:21 AM