user1009073
user1009073

Reputation: 3238

Connecting to Oracle PDB via ODBC

I have a LOCAL Oracle 19c database. I am trying to get ADO to connect to it. The first step is to get ODBC working. I have one PDB container called orclpdb, which is what I want to use. I can connect from SQL*Plus...

Y:\INSTALL_UNZIP\bin\sqlplus.exe acs/<Password>@localhost:1521/orclpdb

I go into the 64-bit ODBC Administrator, and had to fight a little bit (adding OCI_LIB32 and TNS_ADMIN paths), but finally got the ODBC Admin tool to connect, but ONLY to the root/system database. My root question is 'How do I get ODBC administrator to connect to a specific container DB?

Within the ODBC Administrator, the TNS Service Name field dropdown only shows ORCL, not orclpdb. Again, I can connect using ORCL, but as system/.

UPDATE: Due to issues such as this, I switched most apps to Devart's Oracle Data Access components to Delphi. They have a DIRECT mode, which does not need SQL*Net or TNS stuff .

Upvotes: 0

Views: 932

Answers (1)

pmdba
pmdba

Reputation: 7033

Make sure your TNS_ADMIN/tnsnames.ora file has an entry for the PDB (orclpdb).

Upvotes: 1

Related Questions