Database Reference
In-Depth Information
To restore an automatic control file backup after the loss of all current control files, the data-
base identifier needs to be set with the command SET DBID . 2
C:> rman target /
Recovery Manager: Release 10.2.0.1.0 - Production on Mon Jul 2 18:32:08 2007
connected to target database: TEN (not mounted)
RMAN> SET DBID 2848896501;
executing command: SET DBID
RMAN> RUN {
RESTORE CONTROLFILE FROM AUTOBACKUP;
}
Starting restore at 02.07.07 18:32
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
channel ORA_DISK_1: looking for autobackup on day: 20070702
channel ORA_DISK_1: autobackup found: c-2848896501-20070702-02
channel ORA_DISK_1: control file restore from autobackup complete
output filename=C:\ORADATA\TEN\CONTROL01.CTL
Finished restore at 02.07.07 18:32
The default format for automatic control file backups is %F . This translates to C- database_
id - YYYYMMDD - QQ, where QQ represents a hexadecimal sequence number between 0 and FF
(0-256 in decimal). The remaining format string adheres to the well known SQL date and time
format models. In case a custom format has been configured—which I strongly discourage—a
RESTORE command for an automatic control file backup must be preceded by the command SET
CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE device_type TO ' autobackup_format ' , to let RMAN
know the non-default format. By the way, it is undocumented how RMAN uses the hexadecimal
sequence number QQ . It serves to generate unique file names for automatic control file backups
within a single day. Remember that due to the date format “YYYYMMDD” without a time
component, all automatic control file backups within a single day would have the same file-
name or handle ( V$BACKUP_PIECE.HANDLE ). As the clock strikes 12 and a new day is about to
dawn, RMAN begins using the new value of “YYYYMMDD” and resets QQ to zero. But what if
more than 256 automatic control file backups were written within a single day? Then RMAN
leaves QQ at FF and overwrites the backup piece with sequence FF ( QQ =FF). Here is the proof:
SQL> SELECT completion_time, handle
FROM v$backup_piece
WHERE handle LIKE '%FF';
COMPLETION_TIME HANDLE
--------------- ------------------------
02.07.07 22:04 C-2848896501-20070702- FF
After another automatic control file backup on the same day, the backup piece name has
been reused and the query yields:
2.
In Oracle10 g , it is possible to embed the database identifier in the backup piece name by using the
placeholder %I in the FORMAT specification. Thus, even if no log files from past backups remain, the
database identifier may be derived from the backup piece names in the media manager repository.
 
Search WWH ::




Custom Search