hi
when i test a hot backup script, it stopped after exit from sqlplus at the first time. but it should enter sqlplus 3 times. what's the reason of this? help plz.
the script is here:
#!/bin/bash
#
# Set up environment variables:
ORACLE_SID=odb; export ORACLE_SID
ORACLE_BASE=/ora01/app/oracle; export ORACLE_BASE
ORAENV_ASK=NO; export ORAENV_ASK
. oraenv
DT=`date +%Y.%m.%d`

sqlplus internal <
alter tablespace SYSTEM begin backup;
!tar -cvf /export/Hot_Backup/Backup-$DT.tar $ORACLE_BASE/oradata/oradb/system01.dbf
alter tablespace SYSTEM end backup;

alter tablespace RBS begin backup;
!tar -rvf /export/Hot_Backup/Backup-$DT.tar $ORACLE_BASE/oradata/oradb/rbs01.dbf
alter tablespace RBS end backup;

alter tablespace DATA begin backup;
!tar -rvf /export/Hot_Backup/Backup-$DT.tar /home/datafile/*
alter tablespace DATA end backup;

alter tablespace INDX begin backup;
!tar -rvf /export/Hot_Backup/Backup-$DT.tar $ORACLE_BASE/oradata/oradb/indx01.dbf
alter tablespace INDX end backup;

alter tablespace TEMP begin backup;
!tar -rvf /export/Hot_Backup/Backup-$DT.tar $ORACLE_BASE/oradata/oradb/temp01.dbf
alter tablespace TEMP end backup;

alter tablespace TOOLS begin backup;
!tar -rvf /export/Hot_Backup/Backup-$DT.tar $ORACLE_BASE/oradata/oradb/tools.dbf
alter tablespace TOOLS end backup;

alter tablespace DRSYS start backup;
!tar -rvf /export/Hot_Backup/Backup-$DT.tar $ORACLE_BASE/oradata/oradb/drsys01.dbf
alter tablespace DRSYS end backup;

archive log stop

exit
EOFarch1

FILES=`ls $ORACLE_BASE/admin/oradb/arch/arch*.dbf`; export FILES

sqlplus internal < archive log start;
exit
EOFarch2

tar -rvf /export/Hot_Backup/Backup-$DT.tar $FILES
rm -f $FILES

sqlplus internal < alter database backup controlfile to
'/export/Hot_Backup/ControlFile/odb/controlfile.bck';
exit
EOFarch3

tar -rvf /export/Hot_Backup/Backup-$DT.tar /export/Hot_Backup/ControlFile/oradb/controlfile.bck