?
Solved

Editing tnsnames.ora in Linux

Posted on 2013-11-01
3
Medium Priority
?
3,357 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 14

Accepted Solution

by:
comfortjeanius earned 2000 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 35

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
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…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses
Course of the Month12 days, 11 hours left to enroll

777 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