init.sh 419 B

12345678910111213
  1. #!/usr/bin/env bash
  2. DB_INITIALISED="/opt/oracle/oradata/dbinit"
  3. #[ -f ${DB_INITIALISED} ] && exit
  4. #touch ${DB_INITIALISED}
  5. if [ -f ${DB_INITIALISED} ]; then
  6. echo 'File exists. Standards for have been Init'
  7. exit
  8. else
  9. echo 'File does not exist. Standards for first time Strart up this DB'
  10. "$ORACLE_HOME"/bin/sqlplus -s "/ as sysdba" @"/opt/oracle/scripts/startup/init_user.script";
  11. touch ${DB_INITIALISED}
  12. fi