Per usare ROracle in R v.4 si deve compilare il codice scaricando il pacchetto ROracle_1.3-1.1.tgz e istantclient base ed sdk da Oracle https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html
export PATH="$PATH:/opt/oracle/instantclient_21_12"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/oracle/instantclient_21_12"
R CMD INSTALL --configure-args='--with-oci-lib=/opt/oracle/instantclient_21_12/ --with-oci-inc=/opt/oracle/instantclient_21_12/sdk/include' ROracle_1.3-1.1.tar.gz
sudo sh -c "echo /opt/oracle/instantclient_21_12 > /etc/ld.so.conf.d/oracle-instantclient.conf"
sudo ldconfig
Per effettuare la connesione da R
port <- 1521
svc <- "dbaaaa.aaaaaa.it"
connect.string <- paste(
"(DESCRIPTION=",
"(ADDRESS=(PROTOCOL=tcp)(HOST=", host, ")(PORT=", port, "))",
"(CONNECT_DATA=(SERVICE_NAME=", svc, ")))", sep = "")