Skip navigation.

RMAN checksyntax

RMAN is recommended for backups/restore of oracle databases.It is a very powerful tool and has variety of useful features.There is 'checksyntax' feature in RMAN which allows one to check RMAN scripts syntactically without executing it.This feature is available from 10G release 2.It proves to be useful for checking scriptsfor live databases where one doesnt have leisure to execute scripts any time and any times!!

bash-3.00$ vi rman_bkp.rman

RUN {
ALLOCATE CHANNEL c1 TYPE DISK FORMAT '/data/backup/Hotbkp_Full_%D_%d_%s_%p'; BACKUP database; RELEASE CHANNEL c1;
allocate channel c2 type disk;
backup format '/data/backup/Arch_%D_%d_%s_%p' archivelog all;
release channel c2;
}
EXIT;

bash-3.00$ rman checksyntax
Recovery Manager: Release 10.2.0.4.0 - Production on Wed Nov 12 17:53:13 2008
Copyright (c) 1982, 2007, Oracle. All rights reserved.
RMAN> @rman_bkp.rman
RMAN> RUN {
2> ALLOCATE CHANNEL c1 TYPE DISK FORMAT '/data/backup/Hotbackup/Hotbkp_Full_%D_%d';
3> BACKUP database;
4> RELEASE CHANNEL c1
;5> allocate channel c2 type disk;
6> crosscheck archivelog all;
7> backup format '/data/backup/Hotbackup/Arch_%D_%d' archivelog all;
8> release channel c2;
9> }

The cmdfile has no syntax errors
RMAN> EXIT;
Recovery Manager complete.
bash-3.00$