鄙人脚本如下:
# script.:BackFull.sh
# creater:zhangzehui
# date:2013/8/21
# desc:backup full database datafile in archive with rman
# connect database
export ORACLE_BASE=/home/oracle/app
export ORACLE_HOME=$ORACLE_BASE/oracle/product/11.2.0/dbhome_1
export ORACLE_SID=orcl
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
rman target/ << EOF_RMAN
run{
allocate channel cl type disk;
backup incremental level 0 tag 'db0' format
'/home/oracle/app/RmanBackup/db0_%d_%T_%s' database include current controlfile;
delect noprompt obsolete;
release channel c1;
}
# end
报错如下:
./BackupFull.sh: line 18: warning: here-document at line 10 delimited by end-of-file (wanted `EOF_RMAN')
Recovery Manager: Release 11.2.0.1.0 - Production on Wed Aug 21 19:31:24 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORCL (DBID=1350755061)
RMAN> 2> 3> 4> 5>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "identifier": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, convert, copy, crosscheck, delete, duplicate, execute, flashback, host, mount, open, recover, release, repair, report, restore, resync, send, set, show, shutdown, sql, startup, switch, transport, validate, }"
RMAN-01008: the bad identifier was: delect
RMAN-01007: at line 5 column 1 file: standard input
RMAN>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "identifier": expecting one of: ";"
RMAN-01008: the bad identifier was: c1
RMAN-01007: at line 1 column 17 file: standard input
RMAN>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "}": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, connect, convert, copy, create, crosscheck, delete, drop, duplicate, exit, flashback, grant, host, import, list, mount, open, print, quit, recover, register, release, repair, replace, report, reset, restore, resync, revoke, run, send, set, show, shutdown, spool, sql, startup, switch, transport, unregister, upgrade, validate, {, "
RMAN-01007: at line 1 column 1 file: standard input
RMAN> 2>
Recovery Manager complete.