Home » RDBMS Server » Server Administration » Modify TNSNAMES.ORA from batch
icon5.gif  Modify TNSNAMES.ORA from batch [message #178864] Fri, 23 June 2006 03:50 Go to next message
Pedro72
Messages: 3
Registered: June 2006
Junior Member
Hi!

I have created some scripts (cmd and sql) for an automatic installation of the db instance (9iR2 on Win XP Pro).

The only issue I still have is how to modify the tnsnames.ora from my script.

Does Oracle provide a tool (for instance like orapwd) for adding/updating/deleting the tnsnames entries?

Regards,
P.
Re: Modify TNSNAMES.ORA from batch [message #178881 is a reply to message #178864] Fri, 23 June 2006 04:47 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
You can use a Net*Assistant or net manager or whatever it is called. But is a GUI tool.
In unix, there are simple utilities like sed, with which you can edit the file on the fly.
In windows, you can simply append your entries.
D:\>type file.ora
line 1
D:\>type file2.ora
line2
D:\>type file2.ora >> file.ora
D:\>type file.ora
line 1

line2

Re: Modify TNSNAMES.ORA from batch [message #178890 is a reply to message #178881] Fri, 23 June 2006 05:38 Go to previous message
Pedro72
Messages: 3
Registered: June 2006
Junior Member
Thanks for your reply.

Creating a new entry seems to be very simple. But if there is already an existing entry, how can I remove it first from the tnsnames.ora? AFAIK the length of an entry is variable due to some optional parameters (e.g. SERVER=DEDICATED)

P.

[Updated on: Fri, 23 June 2006 06:00]

Report message to a moderator

Previous Topic: Cannot run any patch installer on Win XP Pro SP2
Next Topic: database writers and async I/O
Goto Forum:
  


Current Time: Sat Jan 25 14:02:04 CST 2025