[R-sig-DB] trouble connecting to an Oracle DB

Marc Schwartz m@rc_@chw@rtz @end|ng |rom me@com
Thu Jun 11 18:04:05 CEST 2009


On Jun 11, 2009, at 10:35 AM, Rajarshi Guha wrote:

> Hi, I'm discovering the DBI methods in R and am trying to connect to a
> remote Oracle DB using ROracle. However, I'm getting stumped by rthe
> connection step. I'm using code of the form:
>
> drv <- dbDriver("Oracle")
> con <- dbConnect(drv, 'user/passwd using host:port/SID')
>
> but I get the following error:
>
> Error in oraNewConnection(drv, ...) :
>  RS-DBI driver: (ORA-12514: TNS:listener does not currently know of  
> service
> requested in connect descriptor
> )
>
> Is this an issue with my connection statement? Or is it a problem with
> Oracle? I'm using ROracle 0.5.9 and R 2.9.0 (64 bit on OS X  
> Leopard). The
> Oracle DB is 10.2.0.3.0
>
> Any pointers would be appreciated

Generally, when I get errors related to the Oracle TNS listener  
service (using RODBC), it is either an error on the server (service  
not enabled) or on my end with a server configuration issue such as  
the IP address or port setting. Every now and then, our SysAdmin  
forgets to tell me that they did a server upgrade and changed something.

If you have the Oracle instant client installed locally, you might  
want to try using that to see if you can login successfully that way.  
It can be helpful in identifying where the issue might be based upon  
the success or failure of that approach.

Otherwise, you might want to check with your SysAdmin to verify your  
config/settings and that the TNS listener service is enabled on the  
server.

HTH,

Marc Schwartz




More information about the R-sig-DB mailing list