Only one data file is lost or corrupted

SCENARIO-1: DATABASE IS NOT OPEN

SCENARIO-2: DATABASE IS OPEN
CASE 1: Datafile image copy from FRA
CASE 2: Datafile restore from backup

SCENARIO-1: DATABASE IS NOT OPEN
===========
startup mount;

rman taregt /

list backup;

restore datafile 4;

recover datafile 4;

alter database open;


SCENARIO-2: DATABASE IS OPEN
==========

CASE 1: Datafile image copy from FRA
==============================
report schema;

list copy of datafile 4;

--- backup as copy database tag 'FullImageBackup';

sql ‘alter database datafile 4 offline’;

switch datafile 4 to copy;

recover datafile 4;

sql ‘alter database datafile 4 online’;

report schema;

cd /u01/app/oracle/oradata/DEVDB/
mv users01.dbf users01.dbf_backup

backup as copy datafile 4 format ‘/u01/app/oracle/oradata/DEVDB/users01.dbf’;

sql ‘alter database datafile 4 offline’;

switch datafile 4 to copy;

recover datafile 4;

sql ‘alter database datafile 4 online’;

report schema;


CASE 2: Datafile restore from backup
====================================
rman target /

sql “alter database datafile ”/u01/app/oracle/oradata/DEVDB/users01.dbf” offline”;

restore datafile '/u01/app/oracle/oradata/DEVDB/users01.dbf';

recover datafile '/u01/app/oracle/oradata/DEVDB/users01.dbf';

sql “alter database datafile ”/u01/app/oracle/oradata/DEVDB/users01.dbf” online”;

select file_name from dba_data_files;

#RMAN #DataFileLost #DatafileCorrupt #Backup #Restore #Recovery #Oracle #RAC #Database #Exadata #ASM

Please do follow me and support me on,

LinkedIn: https://www.linkedin.com/in/mallik034
YouTube: https://www.youtube.com/c/mallik034
Fakebook: https://www.facebook.com/mallik034
Blog: https://mallik034.blogspot.com
twitter: https://twitter.com/mallik034
Instagram: https://www.instagram.com/mallik034
FBPage: https://www.facebook.com/mallik034oracledba
Skype: malluramadurg


Regards,
Mallikarjun Ramadurg
Mobile: +91 9880616848
WhatsApp: +91 9880616848
Email: [email protected]
LinkedIn: https://www.linkedin.com/in/mallik034
YouTube: https://www.youtube.com/c/mallik034
Fakebook: https://www.facebook.com/mallik034
Blog: https://mallik034.blogspot.com
twitter: https://twitter.com/mallik034
Instagram: https://www.instagram.com/mallik034
FBPage: https://www.facebook.com/mallik034oracledba
Skype: malluramadurg