On 4/18/07, Jared Still <jkstill@xxxxxxxxx> wrote:
On 4/17/07, GovindanK <gkatteri@xxxxxxxxxxx> wrote: > > Lot of ideas have been given about this thread. Autobackup is one good > concept. It is preferred you put the dbid as part of the media handle or > wherever you can plug that in. > The default media handle is %F, which includes the DBID. You must include %F in any custom filespec, or an error will be raised.
My favourite pain. You are indeed correct that if you miss out the %F an error occurs. Of course specifying a media handle that is utter garbage will work, but getting the idea of what should be in it wrong - that's worth an error message. RMAN> show all; RMAN configuration parameters are: CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default CONFIGURE BACKUP OPTIMIZATION OFF; CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default CONFIGURE CONTROLFILE AUTOBACKUP OFF; CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO COMPRESSED BACKUPSET; CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default CONFIGURE MAXSETSIZE TO UNLIMITED; # default CONFIGURE ENCRYPTION FOR DATABASE OFF; # default CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'C:\ORACLE\10.2.0\DB_1\DATABASE\SNCFNL102.ORA'; # default so windows then - I don't care who knows what the db on my laptop is called! RMAN> configure controlfile autobackup on; old RMAN configuration parameters: CONFIGURE CONTROLFILE AUTOBACKUP OFF; new RMAN configuration parameters: CONFIGURE CONTROLFILE AUTOBACKUP ON; new RMAN configuration parameters are successfully stored RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/oracle-l/example/%F'; old RMAN configuration parameters: CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; new RMAN configuration parameters: CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/oracle-l/example/%F'; new RMAN configuration parameters are successfully stored obviously I want that %F otherwise there might be something dubious about the file name. RMAN> backup database plus archivelog delete input; Starting backup at 18-APR-07 current log archived allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=154 devtype=DISK channel ORA_DISK_1: starting compressed archive log backupset channel ORA_DISK_1: specifying archive log(s) in backup set input archive log thread=1 sequence=66 recid=60 stamp=614628956 input archive log thread=1 sequence=67 recid=61 stamp=614636277 input archive log thread=1 sequence=68 recid=62 stamp=614672611 input archive log thread=1 sequence=69 recid=63 stamp=614680522 input archive log thread=1 sequence=70 recid=64 stamp=614939070 input archive log thread=1 sequence=71 recid=65 stamp=615026375 <snip> Finished backup at 18-APR-07 Starting Control File and SPFILE Autobackup at 18-APR-07 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03009: failure of Control File and SPFILE Autobackup command on ORA_DISK_1 channel at 04/18/2007 14:05:48 ORA-19504: failed to create file "C:\ORACLE-L\EXAMPLE\C-2226215014-20070418-00" ORA-27056: could not delete file OSD-04029: unable to get file attributes O/S-Error: (OS 3) The system cannot find the path specified. RMAN> ah well at least the dbid was there...