Forum Stats

  • 3,750,530 Users
  • 2,250,189 Discussions
  • 7,866,998 Comments

Discussions

dbSendQuery using ROracle hangs while retrieving data

user9048328
user9048328 Member Posts: 2 Green Ribbon
edited Aug 4, 2020 7:01PM in R Technologies

Hi All,

I am facing issue with ROracle on Linux 7.X while fetching data from Oracle 12c Database (different box) using 18c client. While fetching data from R - R version 3.5.0 (2018-04-23) -- "Joy in Playing" using ROracle 1.3.1 and DBI 1.1.0 R package, process gets stuck and never comes out.

Psuedo code:

setwd("/srv/shiny-server/SimulationEngine_SIT/STDJD")

source("password_encryption.R")

library(ROracle)

library(DBI)

con <- dbConnect(drv=dbDriver("Oracle"),username=get_user(),password=get_decrypted_pass(),dbname=connect_string(),prefetch = FALSE)

S <- paste("select code, yearval, freq_code, freq_num, dataval from data_sim")

res <- dbSendQuery(con,S)

data <- fetch(res,n=-1)

When the last line is executed, process hangs and R console is not returned. Not sure where the problem lies , but i have never faced this issue earlier. Please help where am i going wrong here.Issue.png

Answers