Hi,
I have the following RMAN incremental shell script:
# !/bin/bash
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export ORACLE_SID=ORCL
export PATH=$PATH:${ORACLE_HOME}/bin
rman target=/ << EOF
run {
allocate channel d1 type disk FORMAT '/u01/app/oracle/backup/Daily_%U_%t';
allocate channel d2 type disk FORMAT '/u01/app/oracle/backup/Daily_%U_%t';
allocate channel d3 type disk FORMAT '/u01/app/oracle/backup/Daily_%U_%t';
backup incremental level 1 tag Daily_Diff_Backup
format '/u01/app/oracle/backup/Daily_%T_L1_%db_df_%U_%t';
sql 'alter system archive log current';
sql 'alter system archive log current';
backup tag ORCL_ARCHIVE
archivelog all
format '/u01/app/oracle/backup/al_%t_%s_p_ARCHIVE'
delete all input;
backup tag ORCL_CONTROL
current controlfile
format '/u01/app/oracle/backup/cf_%t_%s_p_CONTROL';
crosscheck archivelog all;
delete noprompt expired archivelog all;
crosscheck backup;
delete noprompt expired backup;
release channel d1;
release channel d2;
release channel d3;
}
EXIT
EOF
And, when I run it, I am getting errors like:
$ ./rman.sh
Recovery Manager: Release 11.2.0.1.0 - Production on Tue Dec 17 12:17:20 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: CTSDEV (DBID=1899476973)
RMAN>
RMAN> 2> 3> 4> 5> 6> 7> 8> 9>
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: "archivelog, as, auxiliary, backupset, backup,
RMAN-01007: at line 10 column 61 file: standard input
RMAN>
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: d1
RMAN-01007: at line 2 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 "identifier": expecting one of: ";"
RMAN-01008: the bad identifier was: d2
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 "identifier": expecting one of: ";"
RMAN-01008: the bad identifier was: d3
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
RMAN-01007: at line 1 column 1 file: standard input
Could anyone tell me what error I have made in the script?