if ! ps -ef | grep -v "grep tnslsnr" | grep tnslsnr then lsnrctl start sqlplus / as sysdba <<EOF startup force exit EOF fi if ! ps -ef | grep -v "grep ora_pmon_$ORACLE_SID" | grep ora_pmon_$ORACLE_SID then. sqlplus / as sysdba <<EOF startup force exit EOF fi