Stored connection is picking the wrong DSN from TNSNAMES.ora

We have a large corporate tnsnames.ora file, unfortunately containing many old entries with similar names, e.g.:

MYDB_OLD, MYDB_OLD.WORLD =(DESCRIPTION=...(SID=MYDB))
...
MYDB, MYDB.WORLD=(DESCRIPTION=...(SERVICE=MYDB_DG))

where MYDB is the correct working entry.

When I try and connect to MYDB set as a stored connection, PL/SQL Developer if failing to connect, but it then displays a login box that shows that it was in fact trying to connect to MYDB_OLD.

Using tnsping, or connecting to the database from sqlplus, everything is fine, so the issue appears to be with PL/SQL Developer.
 
I've found that there was an error in the tnsnames.ora file. An entry, above the one I was using, had an extra bracket in it. However, tnsping and sqlplus both still found and used the required entry, whereas PL/SQL Developer ignored it, and selected another similar entry (I presume it matched it on the SID) from the valid part of the tnsnames.ora file.

Is PL/SQL Developer doing its own parsing of the tnsnames file somehow? Now that I've corrected the file, things are working normally, but it seems odd that the behaviour of PL/SQL Developer was different to the standard Oracle tools when the file had the error.
 
Back
Top