Solved

databaselookup

Posted on 2014-02-24
12
230 Views
Last Modified: 2014-06-08
Why this command is not working?


-bash-3.2$ cat /etc/oratab
cat: cannot open /etc/oratab
-bash-3.2$
0
Comment
Question by:thomasliju
  • 3
  • 3
  • 3
  • +1
12 Comments
 
LVL 76

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 250 total points
ID: 39883063
>>cat: cannot open /etc/oratab

One of two reasons:
the user you are logged in as doesn't have permission
or
the file doesn't exist.
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 39883068
Post the output from the following two comamnds:
whoami
ls -al /etc/oratab
0
 
LVL 34

Assisted Solution

by:johnsone
johnsone earned 125 total points
ID: 39883139
Also, depending on your OS, /etc is not the default directory for that file.  It could exist in a different directory.  For instance, I believe that on Solaris, the default location is /var/opt/oracle.
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 23

Expert Comment

by:David
ID: 39887999
It's also possible that the database server doesn't use the oratab convention.
0
 
LVL 34

Expert Comment

by:johnsone
ID: 39888463
Even if you don't use oratab, a empty one is built during the install.  The error would indicate to me that you are looking in the incorrect location, Oracle isn't installed, or the install failed somehow.
0
 
LVL 76

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 250 total points
ID: 39888613
My guess is Oracle was installed but root.sh was not executed.  Going form memory,  root.sh is what creates the /etc/oratab and places the oraenv and coraenv scripts in /usr/local/bin among some other key pieces.
0
 
LVL 34

Expert Comment

by:johnsone
ID: 39888637
Going by users other posts, they are running solaris.  So, I would say they are looking in the incorrect location.  It should be in /var/opt/oracle, not /etc.
0
 
LVL 23

Accepted Solution

by:
David earned 125 total points
ID: 39888865
There's always:  'find / -f -name "oratab" -print'
0
 
LVL 22

Expert Comment

by:Steve Wales
ID: 40115795
I've requested that this question be closed as follows:

Accepted answer: 100 points for johnsone's comment #a39888637
Assisted answer: 100 points for dvz's comment #a39888865
Assisted answer: 100 points for slightwv's comment #a39888613
Assisted answer: 100 points for slightwv's comment #a39883063
Assisted answer: 100 points for johnsone's comment #a39883139

for the following reason:

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
 
LVL 23

Expert Comment

by:David
ID: 40115796
Consider omitting (http:#39888637): johnsone appears to reiterate his prior point.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…

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