1:Obtain a package called “RODBC” in order to connect with the database.Download it here:
http://cran.r-project.org/web/packages/RODBC/index.html2:Start R, switch to the location which contains the RODBC package and an enter the following R code:
install.packages(packagename.tar.gz)
3:After the package installation you can create a channel:
ch=odbcConnect("ORACLE2")
4:Check the channel with odbcGetInfo(ch)
5:If the connection was successful, the console shows something like this:
odbcGetInfo(ch)
DBMS_Name DBMS_Ver Driver_ODBC_Ver
"Oracle" "10.02.0010" "03.52"
Data_Source_Name Driver_Name Driver_Ver
"ORACLE2" "SQORA32.DLL" "11.02.0001"
ODBC_Ver Server_Name
"03.52" "143.93.91.33:1521/xe"