网站首页
JSP空间
动态资讯
开源项目
技术文档
资源下载
J2EE资源
客户论坛
在线支付
 
  技术文档>>数据库技术>>Oracle技术>>Oracle开发>查看文档  
  从自动备份中恢复控制文件和spfile文件     
  文章作者:未知  文章来源:赛迪网技术社区  
  查看:109次  录入:管理员--2007-11-22  
 

当我们启用自动控制文件备份功能后,如果数据库发生重要改变或备份完成时,它会自动进行控制文件备份,同时它也会备份spfile文件。 style="text-indent:2em">有关什么时间来进行自动备份,请参考oracle的以下说明:

when rman performs control file autobackups

by default, control file autobackups are turned off, and no control file 
autobackups are performed. 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) in one of two circumstances:
 

when a successful backup must be recorded in the rman repository, 
and when a structural change to the database affects the contents of the 
control file which therefore must be backed up.

下面的这个例子主要用来说明如何通过自动备份恢复控制文件和spfile文件。

◆查询当前拥有的备份

$ rman target /

recovery manager: release 10.1.0.2.0 - 64bit production

copyright (c) 1995, 2004, oracle.  all rights reserved.

connected to target database: eygle (dbid=1337390772)

rman> list backup of controlfile;

using target database controlfile instead of recovery catalog

list of backup sets
===================

bs key  type lv size       device type elapsed time completion time
------- ---- -- ---------- ----------- ------------ ---------------
26      full    3m         disk        00:00:02     29-mar-05      
        bp key: 26   status: available  compressed: no  
tag: tag20050329t171049
        piece name: /data5/flash_recovery_area/eygle/autobackup
/2005_03_29/o1_mf_s_554231449_14l6wv59_.bkp
  controlfile included: ckp scn: 10643029     ckp time: 29-mar-05

bs key  type lv size       device type elapsed time completion time
------- ---- -- ---------- ----------- ------------ ---------------
27      full    3m         disk        00:00:02     29-mar-05      
        bp key: 27   status: available  compressed: no  
tag: tag20050329t222158
        piece name: /data5/flash_recovery_area/eygle/autobackup
/2005_03_29/o1_mf_s_554250117_14ls48bd_.bkp
controlfile included: ckp scn: 10652118     
ckp time: 29-mar-05

◆从备份中恢复控制文件

rman> restore controlfile to '/tmp/control.ctl' from 
'/data5/flash_recovery_area/eygle/autobackup/2005_03_29/o1_mf_s_554250117_14ls48bd_.bkp';

starting restore at 30-mar-05
allocated channel: ora_disk_1
channel ora_disk_1: sid=134 devtype=disk

channel ora_disk_1: restoring controlfile
channel ora_disk_1: restore complete
finished restore at 30-mar-05

◆从备份中恢复spfile文件

rman> restore spfile to '/tmp/spfileeygle.ora' from 
'/data5/flash_recovery_area/eygle/autobackup/2005_03_29/o1_mf_s_554250117_14ls48bd_.bkp';

starting restore at 30-mar-05
using channel ora_disk_1

channel ora_disk_1: autobackup found: 
/data5/flash_recovery_area/eygle/autobackup/2005_03_29/o1_mf_s_554250117_14ls48bd_.bkp
channel ora_disk_1: spfile restore from autobackup complete
finished restore at 30-mar-05

rman>

 
 
上一篇: 轻松接触oracle9i中的一个特殊等待事件    下一篇: 轻松掌握无文件备份、拥有所有归档的恢复 (1)
  相关文档
数据库Oracle 11g Alert Log 的新变化 09-01
Oracle动态并行处理框架及其优越性 04-12
快速解决"oracle"数据库中的常见问题 (1) 03-17
oracle性能调优过程中如何观察缓存命中率 04-29
Oracle数据库中通过扩展SQL跟踪数据 04-11
undo表空间暴长后如何才能取消自动扩展 04-18
使用_disable_logging即可禁止日志的生成 (1) 05-16
statspack监控管理:定期清除1个月的数据 02-28
oracle数据库9i和10g环境下使用*.ora 04-29
详细讲解oracle数据库中不同的恢复特性 04-11
RMAN备份恢复——配置介质管理器 06-03
Linux平台下数据库资源使用情况分析 04-11
oracle数据字典与动态性能表的相关概念 04-24
用events 跟踪解决不能创建物化试图一例 06-17
用简单的方法获取oracle语句的执行时间 05-16
带你轻松接触多线索机制概念 09-29
oracle的共享封锁 独占封锁和共享更新封锁 (1) 05-28
scn不一致将会导致ora-00600 2662错误 05-30
windows环境下oracle监听服务启动的问题 07-15
教你利用Rownum来限制查询所返回的行数 06-17
返回首页 | 关于我们 | J网章程 | JSP空间合租 | 客服中心 | 免责声明 | 常见问题 | 参观机房
本站主机空间代理至厦门市华众网络科技有限公司
《中华人民共和国增值电信业务经营许可证》
编号:闽B2-20050079
@2005-2008福建JSP技术网 版权所有 闽ICP备05000928号
厦门(总部):13616026886 福州:0591-87655121
邮箱:admin@fjjsp.com 站长QQ,点击这里给我发消息