none
Loading RODBC Package on R Server Edge and Worker Nodes RRS feed

  • Question

  • I can't seem to load the RODBC package on my edge node.  Running the following:

    library(RDOBC)

    Generates the following error:

    Error in library(RODBC) : there is no package called ‘RODBC’
    
    
    

    Anyone know how I can access SQL server from an R Server Edge Node?  I will be connecting to a SQL Database in Azure.

    Thank you,

    David

    
    

    David Downing

    Thursday, February 2, 2017 4:23 PM

All replies

  • I dont know the details of your setup. For me, I had a linux R server I set up and needed to communicate with a seperate SQL Server box. I had to log into the box and open an administrative R session. Then I installed RODBC with install.packages('RODBC'). After that, I could perform the library(RODBC) command.
    Friday, February 3, 2017 1:53 PM
  • Thank you for your response... perhaps I didn't notice the error after calling the install.packages('RODBC').  I'm getting the following error after running the install.packages('RODBC'):

    configure: error: "ODBC headers sql.h and sqlext.h not found"
    ERROR: configuration failed for package ‘RODBC’
    * removing ‘/home/cladmin/R/x86_64-pc-linux-gnu-library/3.3/RODBC’
    Warning in install.packages :
      installation of package ‘RODBC’ had non-zero exit status

    The downloaded source packages are in
     ‘/tmp/RtmpbKfgXf/downloaded_packages’

    Are there other dependent packages that need to be installed before RODBC?


    David Downing

    Friday, February 3, 2017 3:08 PM
  • Hi David

    I had the same error message. If you SSH into the edgenode and run the following lines of code i managed to get the RODBC package installed and running.

    sudo apt-get install libiodbc2-dev -y

    sudo apt-get install unixodbc unixodbc-dev -y

    sudo su 
    curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
    curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list
    exit
    sudo apt-get update
    sudo ACCEPT_EULA=Y apt-get install msodbcsql -y
    # optional: for bcp and sqlcmd
    sudo ACCEPT_EULA=Y apt-get install mssql-tools
    echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile
    echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
    source ~/.bashrc
    # optional: for unixODBC development headers
    sudo apt-get install unixodbc unixodbc-dev -y

    Stig 

    Tuesday, August 1, 2017 8:33 AM