Derive ORACLE_HOME, ORACLE_SID and if database is set up for automatic start up after reboot.
See also : DBA Tips and Tricks - Part 2
See also : DBA Tips and Tricks - Part 2
[oracle@usha /]$ cat /etc/oratab # # This file is used by ORACLE utilities. It is created by root.sh # and updated by the Database Configuration Assistant when creating # a database. # A colon, ':', is used as the field terminator. A new line terminates # the entry. Lines beginning with a pound sign, '#', are comments. # # Entries are of the form: # $ORACLE_SID:$ORACLE_HOME:<N|Y>: # # The first and second fields are the system identifier and home # directory of the database respectively. The third filed indicates # to the dbstart utility that the database should , "Y", or should not, # "N", be brought up at system boot time. # # Multiple entries with the same $ORACLE_SID are not allowed. # # testdb:/u01/app/oracle/product/11.2.0/db_1:Y [oracle@usha /]$ Now lets derive OTACLE_HOME, ORACLE_SID, AUTO_START from the oratab using UNIX commands. [oracle@usha /]$ cat /etc/oratab |egrep ':N|:Y' testdb:/u01/app/oracle/product/11.2.0/db_1:Y [oracle@usha /]$ cat /etc/oratab |egrep ':N|:Y'|grep -v \* testdb:/u01/app/oracle/product/11.2.0/db_1:Y [oracle@usha /]$ cat /etc/oratab |egrep ':N|:Y'|cut -f1 -d':' testdb [oracle@usha /]$ cat /etc/oratab |egrep ':N|:Y'|cut -f2 -d':' /u01/app/oracle/product/11.2.0/db_1 [oracle@usha /]$ cat /etc/oratab |egrep ':N|:Y'|cut -f3 -d':' Y [oracle@usha /]$ ORACLE_SID=`cat /etc/oratab |egrep ':N|:Y'|cut -f1 -d':'` [oracle@usha /]$ echo $ORACLE_SID testdb [oracle@usha /]$ ORACLE_HOME=`cat /etc/oratab |egrep ':N|:Y'|cut -f2 -d':'` [oracle@usha /]$ echo $ORACLE_HOME /u01/app/oracle/product/11.2.0/db_1 [oracle@usha /]$ AUTO_START=`cat /etc/oratab |egrep ':N|:Y'|cut -f3 -d':'` [oracle@usha /]$ echo $AUTO_START Y [oracle@usha /]$ |