issues with RODBC and oracles instantclient

I am trying to troubleshoot a problem within Rstudio and not sure where to post. I am trying to access an oracle database within RStudio using RODBC. I get the following message after entering:

channel <- RODBC::odbcConnect("server",uid="user",pwd="password")

" [RODBC] ERROR: state IM003, code 160, message Specified driver could not be loaded due to system error 126: The specified module could not be found. (Oracle in OraClient11g_home1, C:\app\BuiltInAdmin\product\11.2.0\client_1\BIN\SQORA32.DLL)."

Some background. I have win 7 - 64 bit machine. I used to have 32 bit v11.x instant client installed. This got replaced with a 32 bit v12.2 client. Rstudio is running a 32 bit version or R. The C:\app\BuiltInAdmin folder doesn't exist anymore.

Does anyone know what "OraClient11g_home1" is? is this a registry value?

My global path has these entries:
"C:\app\BuiltInAdmin\product\11.2.0\client_1\bin"
"C:\instantclient_12_2"

Any ideas as to what is going on and how to go about fixing it?
Thanks in advance

OraClient11g_home1is an environment variable, either a user variable or system variable that if I remember correctly points to that same path. You can find them in the same window that has your system path defined. If you have uninstalled the Oracle software you had before you should clean up the environment variable and your path. Delete the
OraClient11g_home1 variable that references the deleted folder and remove the section of the Path that points to the deleted folder.

From the desktop, right click the Computer icon.

  • Choose Properties from the context menu.
  • Click the Advanced system settings link.
  • Click Environment Variables.

@Edpflager. Thanks. I have removed the environmental variable and the path values but the issue persists.
So i have been looking at oracles site: https://docs.oracle.com/cd/B28359_01/install.111/b32007/deinstall.htm#CIHGGGBB
Section 5.3 refers to having to manually remove registry keys (in addition to the environmental variables, which i've done) I am currently exploring this.

EDIT:
So it turns out all registry items had been removed. The issue is that the user DSN tab (in data sources (odbc)) still has entries for client 11.x, but the system DSN has entries for client 12.x. I can not remove these entries. I get an error message saying the drivers have already been removed. I am assuming that Rstudio is looking in the user DSN before the system DSN.

If that is true, is there a way to tell Rstudio to look in the System DSN first? The reason i ask is that i also have SAS on this machine that successfully connects to the same databases without this issue, so i am thinking this must be Rstudio related to some degree.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.