eygle.com   eygle.com
eygle.com eygle
eygle.com  
 

« 如何从自动备份中恢复控制文件和SPFILE文件 | Blog首页 | 徒步上班的清晨 »

使用RMAN进行基于表空间的恢复

示范案例,仅供参考:
1.察看备份文件

$ 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 datafile 1; List of Backup Sets =================== BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 17 Full 131M DISK 00:01:50 29-MAR-05 BP Key: 17 Status: AVAILABLE Compressed: NO Tag: TAG20050329T065513 Piece Name: /data5/flash_recovery_area/EYGLE/backupset/ 2005_03_29/o1_mf_nnndf_TAG20050329T065513_14k2tmx7_.bkp List of Datafiles in backup set 17 File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- --------- ---- 1 Full 10605717 29-MAR-05 /opt/oracle/oradata/eygle/system01.dbf

2.mount数据库

RMAN> startup mount; connected to target database (not started) Oracle instance started database mounted Total System Global Area 314572800 bytes Fixed Size 1301704 bytes Variable Size 261890872 bytes Database Buffers 50331648 bytes Redo Buffers 1048576 bytes

3.恢复数据文件

RMAN> restore datafile 1; Starting restore at 30-MAR-05 allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=160 devtype=DISK channel ORA_DISK_1: starting datafile backupset restore channel ORA_DISK_1: specifying datafile(s) to restore from backup set restoring datafile 00001 to /opt/oracle/oradata/eygle/system01.dbf channel ORA_DISK_1: restored backup piece 1 piece handle=/data5/flash_recovery_area/EYGLE/backupset/2005_03_29/ o1_mf_nnndf_TAG20050329T065513_14k2tmx7_.bkp tag=TAG20050329T065513 channel ORA_DISK_1: restore complete Finished restore at 30-MAR-05

4.恢复表空间

RMAN> recover tablespace system; Starting recover at 30-MAR-05 using channel ORA_DISK_1 starting media recovery archive log thread 1 sequence 1760 is already on disk as file /data5/flash_recovery_area/EYGLE/archivelog/2005_03_29/ o1_mf_1_1760_14kb696y_.arc archive log thread 1 sequence 1761 is already on disk as file /data5/flash_recovery_area/EYGLE/archivelog/2005_03_29/ o1_mf_1_1761_14kl1fz5_.arc archive log thread 1 sequence 1762 is already on disk as file /data5/flash_recovery_area/EYGLE/archivelog/2005_03_29/ o1_mf_1_1762_14l2kcg6_.arc archive log thread 1 sequence 1763 is already on disk as file /data5/flash_recovery_area/EYGLE/archivelog/2005_03_29/ o1_mf_1_1763_14l2kgcc_.arc archive log thread 1 sequence 1764 is already on disk as file /data5/flash_recovery_area/EYGLE/archivelog/2005_03_29/ o1_mf_1_1764_14l2knqw_.arc archive log thread 1 sequence 1765 is already on disk as file /data5/flash_recovery_area/EYGLE/archivelog/2005_03_29/ o1_mf_1_1765_14l6b55s_.arc archive log thread 1 sequence 1766 is already on disk as file /data5/flash_recovery_area/EYGLE/archivelog/2005_03_29/ o1_mf_1_1766_14l6b66r_.arc archive log thread 1 sequence 1767 is already on disk as file /data5/flash_recovery_area/EYGLE/archivelog/2005_03_29/ o1_mf_1_1767_14l6b72w_.arc archive log thread 1 sequence 1 is already on disk as file /data5/flash_recovery_area/EYGLE/archivelog/2005_03_29/ o1_mf_1_1_14l6w0ph_.arc archive log thread 1 sequence 1 is already on disk as file /data5/flash_recovery_area/EYGLE/archivelog/2005_03_29/ o1_mf_1_1_14lndg1q_.arc archive log thread 1 sequence 2 is already on disk as file /data5/flash_recovery_area/EYGLE/archivelog/2005_03_29/ o1_mf_1_2_14lrs0ty_.arc archive log thread 1 sequence 3 is already on disk as file /data5/flash_recovery_area/EYGLE/archivelog/2005_03_29/ o1_mf_1_3_14lw1hj3_.arc archive log thread 1 sequence 4 is already on disk as file /data5/flash_recovery_area/EYGLE/archivelog/2005_03_30/ o1_mf_1_4_14m5ytfz_.arc archive log thread 1 sequence 5 is already on disk as file /data5/flash_recovery_area/EYGLE/archivelog/2005_03_30/ o1_mf_1_5_14mmzpdk_.arc archive log thread 1 sequence 6 is already on disk as file /data5/flash_recovery_area/EYGLE/archivelog/2005_03_30/ o1_mf_1_6_14mylhfk_.arc archive log thread 1 sequence 7 is already on disk as file /data5/flash_recovery_area/EYGLE/archivelog/2005_03_30/ o1_mf_1_7_14n93rxk_.arc archive log thread 1 sequence 8 is already on disk as file /data5/flash_recovery_area/EYGLE/archivelog/2005_03_30/ o1_mf_1_8_14nq4n5n_.arc archive log thread 1 sequence 9 is already on disk as file /data5/flash_recovery_area/EYGLE/archivelog/2005_03_30/ o1_mf_1_9_14o57ft3_.arc archive log filename=/data5/flash_recovery_area/EYGLE/archivelog/ 2005_03_29/ o1_mf_1_1760_14kb696y_.arc thread=1 sequence=1760 archive log filename=/data5/flash_recovery_area/EYGLE/archivelog/ 2005_03_29/ o1_mf_1_1761_14kl1fz5_.arc thread=1 sequence=1761 archive log filename=/data5/flash_recovery_area/EYGLE/archivelog/ 2005_03_29/ o1_mf_1_1762_14l2kcg6_.arc thread=1 sequence=1762 archive log filename=/data5/flash_recovery_area/EYGLE/archivelog/ 2005_03_29/ o1_mf_1_1763_14l2kgcc_.arc thread=1 sequence=1763 archive log filename=/data5/flash_recovery_area/EYGLE/archivelog/ 2005_03_29/ o1_mf_1_1764_14l2knqw_.arc thread=1 sequence=1764 archive log filename=/data5/flash_recovery_area/EYGLE/archivelog/ 2005_03_29/ o1_mf_1_1765_14l6b55s_.arc thread=1 sequence=1765 archive log filename=/data5/flash_recovery_area/EYGLE/archivelog/ 2005_03_29/ o1_mf_1_1766_14l6b66r_.arc thread=1 sequence=1766 archive log filename=/data5/flash_recovery_area/EYGLE/archivelog/ 2005_03_29/ o1_mf_1_1767_14l6b72w_.arc thread=1 sequence=1767 archive log filename=/data5/flash_recovery_area/EYGLE/archivelog/ 2005_03_29/ o1_mf_1_1_14l6w0ph_.arc thread=1 sequence=1 archive log filename=/data5/flash_recovery_area/EYGLE/archivelog/ 2005_03_29/ o1_mf_1_1_14lndg1q_.arc thread=1 sequence=1 archive log filename=/data5/flash_recovery_area/EYGLE/archivelog/ 2005_03_29/ o1_mf_1_2_14lrs0ty_.arc thread=1 sequence=2 archive log filename=/data5/flash_recovery_area/EYGLE/archivelog/ 2005_03_29/ o1_mf_1_3_14lw1hj3_.arc thread=1 sequence=3 archive log filename=/data5/flash_recovery_area/EYGLE/archivelog/ 2005_03_30/ o1_mf_1_4_14m5ytfz_.arc thread=1 sequence=4 archive log filename=/data5/flash_recovery_area/EYGLE/archivelog/ 2005_03_30/ o1_mf_1_5_14mmzpdk_.arc thread=1 sequence=5 archive log filename=/data5/flash_recovery_area/EYGLE/archivelog/ 2005_03_30/ o1_mf_1_6_14mylhfk_.arc thread=1 sequence=6 archive log filename=/data5/flash_recovery_area/EYGLE/archivelog/ 2005_03_30/ o1_mf_1_7_14n93rxk_.arc thread=1 sequence=7 media recovery complete Finished recover at 30-MAR-05

6.启动数据库

RMAN> alter database open; database opened RMAN>


历史上的今天...
    >> 2017-03-30文章:
    >> 2012-03-30文章:
    >> 2011-03-30文章:
    >> 2009-03-30文章:
           关于ocssd进程的三言两语
    >> 2008-03-30文章:
           resize datafile 与 checkpoint
    >> 2006-03-30文章:
           广告: 招聘SQL SERVER DBA

无觅

By eygle on 2005-03-30 23:15 | Comments (1) | Backup&Recovery | 233 |

1 Comment

1,2,3,4,6,錯了序號


CopyRight © 2004~2020 云和恩墨,成就未来!, All rights reserved.
数据恢复·紧急救援·性能优化 云和恩墨 24x7 热线电话:400-600-8755 业务咨询:010-59007017-7040 or 7037 业务合作: marketing@enmotech.com