Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Updating TNSNAMES.ORA file from the command line?

Re: Updating TNSNAMES.ORA file from the command line?

From: <mpir_at_compuserve.com>
Date: 1998/12/05
Message-ID: <74c33q$ri4$1@nnrp1.dejanews.com>#1/1

There are really two answers to your problem, in my experience.

1-Once a tnsnames.ora has been set up my EasyConfig, you have to allways use EasyConfig to update it. This is not necessaryily bad, if you like gui's. In fact, if you are looking to see if a db/instance is there, the gui does list all the entries.

2-Once you edit tnsnames.ora outside of EasyConfig, forever more you use a text editor to do so. This is actually the approach I use, but I am an old timer. Cut and paste works wonders. So does an editor's search command.

If you need to determine if an instance is configured, and do not want to use an editor, try tnsping. It will use tnsnames.ora to ping an instance or give you the notorious 'cannot resolve instance' error (error 125xx, I don't have my references with me.)

In article <749pr3$og4$1_at_news-2.csn.net>,   "Sheila Hatfield" <Sheila.Hatfield_at_experian.com> wrote:
> We have an application that uses a variety of databases on our clients
> sites. They need access to these databases
> and our installation program needs to configure their TNSNAMES.ORA and
> SQLNET.ORA files correctly to connect up and run our application. (The
> databases which need to be configured are normally in flux, we'd like a
> dynamic way of updating the
> clients oracle configuration.)
>
> Two problems:
> 1. If we modify the either of these files outside of the SQLNet Easy
> Configuration utility the file(s) are marked as invalid, and the next time
> you do use the try to use the utility the changes the installtion program
> made are lost.
> 2. Also it's a time consuming task to parse through this file and determine
> if an entry for a database already exists in the file, and if so to update
> the entry correctly with new information.
>
> Does anyone know of a way to update this file from the command line or a
> utility that would do this ? And also possibly have the changes be accepted
> by the SQL Net Easy Config?
>
> Any help or info is appreciated. Please send a copy of your response to
> Sheila.Hatfield_at_experian.com
> Thanks!
>
> ~~
> Sheila Hatfield
> Software Engineer, Experian Database Marketing Solutions -- Denver, CO
> Sheila.Hatfield_at_experian.com
>
>

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Sat Dec 05 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US