Daily Oracle

short Oracle take-away tips that you can put to use in under an hour.

Wednesday, May 23, 2007

Using ifile to centralise tnsnames.ora entries for multiple oracle homes

Tom Kyte has a great tip for centralising tns entries in one tnsnames.ora for multiple oracle homes.

The summary - maintain all tns entries in 1 tnsnames.ora.

Let's say this file is at:


In all the other tnsnames.ora, delete every thing else and type in this:


Take note that the ifile parameter is not documented, according to Tom.

The other option is to set the TNS_ADMIN environment variable but this can cause a lot of  confusion.

Imagine a situation that you did not know the TNS_ADMIN variable is set, you will be looking at all the tnsnames.ora file in all the oracle homes and wondering why all the homes use one tnsnames.ora.

The ifile option makes this explicit in the place where everyone will usually look.



Post a Comment

<< Home