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指定序号恢复

 

 

    

转载于:https://www.cnblogs.com/kingle-study/p/10456351.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值