Databases Reference
In-Depth Information
These steps will recover the data file, but note the steps carefully. Steps 2 and 3 involve actual data transfer from
the RMAN backup to the original data file location, and those transfers will take a considerable amount of time,
depending on the type of RMAN storage, the speed of the connection, the other load on the SAN at the time, and so
on. During these steps, the tablespace remains offline, and data in the tablespace remains inaccessible.
Now consider the approach shown in this recipe. If you took data file image copies in RMAN, you can switch
to using the copy of the damaged data file instead of restoring from that copy. The advantage here is that pointing
to a different file is for all practical purposes an instant operation—you save all the time you would normally spend
copying from a backup. Figure 3-2 should make the concept easier to understand. For simplicity, assume the database
has only three data files: File1, File2, and File3. The RMAN backups are done as image copies, which are made in the
fast recovery area.
Database
File1
Copy of File1
File2
Copy of File2
File3
Copy of File3
Main Database Storage
Flash Recovery Area
Figure 3-2. Presence of image copies in the fast recovery area
Suppose now File1 gets damaged. Ordinarily you would resort to restoring the file from the image copy and
recovering it. However, the image copy is actually a copy of the data file File1, and it can be used as a substitute. Of
course, the copy was taken at some point in the past, so it's not up-to-date, and it must be updated before being used.
You do this update by applying the archived redo logs to the image copy. Finally, after the image copy is current, you
use the switch command to make the data file copy part of the database.
Now you are running the database with one file in the fast recovery area. Figure 3-3 depicts the data files being
used now.
Database
Damaged File1
Copy of File1
Copy of File1
File2
File2
Copy of File2
File3
File3
Copy of File3
Main Database Storage
Flash Recovery Area
Figure 3-3. Use of image copy of data file File1
As an illustration, Table 3-5 compares the elapsed times under both approaches. The time estimates are highly
approximate and depend on your specific conditions such as hardware, disk speed, and so on. It is shown as an
illustration for the relative analysis, not for empirical establishment of elapsed times.
Search WWH ::




Custom Search