Loss of a Non-SYSTEM Data File
Published by : Obay Salah , November 19, 2024
It is a Datafile that does not belong to System Tablespace or Undo Tablespace, the moment Non-SYSTEM Datafile is lost, users receive error messages stating that the Datafile is lost, and the recovery process can be completed without closing the Online Recovery database, and users working on other Tablespaces are not affected, as they will continue to work during the recovery process.
Of course, the recovery process can be done without closing the database or after closing it (Online or Offline), but of course, the recovery process without closing the database is impossible if we
lost a Datafile belonging to System Tablespace.
Let's assume in this scenario that we lost the USERS.DBF Datafile belonging to USERS TABLESPACE.
To complete the recovery process for this scenario, there are two methods: -
The first method (Data File Recovery): -
Here we perform several steps:
1- Do a USERS01.DBF DATAFILE) Restore only from the last Backup, i.e. make a copy of the file from the last Backup to its original location.
2- We put USERS01.DBF DATAFILE OFFLINE.
ALTER DATABASE DATAFILE 'D:\oradata\USERS١٠.D BF' OFILNE;
3- We do a RECOVERY for USERS.DBF DATAFILE.
alter database recover automatic datafile 'D:\oradata\USERS01.DBF';
4- Then we put the USERS.DBF DATAFILE ONLINE.
ALTER DATABASE DATAFILE 'D:\oradata\USERS01.D BF' ONILNE;
The second method Tablespace Recovery:-
Here we do several steps:-
1- Restore USERS01.DBF only from the last Backup, i.e. copy the file from the last Backup to its original location.
2- Put USERS TABLESPACE OFFLINE.
ALTER TABLESPACE USERS OFFLINE;
3- We do TABLESPACE USERS RECOVERY.
RECOVER TABLESPACE USERS;
4- We put USERS TABLESPACE ONLINE.
ALTER TABLESPACE USERS ONLINE;
You can use either of these methods to handle this scenario, but generally you will not lose any of your data as long as you do not lose the Present Controlfile and the Current Redo Logfile, so in any case we will perform a Complete Recovery.
Comments
no comment yet!