connecting to Oracle DB using Windows authentication / trusted connection in R

Viewed 1169

There are a lot of examples how to connect to an Oracle DB using password authentication (i.e. user id + password) in R. However, I need to figure out to set up the connection using Windows authentication / a trusted connection in R for an Oracle DB.

Example

I saw a similar case for a MySQL DB where a connection string is specified containing trusted_connection=true which, if I understand correctly, indicates Windows authentication / a trusted conenction.

library(RODBC)
dbhandle <- odbcDriverConnect('driver={SQL Server};server=servername\\\\instancename,port;database=testing;trusted_connection=true')
res <- sqlQuery(dbhandle, 'select * from information_schema.tables')

1) How exactly would that look like for Oracle DB using the information below?

Additional info (maybe useful):

In the tsnames.ora config file I added the following database address, which works using MS Access.

DBNAME.XXX.COM =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = DBNAME.XXX.COM)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = DBNAME.XXX.COM)
    )
  )
0 Answers
Related