Advertisement
Guest User

Untitled

a guest
Dec 14th, 2019
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.30 KB | None | 0 0
  1. #!/bin/bash
  2. export ORACLE_SID=orcl
  3. export ORAENV_ASK=NO
  4. check_stat=`ps -ef|grep ${ORACLE_SID}|grep pmon|wc -l`;
  5. oracle_num=`expr $check_stat`
  6. if [ $oracle_num -lt 1 ]
  7. then
  8. . oraenv
  9. rlwrap sqlplus sys/oracle as sysdba <<-EOF
  10. startup
  11. EOF
  12. else
  13. . oraenv
  14. rlwrap sqlplus sys/oracle as sysdba
  15. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement