Database Reference
In-Depth Information
Another use case would be the restore of a lost data file on the primary. Connecting to the standby database you
can restore the data file over the network. For the next example assume that the database crashed because of the loss
of data file number 1. When the DBA tried to restart the instance after the crash he sees this error:
SYS@CDB$ROOT> startup
ORACLE instance started.
Total System Global Area 1603411968 bytes
Fixed Size 2288872 bytes
Variable Size 520094488 bytes
Database Buffers 1073741824 bytes
Redo Buffers 7286784 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: '+DATA/CDB1/DATAFILE/system.265.826666055'
The logical next step to restore service is to restore the data file from a backup. This can be a lengthy process
depending on how quickly the backup medium can be loaded. Another approach is to copy the file over the network.
As before you have the option to use multiple channels and the section size clause to tune the recovery time. In the example
the system tablespace is small and such optimizations were not needed. Connecting to the target database CDB1 (primary
role) and auxiliary database CDB2 (physical standby) you simply transfer the file across and recover it at the same time:
[oracle@server1 ~]$ rman target sys@cdb1 auxiliary sys@cdb2
Recovery Manager: Release 12.1.0.1.0 - Production on Fri Sep 20 22:22:59 2013
Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved.
target database Password:
connected to target database: CDB1 (DBID=800340993)
auxiliary database Password:
connected to auxiliary database: CDB1 (DBID=800340993, not open)
RMAN> run {
2> restore datafile 1 from service cdb2;
3> recover datafile 1;
4> alter database open;
5> }
Starting restore at 20.09.2013 21:39
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=21 device type=DISK
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: using network backup set from service cdb2
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to +DATA/CDB1/DATAFILE/system.265.826666055
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
Finished restore at 20.09.2013 21:39
Starting recover at 20.09.2013 21:39
using channel ORA_DISK_1
 
Search WWH ::




Custom Search