Backing up an Oracle Data Guard environment

II. – Datafile Loss of the Primary database
For this scenario, we will simulate the loss of a datafile on the Primary site, by renaming the
file, and use a full backup taken on the standby to perform a full recovery of the tablespace. In
this case, we recover the tablespace on the primary without forcing a failover to the standby.
Figure 8 Restore scenario 2
For the purpose of the testing, we create a new tablespace called payroll, perform a full backup
on the standby using the Oracle Recovery Manager. When finished, we delete the created
datafile.
SQL> create tablespace PAYROLL datafile '/oradata/DG1/payroll01.dbf' size 100M;
Tablespace created.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - 64bit
Production
With the Partitioning and Data Mining options
oracle@oracle2[DG1]:/oradata/DG1$ rm payroll01.dbf
When trying to create an object on the tablespace PAYROLL, we receive an error:
SQL> create table test (name varchar2(60));
create table test (name varchar2(60))
*
ERROR at line 1:
ORA-01116: error in opening database file 6
ORA-01110: data file 6: '/oradata/DG1/payroll01.dbf'
ORA-27041: unable to open file
HP-UX Error: 2: No such file or directory
Additional information: 3
22