0

I am not able to connect to an oracle database from my R/Python scripts. Following is the code. TNSPing utility is able to resolve the database using LDAP. I am pasting TNSPING output as well.

TNSPing output

C:\Windows\System32>tnsping UHK00500_SECCOMPAS_APPL

TNS Ping Utility for 32-bit Windows: Version 11.2.0.2.0 - Production on 12-APR-2
013 10:26:26

Copyright (c) 1997, 2010, Oracle.  All rights reserved.

Used parameter files:
c:\apps\oracle\network\admin\sqlnet.ora

Used LDAP adapter to resolve the alias
Attempting to contact (DESCRIPTION = (SDU = 8192) (TDU = 8192) (ADDRESS_LIST = (
ADDRESS = (PROTOCOL = TCP)(HOST = PHKLOD2002-SCAN.ap.hedani.net)(PORT = 1522)) (
LOAD_BALANCE = on) (FAILOVER = on ) ) (CONNECT_DATA = (SERVICE_NAME = UHK00500_S
ECCOMPAS_APPL.WORLD) (FAILOVER_MODE = (TYPE = session) (METHOD = basic) (RETRIES
 = 20) (DELAY = 5))))
OK (60 msec)

R script output

Oracle 11g driver

chan <- odbcDriverConnect("driver=Oracle in OraHome112_32;DBQ=UHK00500_SECCOMPAS_APPL;UID=toolkit;PWD=**") Warning messages: 1: In odbcDriverConnect("driver=Oracle in OraHome112_32;DBQ=UHK00500_SECCOMPAS_APPL;UID=toolkit;PWD=**") : [RODBC] ERROR: state 08004, code 12154, message [Oracle][ODBC][Ora]ORA-12154: TNS:could not resolve the connect identifier specified 2: In odbcDriverConnect("driver=Oracle in OraHome112_32;DBQ=UHK00500_SECCOMPAS_APPL;UID=toolkit;PWD=**") : ODBC connection failed

ODBC driver output

chan <- odbcDriverConnect("Driver={Microsoft ODBC for Oracle};Server=UHK00500_SECCOMPAS_APPL;Uid=toolkit;Pwd=**") Warning messages: 1: In odbcDriverConnect("Driver={Microsoft ODBC for Oracle};Server=UHK00500_SECCOMPAS_APPL;Uid=toolkit;Pwd=*") : [RODBC] ERROR: state 08001, code 12154, message [Microsoft][ODBC driver for Oracle][Oracle]ORA-12154: TNS:could not resolve the connect identifier specified 2: In odbcDriverConnect("Driver={Microsoft ODBC for Oracle};Server=UHK00500_SECCOMPAS_APPL;Uid=toolkit;Pwd=**") : ODBC connection failed

Can someone please advice what i should check here to correct this issue?

1 Answer 1

1

not sure what the issue was, but after restarted my R instance the connection was fine.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.