Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 E-mail Us
 Oracle Articles
New Oracle Articles

 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog

 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Oracle Support

 SQL Tuning

 Oracle UNIX
 Oracle Linux
 Remote s
 Remote plans
 Application Server

 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S


 Consulting Staff
 Consulting Prices
 Help Wanted!


 Oracle Posters
 Oracle Books

 Oracle Scripts

Don Burleson Blog 







The oratab File

Expert Oracle Database Tips by Donald BurlesonMarch 22, 2015

The oratab File

Also see my notes on oraenv.

When the oraenv script is run, it reads the oratab filefound in /etc to determine where the Oracle home for a given database is located.  The oratab file contains entries in the form of ORACLE_SID:ORACLE_HOME:Y, the last character being a Y or N indicating if the database should be started and stopped with the dbstart and dbstop commands, respectively.  Here is a typical oratab entry:


Lines beginning with a pound sign (#) in the oratab file are comments.  Valid entries are typically found at the end of the oratab file.

The oratab file can be edited manually using vi or another text editor.  This is often necessary if you the ORACLE_HOMEof a database should be changed.

WARNING:  Never set ORACLE_HOME and ORACLE_BASE variables manually.

Under certain circumstances, it is useful to add an entry to the oratab file that does not refer to a database.  This can allow setting the necessary variables for Oracle without having a database associated with the session.  To do that, follow the format mentioned above to add an entry, making sure to set the last character to N so the dbstart/stop commands do not attempt to start a database that is not there.  This script shows an oratab entry not associated with a database.


A dummy oratab entry like this can be useful on a system that does not yet have a database configured on it or on an Oracle Application Server or a Client install where there may never be a database.

The oratab filetypically contains an entry for each database, but in the current configuration, there is no database set up.  To use the oraenv script, set up a dummy entry in the oratab file.

The oratab file can be edited by the oracle user using vi or another text editor.  Each line in the oratab file has three elements separated by colons.  The first element is the SID, the second indicates the Oracle Home directory for that SID, and the third indicates if the database should be started and stopped by the dbstart/dbshut commands.

Edit the oratab file and add the following line:


Though a database does not exist by the name db_11g, this entry allows us to setting up the environment for this home without having to set several variables manually.  Make sure the final element is set to N so Oracle does not attempt to start a database that is not there.

With an entry now in the oratab file, use the oraenv command to set up our environment.  To do that, run .oraenv which causes the oraenv script to be run as part of the current shell rather than as a subprogram.

$ . oraenv
ORACLE_SID = [oracle] - db_11g
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1 is /u01/app/oracle

$ echo $ORACLE_SID
$ echo $PATH


Get the Complete Details on
Linux System Management for Oracle DBAs  

The landmark book "Linux for the Oracle DBA: The Definitive Reference" provides comprehensive yet specific knowledge on administering Oracle on Linux.   A must-have reference for every DBA running or planning to run Oracle on a Linux platform.

Buy it for 30% off directly from the publisher.



Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.



Oracle Training at Sea
oracle dba poster

Follow us on Twitter 
Oracle performance tuning software 
Oracle Linux poster