Oracle 10g跨越Resetlogs时间点进行恢复(1)

日期: 2008-06-12 作者:Alizze 来源:TechTarget中国

  在Oracle数据库10g以前,假如用户对数据库进行了不完全恢复,在使用resetlogs选项打开数据库后,Oracle会提示你需要立即进行全备份。


   原因:日志序号会被置位,以此防止后续日志被应用。resetlogs之前的备份将不能用于进行跨域resetlogs时间点的恢复。


  在Oracle数据库10g中,Oracle允许跨越resetlogs时间点进行完全/不完全恢复。


  本文将针对此特性介绍一个详细的参考示例:


  一、全备份数据库


  $ 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> backup database plus archivelog delete all input;


  Starting backup at 2005-04-05 16:29:08


  current log archived


  using target database controlfile instead of recovery catalog


  allocated channel: ORA_DISK_1


  channel ORA_DISK_1: sid=143 devtype=DISK


  channel ORA_DISK_1: starting archive log backupset


  channel ORA_DISK_1: specifying archive log(s) in backup set


  input archive log thread=1 sequence=4 recid=295 stamp=554828647


  input archive log thread=1 sequence=5 recid=297 stamp=554833749


  channel ORA_DISK_1: starting piece 1 at 2005-04-05 16:29:16


  channel ORA_DISK_1: finished piece 1 at 2005-04-05 16:29:19


  piece handle=/data5/flash_recovery_area/EYGLE/backupset/2005_04_05


  /o1_mf_annnn_TAG20050405T162914_154m2woc_.bkp comment=NONE


  channel ORA_DISK_1: backup set complete, elapsed time: 00:00:04


  channel ORA_DISK_1: deleting archive log(s)


  archive log filename=/data5/flash_recovery_area/EYGLE


  /archivelog/2005_04_05


  /o1_mf_1_3_154919qm_.arc recid=294 stamp=554823466


  archive log filename=/data5


  /flash_recovery_area/EYGLE/archivelog/2005_04_05


  /o1_mf_1_4_154g3728_.arc recid=295 stamp=554828647


  archive log filename=/data5/flash_recovery_area/EYGLE/archivelog


  /2005_04_05/o1_mf_1_5_154m2og4_.arc recid=297 stamp=554833749


  Finished backup at 2005-04-05 16:29:20



  Starting backup at 2005-04-05 16:29:21


  using channel ORA_DISK_1


  channel ORA_DISK_1: starting full datafile backupset


  channel ORA_DISK_1: specifying datafile(s) in backupset


  input datafile fno=00009 name=/data1/oradata/systemfile/bigtbs.dbf


  input datafile fno=00001 name=/opt/oracle/oradata/eygle/system01.dbf


  input datafile fno=00006  name=/opt/oracle/oradata/eygle/EYGLE/datafile/o1_mf_test_03xv34ny_.dbf


  input datafile fno=00002 name=/opt/oracle/oradata/eygle/undotbs01.dbf


  input datafile fno=00003 name=/opt/oracle/oradata/eygle/sysaux01.dbf


  input datafile fno=00010 name=/opt/oracle/oradata/eygle/dfmbrc.dbf


  input datafile fno=00008 name=/opt/oracle/oradata/eygle/trans01.dbf


  channel ORA_DISK_1: starting piece 1 at 2005-04-05 16:29:22


  channel ORA_DISK_1: finished piece 1 at 2005-04-05 16:31:07


  piece handle=/data5/flash_recovery_area/EYGLE/backupset


  /2005_04_05/o1_mf_nnndf_TAG20050405T162921_154m33kf_.bkp comment=NONE


  channel ORA_DISK_1: backup set complete, elapsed time: 00:01:45


  channel ORA_DISK_1: starting full datafile backupset


  channel ORA_DISK_1: specifying datafile(s) in backupset


  input datafile fno=00005 name=/data1/oradata/systemfile/eygle01.dbf


  input datafile fno=00004 name=/opt/oracle/oradata/eygle/users01.dbf


  input datafile fno=00007 name=/opt/oracle/oradata/eygle/EYGLE/datafile/o1_mf_itpub_03xv5g66_.dbf


  channel ORA_DISK_1: starting piece 1 at 2005-04-05 16:31:08


  channel ORA_DISK_1: finished piece 1 at 2005-04-05 16:31:33


  piece handle=/data5/flash_recovery_area/EYGLE/backupset/2005_04_05


  /o1_mf_nnndf_TAG20050405T162921_154m6dxm_.bkp comment=NONE


  channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25


  channel ORA_DISK_1: starting full datafile backupset


  channel ORA_DISK_1: specifying datafile(s) in backupset


  input datafile fno=00011 name=/opt/oracle/oradata/eygle/t2k01.dbf


  channel ORA_DISK_1: starting piece 1 at 2005-04-05 16:31:34


  channel ORA_DISK_1: finished piece 1 at 2005-04-05 16:31:41


  piece handle=/data5/flash_recovery_area/EYGLE/backupset


  /2005_04_05/o1_mf_nnndf_TAG20050405T162921_154m76kz_.bkp comment=NONE


  channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07


  Finished backup at 2005-04-05 16:31:41



  Starting backup at 2005-04-05 16:31:41


  current log archived


  using channel ORA_DISK_1


  channel ORA_DISK_1: starting archive log backupset


  channel ORA_DISK_1: specifying archive log(s) in backup set


  input archive log thread=1 sequence=6 recid=298 stamp=554833902


  channel ORA_DISK_1: starting piece 1 at 2005-04-05 16:31:44


  channel ORA_DISK_1: finished piece 1 at 2005-04-05 16:31:47


  piece handle=/data5/flash_recovery_area/EYGLE/backupset/2005_04_05


  /o1_mf_annnn_TAG20050405T163142_154m7jpo_.bkp comment=NONE


  channel ORA_DISK_1: backup set complete, elapsed time: 00:00:04


  channel ORA_DISK_1: deleting archive log(s)


  archive log filename=/data5/flash_recovery_area/EYGLE/archivelog


  /2005_04_05/o1_mf_1_6_154m7gb3_.arc recid=298 stamp=554833902


  Finished backup at 2005-04-05 16:31:47



  Starting Control File and SPFILE Autobackup at 2005-04-05 16:31:48


  piece handle=/data5/flash_recovery_area/EYGLE/autobackup


  /2005_04_05/o1_mf_s_554833908_154m7qps_.bkp comment=NONE


  Finished Control File and SPFILE Autobackup at 2005-04-05 16:31:56


  RMAN> exit



  Recovery Manager complete.

我们一直都在努力坚持原创.......请不要一声不吭,就悄悄拿走。

我原创,你原创,我们的内容世界才会更加精彩!

【所有原创内容版权均属TechTarget,欢迎大家转发分享。但未经授权,严禁任何媒体(平面媒体、网络媒体、自媒体等)以及微信公众号复制、转载、摘编或以其他方式进行使用。】

微信公众号

TechTarget微信公众号二维码

TechTarget

官方微博

TechTarget中国官方微博二维码

TechTarget中国

电子邮件地址不会被公开。 必填项已用*标注

敬请读者发表评论,本站保留删除与本文无关和不雅评论的权力。

作者

Alizze
Alizze

相关推荐

  • MySQL到OpenStack Swift的备份与恢复

    在OpenStack中MySQL数据库的使用很普遍。OpenStack核心服务计算(Nova),存储(Cinder),Neutron(网络),镜像(Glance)和认证(Keystone)都使用MySQL数据库。

  • Oracle 10g/11g Latch机制的变化

    Oracle的Latch机制采用spin来进行持有CPU的不断尝试,虽然通常Latch的获取会非常快(一般在微秒级),但是很多时候Latch竞争还是会引发极为严重的CPU争用。

  • Oracle10g DBCONSOLE 服务无法启动的解决方法

    EM工具是Oracle10g推出的web方式的数据库控制台管理工具,此工具采用三层的技术架构,工具比较直观,使用方便。而DBCONSOLE服务是EM工具的服务程序。

  • 详解Oracle 10g中关于序列的使用

    在Oracle中如果要设定一个独立表结构的主键为自增,其中就涉及到了 Oracle 10G中关于序列(Sequence)的使用。