Solved

databaselookup

Posted on 2014-02-24
12
240 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
[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
  • 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
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

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Syntax Question 9 57
Logrotate Every Saturday 5 44
update based on the value on another table 8 40
cmake and message 1 23
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
Fine Tune your automatic Updates for Ubuntu / Debian
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

739 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