Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 251
  • Last Modified:

databaselookup

Why this command is not working?


-bash-3.2$ cat /etc/oratab
cat: cannot open /etc/oratab
-bash-3.2$
0
thomasliju
Asked:
thomasliju
  • 3
  • 3
  • 3
  • +1
4 Solutions
 
slightwv (䄆 Netminder) Commented:
>>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
 
slightwv (䄆 Netminder) Commented:
Post the output from the following two comamnds:
whoami
ls -al /etc/oratab
0
 
johnsoneSenior Oracle DBACommented:
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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
DavidSenior Oracle Database AdministratorCommented:
It's also possible that the database server doesn't use the oratab convention.
0
 
johnsoneSenior Oracle DBACommented:
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
 
slightwv (䄆 Netminder) Commented:
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
 
johnsoneSenior Oracle DBACommented:
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
 
DavidSenior Oracle Database AdministratorCommented:
There's always:  'find / -f -name "oratab" -print'
0
 
Steve WalesSenior Database AdministratorCommented:
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
 
DavidSenior Oracle Database AdministratorCommented:
Consider omitting (http:#39888637): johnsone appears to reiterate his prior point.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 3
  • 3
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now