永发信息网

如何从自动备份中恢复控制文件和SPFILE文件

答案:2  悬赏:70  手机版
解决时间 2021-03-08 19:15
如何从自动备份中恢复控制文件和SPFILE文件
最佳答案
当我们启用自动控制文件备份功能后,如果数据库发生重要改变或备份完成时,它会自动进行控制文件备份,同时它也会备份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
全部回答
当我们启用自动控制文件备份功能后,如果数据库发生重要改变或备份完成时,它会自动进行控制文件备份,同时它也会备份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>
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
尚速汽修在哪里啊,我有事要去这个地方
什么软件可以挡住以连接的wifi,不让别人知道
豆本豆豆奶好喝吗
生姜片贴脸,有什么好处?
皮卡堂怎么走路快
沙江沟在什么地方啊,我要过去处理事情
太多人链接我的wifi,怎么让他们以后连接不上
元贝驾考里面有科目二和科目三的视频吗
形容笑的成语
下列与投资相关的会计处理方法的表述中,不正
赤衣登怎么去啊,有知道地址的么
关于酵素和EM菌,我晕了,两者怎么用
钦州三娘湾什么时候看海豚时机最好?
职业玩王者荣耀的眼睛不累吗
做梦火烧山
推荐资讯
宿迁市汇德润滑油有限公司地址在什么地方,想
从安徽安庆如何到云南大理学院?是坐火车还是
马来西亚属于亚洲还是欧洲
一个手机号能注册几个微信,同一个手机号申诉
请问龙翼998对讲机 8W,在市区和户外使用需要
即证明复合函数的连续性
湾仔岛奶茶(玉桥店)在哪里啊,我有事要去这个
动力电缆中间断了可以有接头么?在哪个规范可
任何极端的行为,必反受其害,如疾风暴雨,不
适合在江苏连云港种的树有哪些
想在家做简单的缝纫加工活
数电74LS90计数器实现37进制计数器
正方形一边上任一点到这个正方形两条对角线的
阴历怎么看 ?