Automatic Database Start after server restart

you need to create 2 file for startup and shutdown according to your machine startup type:
1) startup – /etc/rc0.d/K98dbora
2) shutdown – /etc/rc2.d/S98dbora

Both files should have the text:
=========================================================================

#! /bin/sh

#
#
# start/stop the oracle database
ORA_HOME=<your oracle installation path>
ORA_OWNER=oracle
if [ ! -f $ORA_HOME/bin/dbstart -o ! -d $ORA_HOME ]
then
exit
fi

case “$1″ in
‘start’)
echo `date` ” Start the oracle database ”
su – $ORA_OWNER -c “$ORA_HOME/bin/dbstart”
su – $ORA_OWNER -c “$ORA_HOME/bin/lsnrstart”
;;
‘stop’)
echo `date` ” Stop the oracle database ”
su – $ORA_OWNER -c “$ORA_HOME/bin/dbshut”
su – $ORA_OWNER -c “$ORA_HOME/bin/lsnrshut”
;;
esac

=========================================================================