Solved

Editing tnsnames.ora in Linux

Posted on 2013-11-01
3
3,061 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 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 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

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 …
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…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

690 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