WEB开发网
开发学院数据库Oracle 从带库中把Oracle归档日志提取到数据库服务器中 阅读

从带库中把Oracle归档日志提取到数据库服务器中

 2008-10-24 12:58:18 来源:WEB开发网   
核心提示: 2、选择存放归档日志的位置,然后执行命令:RUN{SETARCHIVELOGDESTINATIONTO'新位置';RESTOREARCHIVELOGSEQUENCEXXXX;}注意:如果不用"SET ARCHIVELOG DESTINATION TO '新

2、选择存放归档日志的位置,然后执行命令:

  RUN
  {
  SETARCHIVELOGDESTINATIONTO'新位置';
  RESTOREARCHIVELOGSEQUENCEXXXX;
  }

注意:如果不用"SET ARCHIVELOG DESTINATION TO '新位置';"该语句,归档日志会在数据库的默认的归档日志目录。

命令如下:

  RecoveryManagercomplete.
  LHXXDBS01:oraoms>pwd
  /oracle/oms/oradata/temp
  LHXXDBS01:oraoms>rmantarget/
  RecoveryManager:Release10.2.0.1.0-ProductiononTueOct2108:52:082008
  Copyright(c)1982,2005,Oracle.Allrightsreserved.
  connectedtotargetdatabase:LHOMS(DBID=2813856949)
  RMAN>run{
  2>setarchivelogdestinationto'/oracle/oms/oradata/temp';
  3>restorearchivelogsequence3442;
  4>}
  executingcommand:SETARCHIVELOGDESTINATION
  usingtargetdatabasecontrolfileinsteadofrecoverycatalog
  Startingrestoreat21-OCT-08
  allocatedchannel:ORA_SBT_TAPE_1
  channelORA_SBT_TAPE_1:sid=465devtype=SBT_TAPE
  channelORA_SBT_TAPE_1:DataProtectionforOracle:version5.3.3.0
  allocatedchannel:ORA_SBT_TAPE_2
  channelORA_SBT_TAPE_2:sid=543devtype=SBT_TAPE
  channelORA_SBT_TAPE_2:DataProtectionforOracle:version5.3.3.0
  allocatedchannel:ORA_DISK_1
  channelORA_DISK_1:sid=480devtype=DISK
  channelORA_SBT_TAPE_1:startingarchivelogrestoretouser-specifieddestinati
  on
  archivelogdestination=/oracle/oms/oradata/temp
  channelORA_SBT_TAPE_1:restoringarchivelog
  archivelogthread=1sequence=3442
  channelORA_SBT_TAPE_1:readingfrombackuppiecearch_20081020_9623_1
  channelORA_SBT_TAPE_1:restoredbackuppiece1
  piecehandle=arch_20081020_9623_1tag=TAG20081020T200529
  channelORA_SBT_TAPE_1:restorecomplete,elapsedtime:00:03:07
  Finishedrestoreat21-OCT-08

现在已经把sequence号为3442的归档日志转存到/oracle/oms/oradata/temp目录下。

如果需要提取几天的归档日志出来,归档日志比较大、比较多的话,则需要花费很多时间。

上一页  1 2 

Tags:Oracle 归档 日志

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接