oracle 备份恢复篇(四)---rman 单个数据文件

一,环境背景

    😊拥有rman全量备份!!!!!!!!!!

    😘rm删除system文件

    😍查看本机数据文件位置

    😊操作如下:

    😁删除后,shutduwn abort关机

 

😏 删库删表千万条,安全备份第一条,😏

😭😭😭😭😭运维操作不规范.背上背包泪两行.😭😭😭😭😭

二,恢复操作

     登入rman 操作>>>rman tartget /

   

[oracle@dataknown prod]$ rman target /

Recovery Manager: Release 11.2.0.4.0 - Production on Fri Mar 1 14:27:57 2019

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database (not started)

RMAN> startup mount

Oracle instance started
database mounted

Total System Global Area    1803841536 bytes

Fixed Size                     2254144 bytes
Variable Size               1577061056 bytes
Database Buffers             218103808 bytes
Redo Buffers                   6422528 bytes

RMAN> restore datafile 1;

Starting restore at 01-MAR-19
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=572 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=1141 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=1711 device type=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: SID=6 device type=DISK

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to /data/oradata/prod/system01.dbf
channel ORA_DISK_1: reading from backup piece /u01/backup/full_PROD_20190301_737_1
channel ORA_DISK_1: piece handle=/u01/backup/full_PROD_20190301_737_1 tag=TAG20190301T111548
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:45
Finished restore at 01-MAR-19
RMAN> recover datafile 1;

Starting recover at 01-MAR-19
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4

starting media recovery

archived log for thread 1 with sequence 2 is already on disk as file /data/oradata/arch1_2_1001760804.dbf
archived log for thread 1 with sequence 3 is already on disk as file /data/oradata/arch1_3_1001760804.dbf
archived log for thread 1 with sequence 4 is already on disk as file /data/oradata/arch1_4_1001760804.dbf
archived log for thread 1 with sequence 5 is already on disk as file /data/oradata/arch1_5_1001760804.dbf
archived log for thread 1 with sequence 6 is already on disk as file /data/oradata/arch1_6_1001760804.dbf
archived log for thread 1 with sequence 7 is already on disk as file /data/oradata/arch1_7_1001760804.dbf
archived log for thread 1 with sequence 8 is already on disk as file /data/oradata/arch1_8_1001760804.dbf
archived log for thread 1 with sequence 9 is already on disk as file /data/oradata/arch1_9_1001760804.dbf
archived log for thread 1 with sequence 10 is already on disk as file /data/oradata/arch1_10_1001760804.dbf
archived log for thread 1 with sequence 11 is already on disk as file /data/oradata/arch1_11_1001760804.dbf
archived log file name=/data/oradata/arch1_2_1001760804.dbf thread=1 sequence=2
archived log file name=/data/oradata/arch1_3_1001760804.dbf thread=1 sequence=3
archived log file name=/data/oradata/arch1_4_1001760804.dbf thread=1 sequence=4
archived log file name=/data/oradata/arch1_5_1001760804.dbf thread=1 sequence=5
archived log file name=/data/oradata/arch1_6_1001760804.dbf thread=1 sequence=6
archived log file name=/data/oradata/arch1_7_1001760804.dbf thread=1 sequence=7
archived log file name=/data/oradata/arch1_8_1001760804.dbf thread=1 sequence=8
archived log file name=/data/oradata/arch1_9_1001760804.dbf thread=1 sequence=9
media recovery complete, elapsed time: 00:00:00
Finished recover at 01-MAR-19

RMAN> alter database open
2> ;

database opened



---完成恢复-----这里主要是在关机的时候知道了哪个文件丢失或者损坏,通过rman指定序号恢复

 

 

    

posted on 2019-03-01 14:49  kingle-l  阅读(759)  评论(0编辑  收藏  举报

levels of contents