Backing up an Oracle Data Guard environment
We restore the datafile from the backup taken from the standby database:
oracle@oracle1[DG1]:/oradata/DG1$ rman target / catalog rman/xxxx@rcat_oracle3
Recovery Manager: Release 10.1.0.3.0 - 64bit Production
Copyright (c) 1995, 2004, Oracle. All rights reserved.
connected to target database: DG1 (DBID=1531960840)
connected to recovery catalog database
RMAN> @restore_payroll.rcv
RMAN> run {
2> allocate channel 'dev_0' type 'sbt_tape'
3> parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=DG1,OB2BARLIST=Ora1_DG1_Online)';
4> restore tablespace payroll;
5> }
allocated channel: dev_0
channel dev_0: sid=94 devtype=SBT_TAPE
channel dev_0: Data Protector A.05.50/330
Starting restore at 2005-05-11
channel dev_0: starting datafile backupset restore
channel dev_0: specifying datafile(s) to restore from backup set
restoring datafile 00006 to /oradata/DG1/payroll01.dbf
[Normal] From: OB2BAR_Oracle8@oracle1 "DG1" Time: 05/11/05 17:49:57
Starting OB2BAR Restore: oracle1:dtgk5ru6_1_1 "Oracle8"
[Normal] From: OB2BAR_Oracle8@oracle1 "DG1" Time: 05/11/05 17:50:32
Completed OB2BAR Restore: oracle1:dtgk5ru6_1_1 "Oracle8"
channel dev_0: restored backup piece 1
piece handle=dtgk5ru6_1_1 tag=TAG20050511T174013
channel dev_0: restore complete
Finished restore at 2005-05-11
released channel: dev_0
RMAN> **end-of-file**
RMAN>
Start redo apply on the standby:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT
FROM SESSION;
Database altered.
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
25