Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Editing tnsnames.ora in Linux

Posted on 2013-11-01
3
Medium Priority
?
3,710 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

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

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

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…
Suggested Courses

604 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