# IFILE declaration in tnsnames.ora

**URL:** <https://forums.toadworld.com/t/ifile-declaration-in-tnsnames-ora/31047>\
**Category:** Toad for Oracle & DevOps Toolkit\
**Created:** [September 27, 2014, 4:02am UTC](https://forums.toadworld.com/t/ifile-declaration-in-tnsnames-ora/31047 "2014-09-27T04:02:25Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![damir.vadas\_250](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/damir.vadas_250/32/37_2.png) [@damir.vadas\_250](https://forums.toadworld.com/u/damir.vadas_250)\
**Post date:** [September 27, 2014, 4:02am UTC](https://forums.toadworld.com/t/ifile-declaration-in-tnsnames-ora/31047/1 "2014-09-27T04:02:25Z")

</div>

Hi,  
Seems that Toad in latest version stil have no proper support for “IFILE” in TNSEditor. But correctly use values from them while working.  
Any info when this will be available … if any time?  
Brg,  
Damir

---

<div class="post-metadata">

**Author:** ![jbowman](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/jbowman/32/22_2.png) [@jbowman](https://forums.toadworld.com/u/jbowman)\
**Post date:** [September 29, 2014, 7:03am UTC](https://forums.toadworld.com/t/ifile-declaration-in-tnsnames-ora/31047/2 "2014-09-29T07:03:47Z")

</div>

Hey Damir,

Can you tell me what you're finding that isn’t working with IFILE in the TNSNames Editor? Based on what I’m seeing here, it looks like TOAD is handling the IFILE directive. It's just not automatically expanding the contents of the included TNS file; however that file can always be loaded into the RHS to edit it separately.

What are you hoping to see that you're currently not?

 ![TNSNames.png](https://global.discourse-cdn.com/quest/original/2X/b/ba70bfd06ebcad283ac33248f79a734fd7dac777.png)

Thanks!

-John

---

<div class="post-metadata">

**Author:** ![damir.vadas\_250](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/damir.vadas_250/32/37_2.png) [@damir.vadas\_250](https://forums.toadworld.com/u/damir.vadas_250)\
**Post date:** [September 29, 2014, 8:26am UTC](https://forums.toadworld.com/t/ifile-declaration-in-tnsnames-ora/31047/3 "2014-09-29T08:26:47Z")

</div>

John

I see list of (org tnsnames.ora and IFILE definition as well) entries in “Database” combo on login dialog.

But, in TNSNames Editor, I do not see content of IFILE TNS names entries … sorry but I cannot see them or edit as well. Maybe you could recheck that you see them?

Hope now is all more clear.

Brg  
Damir

P.S.  
Toad 12.6 x64 version

---

<div class="post-metadata">

**Author:** ![kfriday](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@kfriday](https://forums.toadworld.com/u/kfriday)\
**Post date:** [December 23, 2014, 2:08pm UTC](https://forums.toadworld.com/t/ifile-declaration-in-tnsnames-ora/31047/4 "2014-12-23T14:08:00Z")

</div>

I’m running TOAD 12.0.6.53 on win 7 and we run a local tnsnames.ora (C drv) that contains a ifile entry to our common tnsnames which lives on a network drive. Running sql\*net 11.2.0.1.0 (64 bit) and TOAD doesn’t see changes to the common/networked tnsnames. Sql plus sees the changes without issue.

SR Number:2672630

Ken

---

<div class="post-metadata">

**Author:** ![damir.vadas\_250](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/damir.vadas_250/32/37_2.png) [@damir.vadas\_250](https://forums.toadworld.com/u/damir.vadas_250)\
**Post date:** [December 24, 2014, 4:13am UTC](https://forums.toadworld.com/t/ifile-declaration-in-tnsnames-ora/31047/5 "2014-12-24T04:13:07Z")

</div>

Once again.

Toad work with IFILE declaration properly.

but please let me citate me:  
_But, in TNSNames Editor, I do not see content of IFILE TNS names entries … sorry but I cannot see them or edit as well. Maybe you could recheck that you see them?_

So this means there is no proper support for editing those values in Toad directly.  
Do not know if I need to sent more details (screens files etc)

Brg

Damir

---

<div class="post-metadata">

**Author:** ![NormTeamT](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/normteamt/32/53_2.png) [@NormTeamT](https://forums.toadworld.com/u/NormTeamT)\
**Post date:** [December 24, 2014, 10:36am UTC](https://forums.toadworld.com/t/ifile-declaration-in-tnsnames-ora/31047/6 "2014-12-24T10:36:03Z")

</div>

Evening Damien,

I think the developers are on holiday for Christmas, but speaking for myself, I use a tnsnames.ora that has two IFILE lines and a couple of entries. Only the entries that are directly listed in my file can be edited, nothing that is pulled in by the two IFILE statements can be seen.

HTH

Cheers,

Norm [TeamT]

On 24 December 2014 12:13:29 GMT+00:00, Damir Vadas [bounce-damirvadas\_250@toadworld.com](mailto:bounce-damirvadas_250@toadworld.com) wrote:

> **[RE: IFILE declaration in tnsnames.ora](http://www.toadworld.com/products/toad-for-oracle/f/10/p/22843/50833.aspx#50833)**

> Reply by Damir Vadas  
> Once again.

> Toad work with IFILE declaration properly.

> but please let me citate me:

> But, in TNSNames Editor, I do not see content of IFILE TNS names entries .... sorry but I cannot see them or edit as well. Maybe you could recheck that you see them?

> So this means there is no proper support for editing those values in Toad directly.

> Do not know if I need to sent more details (screens files etc)

> Brg

> Damir

> To reply, please reply-all to this email.
> 
> [Stop receiving emails](http://www.toadworld.com/products/toad-for-oracle/f/10/t/22843.aspx?subscribe=false) on this subject.
> 
> Or [Unsubscribe from Toad for Oracle - General](http://www.toadworld.com/products/toad-for-oracle/f/10.aspx?subscribe=false) notifications altogether.
> 
> Toad for Oracle - Discussion Forum

> [Flag](http://www.toadworld.com/products/toad-for-oracle/f/10/p/22843/50833.aspx?AbuseContentId=6adb91ad-9327-42f7-9ff2-dc07d18b1231&AbuseContentTypeId=f586769b-0822-468a-b7f3-a94d480ed9b0&AbuseFlag=true) this post as spam/abuse.

> ![](https://global.discourse-cdn.com/quest/original/3X/5/0/50b30fd5f87c85fe5cba2635cb83316ca71250d7.gif)

--

Sent from my Android device with K-9 Mail. Please excuse my brevity.

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [December 29, 2014, 8:05am UTC](https://forums.toadworld.com/t/ifile-declaration-in-tnsnames-ora/31047/7 "2014-12-29T08:05:58Z")

</div>

Ken -

I just made a change so that if you hit F5 in the TNS dropdown on the login screen, it will refresh itself from the TNSNames files (including ifiles).

Damir and Norm,

As for editing ifiles, you can just click the “Open” button in the tnsnames editor and enter the filename for the ifile - you could just copy/paste it from the main tnsnames file.

---

<div class="post-metadata">

**Author:** ![jbowman](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/jbowman/32/22_2.png) [@jbowman](https://forums.toadworld.com/u/jbowman)\
**Post date:** [December 29, 2014, 8:27am UTC](https://forums.toadworld.com/t/ifile-declaration-in-tnsnames-ora/31047/8 "2014-12-29T08:27:01Z")

</div>

Hey Ken, Norm, and Damir,

Hehe... Looks like John beat me to this as I was in the process of writing this. 🙂 I'll still post it in case it's helpful. Norm is correct. Our offices were closed for the Christmas holiday so everyone could spend the holidays with their families. My apologies for taking a bit to respond.

Unfortunately, TOAD's TNS Names editor wasn't designed to edit the contents of multiple files simultaneously within a single side of the editor. Since the IFILE directive is a reference to an external TNS Names file, it wouldn't make much sense to attempt to edit both files within a single side of the TNS Editor when another solution already exists. Attempting to parse, display, and keep track of what goes where when switching between the visual (tree-based) tab and the text editor tab would be quite a challenge -- especially if you had multiple IFILE references within a single source tnsnames.ora file. I'm not saying it couldn't be done -- quite the contrary, I'm sure we could rewrite it to support something like that if users felt it was a feature that was needed. However, many companies use IFILE entries to segment their TNS Names entries for security purposes, linking them together based on user / group security. If we allowed simultaneous editing of multiple files within a single side of the editor, it opens the door to potential security holes if the entry gets accidentally added to the wrong section within the file(s) (I'm trying to think as a security admin here). In addition, if the IFILE references are across multiple networked location, each with their own security permissions, we'd have to continually track which sections of the opened file(s) are read-only vs read-write to notify you that only partial changes to your edits could be applied. Finally, if there were nested IFILE references, that would open up a whole other level of complexity within the editor.

The easier solution (as John mentioned) would be to simply open the referenced IFIILE file in the other side of the editor. TOAD's TNS Names editor has two sides so that two tnsnames.ora files can be edited simultaneously, yet each one is treated as its own stand-alone file. Entries can be copied, moved, or deleted between them without confusion as to where they're going, and read-write issues are automatically handled. However, if it would make it a bit easier, one thing we could do is perhaps adjust the menu items off the right-click menu below for an IFILE entry to contain something like, "Open file in other editor" to help streamline the process a bit. Would that help at all?

 ![tnsnames2.png](https://global.discourse-cdn.com/quest/original/2X/e/e7894b4e0fd8eb6fc8b3df53a32276379e32c4c0.png)

Ken, it looks like John took care of your issue. If it doesn't, please feel free to let us know and we'll see what else we can do.

-John

---

<div class="post-metadata">

**Author:** ![NormTeamT](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/normteamt/32/53_2.png) [@NormTeamT](https://forums.toadworld.com/u/NormTeamT)\
**Post date:** [December 30, 2014, 9:25am UTC](https://forums.toadworld.com/t/ifile-declaration-in-tnsnames-ora/31047/9 "2014-12-30T09:25:01Z")

</div>

Nice one John, thanks.

Cheers,

Norm [TeamT]

On 29 December 2014 16:06:19 GMT+00:00, John Dorlon [bounce-jdorlon@toadworld.com](mailto:bounce-jdorlon@toadworld.com) wrote:

> **[RE: IFILE declaration in tnsnames.ora](http://www.toadworld.com/products/toad-for-oracle/f/10/p/22843/50869.aspx#50869)**

> Reply by John Dorlon  
> Ken -

> I just made a change so that if you hit F5 in the TNS dropdown on the login screen, it will refresh itself from the TNSNames files (including ifiles).

> Damir and Norm,

> As for editing ifiles, you can just click the "Open" button in the tnsnames editor and enter the filename for the ifile - you could just copy/paste it from the main tnsnames file.

> To reply, please reply-all to this email.
> 
> [Stop receiving emails](http://www.toadworld.com/products/toad-for-oracle/f/10/t/22843.aspx?subscribe=false) on this subject.
> 
> Or [Unsubscribe from Toad for Oracle - General](http://www.toadworld.com/products/toad-for-oracle/f/10.aspx?subscribe=false) notifications altogether.
> 
> Toad for Oracle - Discussion Forum

> [Flag](http://www.toadworld.com/products/toad-for-oracle/f/10/p/22843/50869.aspx?AbuseContentId=9051cd7e-5939-4c68-8643-26ef51e1fed3&AbuseContentTypeId=f586769b-0822-468a-b7f3-a94d480ed9b0&AbuseFlag=true) this post as spam/abuse.

> ![](https://global.discourse-cdn.com/quest/original/3X/5/0/50b30fd5f87c85fe5cba2635cb83316ca71250d7.gif)

--

Sent from my Android device with K-9 Mail. Please excuse my brevity.

---

<div class="post-metadata">

**Author:** ![damir.vadas\_250](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/damir.vadas_250/32/37_2.png) [@damir.vadas\_250](https://forums.toadworld.com/u/damir.vadas_250)\
**Post date:** [December 30, 2014, 11:25pm UTC](https://forums.toadworld.com/t/ifile-declaration-in-tnsnames-ora/31047/10 "2014-12-30T23:25:34Z")

</div>

Guys,

Thx…all clear.

Best wishes in 2015!

Damir

---

<div class="post-metadata">

**Author:** ![NormTeamT](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/normteamt/32/53_2.png) [@NormTeamT](https://forums.toadworld.com/u/NormTeamT)\
**Post date:** [January 26, 2015, 12:12pm UTC](https://forums.toadworld.com/t/ifile-declaration-in-tnsnames-ora/31047/11 "2015-01-26T12:12:02Z")

</div>

Hi John B,  
regarding the IFILE thingy in Toad. I've been playing with writing a parser grammar to parse a tnsnames.ora file, and I have two "useful" utilities available on my blog somewhere links later).  
The first is a tnsnames validator, which reads a tnsnames.ora file and spits out anything it's not too keen on - invalid port numbers or IP addresses, multiple DESCRIPTIONs or ADDRESSes not wrapped in DESCRIPTION\_LIST or ADDRESS\_LISt etc. It's pretty good at finding duplicates as well as parameters that have redefined a previous definition too.  
The second, might be a bit more useful. It reads a tnsnames.ora and creates a Toad 11 connections import file which can be used to import a list of connections from an IFILE into the connections grid.  
I wrote this one because my own tnsnames.ora is just a couple of IFILEs, so I grabbed the two files and pre-processed them and then imported the resulting file into the grid. Now I don't care about there being an IFILE that I can't edit - I have everything in the grid!  
You can find the downloads etc at:  
Tns2Toad importer: [http://qdosmsq.dunbar-it.co.uk/blog/2014/12/convert-a-tnsnames-ora-file-to-a-toad-session-import-file/](http://qdosmsq.dunbar-it.co.uk/blog/2014/12/convert-a-tnsnames-ora-file-to-a-toad-session-import-file/)  
Tns Validator: [http://qdosmsq.dunbar-it.co.uk/blog/2014/12/tnsnames-checker-utility/](http://qdosmsq.dunbar-it.co.uk/blog/2014/12/tnsnames-checker-utility/)  
Both utilities are free as in beer, speech, and anything else you can think of.  
Might perhaps be useful to someone?  
By the way, these utilities are my first foray into the world of "compiler" writing, be gentle with me! 😉  
Cheers,  
Norm. [TeamT]  
On 29/12/14 16:27, John Bowman wrote:

> \*RE: IFILE declaration in tnsnames.ora  
> \*
> 
> Reply by John Bowman
> 
> Hey Ken, Norm, and Damir,
> 
> Hehe... Looks like John beat me to this as I was in the process of  
> writing this. 🙂 I'll still post it in case it's helpful. Norm is  
> correct. Our offices were closed for the Christmas holiday so everyone  
> could spend the holidays with their families. My apologies for taking a  
> bit to respond.
> 
> Unfortunately, TOAD's TNS Names editor wasn't designed to edit the  
> contents of multiple files simultaneously within a single side of the  
> editor. Since the IFILE directive is a reference to an external TNS  
> Names file, it wouldn't make much sense to attempt to edit both files  
> within a single side of the TNS Editor when another solution already  
> exists.  
> ....

---

<div class="post-metadata">

**Author:** ![damir.vadas\_250](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/damir.vadas_250/32/37_2.png) [@damir.vadas\_250](https://forums.toadworld.com/u/damir.vadas_250)\
**Post date:** [January 26, 2015, 12:18pm UTC](https://forums.toadworld.com/t/ifile-declaration-in-tnsnames-ora/31047/12 "2015-01-26T12:18:41Z")

</div>

Nice work Norm, respect!

---

<div class="post-metadata">

**Author:** ![NormTeamT](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/normteamt/32/53_2.png) [@NormTeamT](https://forums.toadworld.com/u/NormTeamT)\
**Post date:** [January 26, 2015, 12:21pm UTC](https://forums.toadworld.com/t/ifile-declaration-in-tnsnames-ora/31047/13 "2015-01-26T12:21:59Z")

</div>

On 26/01/15 20:19, Damir Vadas wrote:

> \*RE: IFILE declaration in tnsnames.ora  
> \*
> 
> Reply by Damir Vadas
> 
> Nice work Norm, respect!

Thanks.  
Have fun.  
-- Cheers,  
Norm. [TeamT]
