A
A
Akalit2022-03-20 17:21:46
R
Akalit, 2022-03-20 17:21:46

Connecting R to DB ORA-12560?

I am getting ORA error - 12560 when I try connect to Oracle DB installed on VM.
> sql*plus, pl/sql, excel - connect successfully

Connection code in R :

con <- dbConnect(odbc::odbc(), driver ='Oracle in instantclient_19_14',
dns = "user", encoding = "windows-1251",PWD ="qazedcwsx")
#--- output Error: nanodbc/nanodbc.cpp:1021: IM006: [Oracle][ODBC][Ora]ORA-12560: TNS:protocol adapter error


sql*plus can only connect if I write `@sid` after the password, this method does not work in R

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Akalit, 2022-03-20
@Akalit

Response
con <- dbConnect(odbc::odbc(),
.connection_string = "Driver={Oracle in nstantclient_19_14};Dbq=XE;Uid=user;Pwd=qazedcwsx;)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question