I am trying to do an incremental backup level 1 using the following commands and works fine.
connect target /
backup incremental level 1 device type disk database;
backup device type disk archivelog all not backed up delete all input;
allocate channel for maintenance type disk;
delete noprompt obsolete device type disk;
release channel;
If I put the commands in a run block (except the connect) the following error occurs:
Recovery Manager: Release 11.2.0.3.0 - Production on Mon Sep 16 12:35:17 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
RMAN> connect target *
2> run {
3> backup incremental level 1 device type disk database;
4> backup device type disk archivelog all not backed up delete all input;
5> allocate channel for maintenance
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "for": expecting one of: "channel_id, double-quoted-string, identifier, single-quoted-string, "
RMAN-01007: at line 5 column 18 file: Backup_Incremental.rman