Solved

databaselookup

Posted on 2014-02-24
12
224 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
 
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
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
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

757 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now