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有道题目:

3. One of the tablespace is read-only in your database. The loss of all 
control file forced you to recreate the control file. Which operation do 
you need to perform after re-creating the control file and opening the 
database? 

A. Drop and re-create the read-only tablespaces 
B. Rename the read-only data file to their correct file names. 
C. Change the tablespace status from read/write to read-only. 
D. Re-create the read-only tablespace because it is automatically removed.
 
Answer: B 


       
       ㈡ 转储
          

          oradebug必须以SYSDBA形式登陆后方能使用,可参看oradebug使用介绍

          

          


idle> conn / as sysdba
Connected.
sys@ORCL> oradebug setmypid
Statement processed.
sys@ORCL> oradebug dump controlf 3;    
Statement processed.
sys@ORCL> oradebug tracefile_name;
/u01/app/oracle/admin/orcl/udump/orcl_ora_7489.trc


       ㈢ OCP考题

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 


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值