connect / as sysdba
set echo off
set veri off
set feedback off
set termout on
set heading off
set linesize 1500
set termout off
spool recovery_generate.sql
select 'recover datafile '||FILE#||' ;' from v$recover_file;
spool off
set termout on;
set echo on
@recovery_generate
使用例子:
SQL> alter database datafile 8 offline drop;
Database altered.
SQL> select 'recover datafile '||FILE#||' ;' from v$recover_file;