OCP考题解析_042:控制文件的备份和转储
㈠ 备份
控制文件的备份和恢复在数据库的备份恢复过程中十分关键
原则是:
在数据库物理结构发生变化后备份控制文件
方法有:
① 通过操作系统命令在数据库关闭时对控制文件进行COPY
一般用于全库一致性恢复
② 利用ALTER DATABASE BACKUP CONTROLFILE TO命令将控制文件备份到二进制文件
Oracle推荐使用这种方式来备份控制文件、这也是最简单的方式、比如:
ALTER DATABASE BACKUP CONTROLFILE TO '/home/oracle/control01.bak';
③ 利用ALTER DATABASE BACKUP CONTROLFILE TO TRACE命令将重建控制文件备份的脚本备份到后台trace文件中
这种方式备份控制文件会丢失归档日志历史等许多信息
在重建控制文件时,只读表空间和脱机的数据文件的处理相对比较复杂
比如,OCP_043有道题目:
4. You backed up the control file to trace. Which statement is true about the trace file generated? A. The trace file is in binary format. B. The trace file has a SQL scripts to re-create the control file. C. The trace file is a backup set created during the backup of the control file. D. The trace file contains the instructions to manually re-create the control file. E. The trace file is an image copy of the control file created during the backup of the the control file. answer: B