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:

c:/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora

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

ifile=c:/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora

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.

Links

0 Comments:

Post a Comment

<< Home