Solved

Editing tnsnames.ora in Linux

Posted on 2013-11-01
3
2,266 Views
Last Modified: 2013-11-11
I am adding two entries to the tnsnames,ora file on linux server.

First there are two tnsnames.ora file:

/u01/app/oracle/product/11.1.0/client_1/network/admin/tnsnames.ora
/u01/app/oracle/product/11.2.0/network/admin/tnsnames.ora

how I determine which one to use?

another thing is when I open the file for editing with vi editor, then i hit "i" and get a warning:

-- INSERT -- W10: Warning: Changing a readonly file

than I add new entries and try to save it using :w, I get a warning "E45: 'readonly' option is set (add ! to override) " 

So I try :w! to save it and get "tnsnames.ora" E212: Can't open file for writing"

Can someone tell me how do I make changes to tnsnames.ora?

I am a UNIX user and my UNIX skill don't seem to apply to Linux
0
Comment
Question by:YZlat
3 Comments
 
LVL 14

Accepted Solution

by:
comfortjeanius earned 500 total points
ID: 39617904
Did you try to ls -l these file location

/u01/app/oracle/product/11.1.0/client_1/network/admin/tnsnames.ora
/u01/app/oracle/product/11.2.0/network/admin/tnsnames.ora

You need to change the file for editing

chmod 777 /u01/app/oracle/product/11.2.0/network/admin/tnsnames.ora

then try to edit it save it and change the permission back.


If that does not work you can always su to root.
0
 
LVL 34

Expert Comment

by:Seth Simmons
ID: 39618192
first of all, seems you have multiple oracle versions installed either client for 11.1 and 11.2 or client/server different versions.  need to edit the one that matches the sqlplus version

second, don't make the file world-writeable.  edit the file properly with the oracle account (or whatever account owns it).  changing things like that to world-writeable is asinine and unnecessary
0
 
LVL 35

Author Closing Comment

by:YZlat
ID: 39638919
After I su to oracle it worked
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now