Sunday, March 4, 2012

11gR2 new features (1)


There a nice new functionality in rman 11.2.0.3 i don't know when it was added
It checks the syntax rman script without executing.

i created following file called restore.rman  with just this :

restore database;
then I executed following :

oracle@oraclelinux TEST]$  rman checksyntax cmdfile="restore.rman"
Recovery Manager: Release 11.2.0.3.0 - Production on Thu Mar 1 16:57:49 2012
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
RMAN> restore database;2>The cmdfile has no syntax errors
Recovery Manager complete.


add following deliberate error to the file :


recover databae;

[TEST oracle@oraclelinux TEST]$  rman checksyntax cmdfile="restore.rman"
Recovery Manager: Release 11.2.0.3.0 - Production on Thu Mar 1 16:59:10 2012
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
RMAN> restore database;2> recover databaeRMAN-00571: ===========================================================RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============RMAN-00571: ===========================================================RMAN-00558: error encountered while parsing input commandsRMAN-01009: syntax error: found "identifier": expecting one of: "allow, archivelog, auxiliary, check, clear, copy, corruption, database, datafilecopy, datafile, delete, device, exclude, from, noparallel, noredo, parallel, preview, restore, skip readonly, standby, tablespace, test, undo, validate"RMAN-01008: the bad identifier was: databaeRMAN-01007: at line 2 column 9 file: restore.rman

I find this a usefull feature