Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RMAN - using cmdfile

Status
Not open for further replies.

ErrolDC

MIS
Joined
May 26, 2004
Messages
72
Location
US
Is it possible to use the 'list' or 'report' commands in rman? When I do so, rman throws an error.

Code:
oracle@mipt01 # cat rman.commands
run {
backup database;
backup archivelog all delete input;
crosscheck archivelog all;
crosscheck backup;
restore database validate;
restore archivelog all validate;
report unrecoverable;
report schema;
report need backup
report obsolete;
delete noprompt expired backup of database;
delete noprompt expired backup of controlfile;
}
exit

the result is..

Code:
oracle@mipt01 # rman target / catalog rman/XXXXX@rman cmdfile='rman.commands'

Recovery Manager: Release 9.2.0.1.0 - 64bit Production

Copyright (c) 1995, 2002, Oracle Corporation.  All rights reserved.

connected to target database: TKBPROD (DBID=3641847905)
connected to recovery catalog database

RMAN> run {
2> backup database;
3> backup archivelog all delete input;
4> crosscheck archivelog all;
5> crosscheck backup;
6> restore database validate;
7> restore archivelog all validate;
8> list
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01005: syntax error: found "list": expecting one of: "allocate, alter, backup, beginline, blockrecover, catalog, change, copy, crosscheck, configure, duplicate, debug, delete, execute, endinline, host, mount, open, plsql, recover, release, replicate, report, restore, resync, }, set, setlimit, sql, switch, startup, shutdown, send, show, validate"
RMAN-01007: at line 8 column 1 file: rman.commands
oracle@mipt01 #

Is this to be expected?

 
Afaik, you have to specify some object with 'report unrecoverable', e.g.
report unrecoverable database;
And btw, two lines later there is a semicolon missing. And you may have to specify objects in other lines as well.
hth
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top