Professional Documents
Culture Documents
14 1 Performing Datafile Recovery
14 1 Performing Datafile Recovery
SQL> startup
############################################
SQL> begin
for i in 1..20
loop
insert into test_tab1 select * from test_tab1;
commit;
end loop;
end;
/
$ rm &file_name&
$ sqlplus mytest/test_123@pdb1
--If the database is open, then take the datafile requiring recovery offline
SQL> ALTER DATABASE DATAFILE 19 OFFLINE;
########
--if restoring password-protected encrypted backups, then specify the password
RMAN> SET DECRYPTION IDENTIFIED BY password;
########
--Restore and recover the datafile
RMAN> RESTORE DATAFILE 19;