非归档模式下
1、离线数据文件
alter database datafile '/u01/app/oracle/oradata/orcl/cc2.dbf' OFFLINE FOR DROP;
结果显示:
![](https://img2020.cnblogs.com/blog/2085516/202112/2085516-20211231161446310-540322217.png)
2、使数据文件在线
3、rman介质恢复数据文件8
[oracle@deam orcl]$ rman target / Recovery Manager: Release 12.1.0.2.0 - Production on Fri Dec 31 15:51:07 2021 Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved. connected to target database: ORCL (DBID=1543646389) RMAN> recover DATAFILE 8; Starting recover at 31-DEC-21 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=248 device type=DISK starting media recovery media recovery complete, elapsed time: 00:00:00 Finished recover at 31-DEC-21
4、再次online数据文件
5、结果显示
![](https://img2020.cnblogs.com/blog/2085516/202112/2085516-20211231161638548-1082290903.png)