The principle of the backup control file is to back up the control file after the physical structure of the database changes.
1. trace: used to control file reconstruction (the generated trace file is in udump)
SQL> alter database backup controlfile to trace;
Database altered.
The following is a backup of the control file:
Create controlfile reuse database "LX01" NORESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 1
# MAXLOGHISTORY 292
LOGFILE
GROUP 1 (
'/Disk2/lx01/oradata/redo01a. log ',
'/Disk1/lx01/oradata/redo01b. Log'
) SIZE 10 M,
GROUP 2 (
'/Disk2/lx01/oradata/redo02a. log ',
'/Disk1/lx01/oradata/redo02b. Log'
) SIZE 10 M,
GROUP 3 (
'/Disk2/lx01/oradata/redo03a. log ',
'/Disk1/lx01/oradata/redo03b. Log'
) SIZE 10 M,
GROUP 4 (
'/Disk2/lx01/oradata/redo04a. log ',
'/Disk1/lx01/oradata/redo04b. Log'
) SIZE 10 M,
GROUP 5 (
'/Disk1/lx01/oradata/redo05b. log ',
'/Disk2/lx01/oradata/redo05a. Log'
) SIZE 10 M
-- STANDBY LOGFILE
DATAFILE
'/U01/app/Oracle/oradata/lx01/system01.dbf ',
'/U01/app/oracle/oradata/lx01/rtbs01.dbf ',
'/U01/app/oracle/oradata/lx01/sysaux01.dbf ',
'/U01/app/oracle/oradata/lx01/user01.dbf ',
'/U01/app/oracle/oradata/lx01/small_undo01.dbf ',
'/U01/app/oracle/oradata/lx01/test01.dbf ',
'/U01/app/oracle/oradata/lx01/users02.dbf ',
'/U01/app/oracle/oradata/lx01/user03.dbf ',
'/U01/app/oracle/oradata/lx01/undo01.dbf ',
'/U01/app/oracle/oradata/lx01/indexes01.dbf'
Character set ZHS16GBK
;
......
2. binary File: Back up the control file as a binary file.
SQL> alter database backup controlfile to '/disk1/lx01/oradata/control. Bak ';
Database altered.
3. Differences Between TRACE files, BAK files, and dump files
A. the trace file contains the reconstruction script of the control file. When the physical structure of the database changes, trace it. Otherwise, it will be lost and the latest one will be used for recovery.
B. The bak file is a copy of the controlfile, which contains all the information such as the checkpoint. data inconsistency may occur when you use it for backup. The database cannot be opened to the open state.
C. The dump file is used to view the content in the controlfile and cannot be used to restore the control file.