Solved

databaselookup

Posted on 2014-02-24
12
237 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 77

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 77

Expert Comment

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

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
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.

 
LVL 23

Expert Comment

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

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 77

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 35

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Windows 7 does not have the best desktop search built in. This is something Windows 7 users have struggled with. You type something in, and your search results don’t always match what you are looking for, or it doesn’t actually work at all. There ar…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

679 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