Toad doesn't re-read tnsnames IFILE (14.0.0.314)

My tnsnames.ora uses IFILE to reference other files. In general, this works fine. One issue I have though is that it seems the IFILE's aren't re-read without starting a new Toad instance.

For example:

  1. tnsnames.ora includes a line:

     IFILE=C:\oracle\admin\tnsnames_global.ora
    
  2. Connect to something defined in this file

  3. Edit the connection details in the IFILE

  4. Make a new connection to that entry. The changes made to the IFILE don't seem to be picked up until Toad is restarted

When changing a normal tnsnames.ora file, it seems that the file is re-read at the point the New Connection dialog is opened. Would it be possible for IFILE's to be re-read in a similar way?

Hi Paul,

I was able to reproduce what you were seeing. I think there is definitely room for improvement there and have noted it to see how it can be improved. We'll see what we can do to improve this in the future.

In the meantime, you can get around this issue by pressing the F5 key on the login window to refresh the TNSNames list in Toad. Feel free to give that a shot and let us know if that helps with what you're seeing.

-John

I can see pressing F5 refreshes the list in the database drop down on the right hand side, but it doesn't seem to to help with this particular issue.

Just to make sure my example is clear:

  1. Add an IFILE to your tnsnames.ora, eg IFILE=C:\oracle\admin\tnsnames_global.ora
  2. Define a new connection in C:\oracle\admin\tnsnames_global.ora
  3. Connect to that in Toad
  4. Edit that connection (eg change the host)
  5. Try to connect to that again in Toad. The only way I can get Toad to recognise the host has changed is to start a new instance. Pressing F5 in the login window doesn't seem to help in this scenario

Are you saying that it attempts to connect to whatever host was defined initially? That may be in the Oracle client. Toad only references the Alias in the connect string that we send to Oracle when making a connection.

Yes, although changing the host is just an example, I think it's any change to the definition. Launching a new Toad session will pick up the amended entry. It kinda feels like it's being cached. Note I'm only seeing this with an IFILE - a standalone tnsnames file works fine.

It's interesting to note that from the connection dialog, the "TNSPing Server" button does seem to be seeing changes in real-time - it's just when actually connecting that it uses the original version

Right, and that's on the Oracle client.

If your TNSNames entry looks like this:
ORCLDB =
(DESCRIPTION =
(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = server1)(PORT = 1521)))
(CONNECT_DATA = (SID = ORCL)))

The only thing Toad sends to Oracle when making a connection is username, password, and ORCLDB. It's up to the Oracle client to figure out what ORCLDB means.

That makes sense, but why would it then be "cached" (for want of a better word) for that Toad instance, and a new Toad instance get the updated version?

That I don't know, sorry.