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

当我们启用自动控制文件备份功能后,如果数据库发生重要改变或备份完成时,它会自动进行控制文件备份,同时它也会备份spfile文件。

有关什么时间来进行自动备份,请参考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)
  相关文档
怎样才能删除所有表中的"procedure" 02-29
用Oracle 10g新的行时间戳捕捉变化 04-11
对外连接的表加上条件后将会使外连接失效 03-07
oracle数据库中为什么会产生回滚与前退 04-18
在oracle数据库中处理数据的高并发响应 07-30
Oracle中如何实现某一字段自动增加1 01-15
如何禁用oracle的xdb及修改xdb服务端口 08-07
带你深入了解oracle数据库的"sys"口令 (1) 07-30
在Oracle 8x中实现自动断开后再连接 01-15
讲解oracle数据库自定义异常的使用方法 04-15
如何获取或记录Oracle语句执行时间 09-29
修改表空间的SQL代码 01-15
拨云见日 正确认识password file的作用 (1) 04-24
scn不一致将会导致ora-00600 2662错误 05-30
解析:Oracle数据库最大可用性体系结构 09-01
怎样使用errorstack进行错误跟踪及诊断 11-15
Oracle数据库应用程序性能优化探究 04-11
创建物化视图提高查询速度 04-11
如何为用户提供回滚操作时间的准确评估 01-29
oracle数据库中获取固定记录数的实用方法 04-15
返回首页 | 关于我们 | J网章程 | JSP空间合租 | 客服中心 | 免责声明 | 常见问题 | 参观机房
本站主机空间代理至厦门市华众网络科技有限公司
《中华人民共和国增值电信业务经营许可证》
编号:闽B2-20050079
@2005-2008福建JSP技术网 版权所有 闽ICP备05000928号
厦门(总部):13616026886 福州:0591-87655121
邮箱:admin@fjjsp.com 站长QQ,点击这里给我发消息