日期:2011-01-25 22:55:00 来源:本站整理
<b>从带库中把Oracle归档日记提取到数据库服务器中-备份恢复</b>[Oracle防范]
本文“<b>从带库中把Oracle归档日记提取到数据库服务器中-备份恢复</b>[Oracle防范]”是由七道奇为您精心收集,来源于网络转载,文章版权归文章作者所有,本站不对其观点以及内容做任何评价,请读者自行判断,以下是其具体内容:
描写:数据库的所在系统为AIX5.3,数据库的备份通过Tivoli Storage Manage(简称TSM)软件把数据库数据、归档日记备份到带库中.
在备份完归档日记到带库后,即删除数据库数据库中的归档日记.目前需求查询数据库中某表的数据具体是哪些用户举行操作的,需求用到数据库的归档日记.
从带库中把归档日记提取到数据库中的某个位置上.
1、远程登陆或本地登陆数据库服务器系统:
进入rman的号令界面:
LHXXDBS01:oraoms> rman target/ RMAN>list backup; |
(这号令把全部的备份都列出来)
假如只提取恢复归档日记,用下面号令便可,然后记着那天归档日记的sequence 号:
RMAN>list backupset of archivelog all; (这号令把全部的归档日记列出来) Handle: c-2813856949-20081020-05 Media: Control File Included: Ckp SCN: 224711393 Ckp time: 20-OCT-08 SPFILE Included: Modification time: 20-OCT-08 BS Key Size Device Type Elapsed Time Completion Time ------- ---------- ----------- ------------ --------------- 3306 81.50M SBT_TAPE 00:03:02 20-OCT-08 BP Key: 3306 Status: AVAILABLE Compressed: NO Tag: TAG20081020T16023 6 Handle: arch_20081020_9621_1 Media: List of Archived Logs in backup set 3306 Thrd Seq Low SCN Low Time Next SCN Next Time ---- ------- ---------- --------- ---------- --------- 1 3440 224711325 20-OCT-08 224779163 20-OCT-08 1 3441 224779163 20-OCT-08 224779169 20-OCT-08 BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 3307 Full 5.75M SBT_TAPE 00:01:59 20-OCT-08 BP Key: 3307 Status: AVAILABLE Compressed: NO Tag: TAG20081020T16054 3 Handle: c-2813856949-20081020-06 Media: Control File Included: Ckp SCN: 224779614 Ckp time: 20-OCT-08 SPFILE Included: Modification time: 20-OCT-08 BS Key Size Device Type Elapsed Time Completion Time ------- ---------- ----------- ------------ --------------- 3308 70.25M SBT_TAPE 00:03:26 20-OCT-08 BP Key: 3308 Status: AVAILABLE Compressed: NO Tag: TAG20081020T20052 9 Handle: arch_20081020_9623_1 Media: List of Archived Logs in backup set 3308 Thrd Seq Low SCN Low Time Next SCN Next Time ---- ------- ---------- --------- ---------- --------- 1 3442 224779169 20-OCT-08 224840954 20-OCT-08 1 3443 224840954 20-OCT-08 224840960 20-OCT-08 BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 3309 Full 5.75M SBT_TAPE 00:02:00 20-OCT-08 BP Key: 3309 Status: AVAILABLE Compressed: NO Tag: TAG20081020T20085 5 Handle: c-2813856949-20081020-07 Media: Control File Included: Ckp SCN: 224842089 Ckp time: 20-OCT-08 RMAN> exit |
2、挑选存放归档日记的位置,然后履行号令:
RUN { SET ARCHIVELOG DESTINATION TO '新位置'; RESTORE ARCHIVELOG SEQUENCE XXXX; } |
注意:假如不用"SET ARCHIVELOG DESTINATION TO '新位置';"该语句,归档日记会在数据库的默许的归档日记目录.
号令以下:
Recovery Manager complete. LHXXDBS01:oraoms> pwd /oracle/oms/oradata/temp LHXXDBS01:oraoms> rman target/ Recovery Manager: Release 10.2.0.1.0 - Production on Tue Oct 21 08:52:08 2008 Copyright (c) 1982, 2005, Oracle. All rights reserved. connected to target database: LHOMS (DBID=2813856949) RMAN> run{ 2> set archivelog destination to '/oracle/oms/oradata/temp'; 3> restore archivelog sequence 3442; 4> } executing command: SET ARCHIVELOG DESTINATION using target database control file instead of recovery catalog Starting restore at 21-OCT-08 allocated channel: ORA_SBT_TAPE_1 channel ORA_SBT_TAPE_1: sid=465 devtype=SBT_TAPE channel ORA_SBT_TAPE_1: Data Protection for Oracle: version 5.3.3.0 allocated channel: ORA_SBT_TAPE_2 channel ORA_SBT_TAPE_2: sid=543 devtype=SBT_TAPE channel ORA_SBT_TAPE_2: Data Protection for Oracle: version 5.3.3.0 allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=480 devtype=DISK channel ORA_SBT_TAPE_1: starting archive log restore to user-specified destinati on archive log destination=/oracle/oms/oradata/temp channel ORA_SBT_TAPE_1: restoring archive log archive log thread=1 sequence=3442 channel ORA_SBT_TAPE_1: reading from backup piece arch_20081020_9623_1 channel ORA_SBT_TAPE_1: restored backup piece 1 piece handle=arch_20081020_9623_1 tag=TAG20081020T200529 channel ORA_SBT_TAPE_1: restore complete, elapsed time: 00:03:07 Finished restore at 21-OCT-08 |
目前已经把sequence号为3442的归档日记转存到/oracle/oms/oradata/temp目录下.
假如需求提取几天的归档日记出来,归档日记对比大、对比多的话,则需求耗费很多时间.
以上是“<b>从带库中把Oracle归档日记提取到数据库服务器中-备份恢复</b>[Oracle防范]”的内容,如果你对以上该文章内容感兴趣,你可以看看七道奇为您推荐以下文章:
本文地址: | 与您的QQ/BBS好友分享! |
评论内容只代表网友观点,与本站立场无关!
评论摘要(共 0 条,得分 0 分,平均 0 分)
查看完整评论