Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

ODBC connectivity issues

user-x7vhsMay 23 2023

Having problems connecting to an Oracle table using an ODBC. I have done this with another Oracle database and it works fine, but for some reason this second time it is not working. I have configured my TNSNAMES file with the connection information, but I am getting the error ORA-12504: TNS: listener was not given the SERVICE_NAME in CONNECT_DATA. I have set a default listener in the listener configuration, and the service name is certainly in the TNS configuration. I can connect to this database using SQLPLUS and using SQL Developer without issue, but for some reason using the ODBC connection it fails.

Listener file (Replaced listener info with XXXX)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\Oracle19c\WINDOWS.X64_193000_db_home)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:C:\Oracle19c\WINDOWS.X64_193000_db_home\bin\oraclr19.dll")
)
)

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = XXXXXX)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)

DEFAULT_SERVICE_LISTENER= XXXXXX

TNSNAMES:

MY SERVICE NAME =
(DESCRIPTION =
(ADDRESS =
(PROTOCOL = TCP)(HOST = IP ADDRESS)(PORT = 1521)
)
(CONNECT DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = MY SERVICE NAME)
)
)

Comments
Post Details
Added on May 23 2023
0 comments
221 views