How to install ROracle package on Windows 7?

后端 未结 8 734
北海茫月
北海茫月 2020-12-02 14:52

I\'m trying to install ROracle package on my Windows 7 client. I have Oracle Instant client and Rtools installed, DBI package is istalled, OCI32_LIB environmental variable h

8条回答
  •  一生所求
    2020-12-02 15:12

    From http://jgilfillan.github.io/2016/05/28/how-to-install-roracle-in-windows-7/

    Download binary from oracle: http://www.oracle.com/technetwork/database/database-technologies/r/roracle/downloads/index.html

    The run the following command in r, substituting the file path:

    setwd('xxxxx')   # set to path of download
    install.packages('ROracle_1.2-1.zip', repos = NULL)
    

    Then load the library and use the package - you may have to change XXXX to whatever is in your TNS Names:

    library('ROracle')
    drv <- dbDriver("Oracle")
    con <- dbConnect(drv, "USER GOES HERE", "PASSWORD GOES HERE", dbname='XXX')
    

    test connection:

    dbReadTable(con, 'DUAL')
    

    Note that this has also been confirmed to work on Windows 10.

提交回复
热议问题