944 total views, 1 views today





在开启归档模式后,如果执行增加表空间、添加数据文件、redo logs等改变了数据库结构的行为,都会触发自动备份控制文件的操作。



Control File and Server Parameter File Autobackups
Having recent backups of your control file and server parameter file is extremely valuable in many recovery situations. To ensure that you have backups of these files, the database supports control file and server parameter file autobackups. The autobackup occurs independently of any backup of the current control file explicitly requested as part of your BACKUP command.

With a control file autobackup, RMAN can recover the database even if the current control file, recovery catalog, and server parameter file are inaccessible. Because the path used to store the autobackup follows a well-known format, RMAN can search for and restore the server parameter file from that autobackup. After you have started the instance with the restored server parameter file, RMAN can restore the control file from the autobackup. After you mount the control file, use the RMAN repository in the mounted control file to restore the datafiles.

When RMAN Performs Control File Autobackups
If CONFIGURE CONTROLFILE AUTOBACKUP is ON, then RMAN automatically backs up the control file and the current server parameter file (if used to start up the database) at the end of a successful BACKUP command. If the database runs in ARCHIVELOG level, RMAN makes control file autobackups when a structural change to the database affects the contents of the control file.

In addition to the last two types of automated control file backups, a special type of control file backup can be configured to occur as a direct result of database changes such as adding new tablespaces, adding datafiles, adding online redo logs, and so on. This type of automatic backup can only happen to disk. A special option of the configure controlfile autobackup command can be used to facilitate this backup. Here is an example:

RMAN> configure controlfile autobackup format for device type disk to ‘d:\backup\contf\robt_%F’

When this option is used, the Oracle RDBMS will automatically back up the control file during database structure changes that impact the control file. These changes might include adding a new tablespace, altering the state of a tablespace or datafile (for example, bringing it online), adding a new online redo log, renaming a file, adding a new redo thread, and so forth. Note that this automated backup can only be to disk, because tape is not supported. These backups can get a bit large (since the control file contains a history of many of the past backups), so make sure you allocate enough disk space to the backup directory. In spite of the additional space that will be required, these backups can be incredibly handy to have for recovery. Finally, be aware that if the backup fails for any reason, the database operation itself will not fail.