Backing up an Oracle Data Guard environment
III. – Loss of a data file on the Standby
As in the previous scenario, we delete a datafile on the standby database and using the full
backup taken on the standby, restore the datafile to disk.
Figure 9 Restore scenario 3
Once the file has been restored, we start the redo apply which will perform the recovery on the
tablespace (assuming all needed archived logs are on disk)
We delete the payroll01.dbf file:
oracle@oracle1[DG1]:/oradata/DG1$ mv payroll01.dbf payroll01.dbf.orig
Looking into the instance alert file, we can see that the datafile 6 cannot be accessed:
Errors in file /opt/oracle/admin/DG1/bdump/dg1_dbw0_7374.trc:
ORA-01157: cannot identify/lock data file 6 - see DBWR trace file
ORA-01110: data file 6: '/oradata/DG1/payroll01.dbf'
ORA-27037: unable to obtain file status
HP-UX Error: 2: No such file or directory
Additional information: 3
Before performing the restore, we need to stop the redo apply on the standby:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE cancel;
Database altered.
SQL>
24