 |
|
Oracle Backup
and Recovery Enhancements
Oracle Tips by Burleson Consulting |
This
is an excerpt from "Oracle 10g New Features for Administrators" by
Ahmed Baraka.
Using the Flash Recovery Area
The flash recovery area serves as the default
storage area for all files related to backup and restore operations.
The flash recovery area provides the following
benefits:
• Single storage location for all recovery-related
files.
• Automatic management of recovery-related disk
space.
• Faster backup and restore operations, since you
don’t need to restore tape backups.
• Increased reliability of backups, since disks
are generally safer storage devices than tapes.
What’s in the Flash Recovery Area?
The flash recovery area may contain the following
files:
• Datafile copies: The new RMAN command
BACKUP AS COPY can be used to create image copies of all datafiles
and automatically store in the flash recovery area.
• Control file autobackups: The database
places any control file backups it generates in the flash recovery
area.
• Archived redo log files: If you store
Archived redo log files in the flash recovery area, Oracle will
automatically delete the files.
• Online redo log files: Oracle recommends
that you save a multiplexed copy of your online redo log files in
the flash recovery area. The following statements can create online
redo logs in the flash recovery area:
CREATE DATABASE,
ALTER DATABASE ADD LOGFILE, ALTER DATABASE ADD STANDBY LOGFILE, and
ALTER DATABASE OPEN RESETLOGS.
• Current control files: Oracle also
recommends that you store a multiplexed current control file in the
flash recovery area.
• RMAN files
• Flashback logs: If you enable the flashback
database feature, Oracle copies images of each altered block in
every datafile into flashback logs stored in the flash recovery
area.
Note: Oracle calls the multiplexed redo log
files and control files in the flash recovery area permanent
files, since they should never be deleted and are part of
the live database. Oracle terms all the other files in the flash
recovery area (recovery related files) transient files,
since Oracle will delete them eventually after they have become
obsolete or have already been copied to tape.
Creating a Flash Recovery Area
You use the DB_RECOVERY_FILE_DEST and
DB_RECOVERY_FILE_DEST_SIZE initialization parameters to configure a
flash recovery area in your database.
When you use the DB_RECOVERY_FILE_DEST parameter to
specify the destination of your flash recovery area, you can use a
directory, file system, or ASM disk group as your destination.
Dynamically Defining the Flash Recovery Area
ALTER SYSTEM SET
DB_RECOVERY_FILE_DEST_SIZE =
2G SCOPE=BOTH
ALTER SYSTEM SET DB_RECOVERY_FILE_DEST =
'C:\ORACLE\RECOVERY_AREA' SCOPE=BOTH
You must always specify the size parameter before specifying the
location parameter.
Disabling the Current Flash Recovery Area
ALTER SYSTEM SET
DB_RECOVERY_FILE_DEST = ''
Note: even after you disable the flash recovery
area, the RMAN will continue to access the files located in the
flash recovery area for backup and recovery purposes.
Default File Location and the Flash Recovery Area
The initialization parameters DB_CREATE_FILE_DEST
and DB_CREATE_ONLINE_LOG_DEST_n determine the location of all OMF
files.
Control Files
If you haven’t set the CONTROL_FILES parameter,
Oracle will create the control files in various default locations,
according to the following rules:
• If you specify the DB_CREATE_ONLINE_LOG_DEST_n
parameter, Oracle will create an OMF-based control file in n number
of locations, with the first directory holding the primary control
file.
• If you specify the DB_CREATE_FILE_DEST and
DB_RECOVERY_FILE_DEST parameters, Oracle will create an OMF based
control file in both of these locations.
• If you just specify the DB_RECOVERY_FILE_DEST
parameter, Oracle will create an OMF-based control file in the flash
recovery area only.
• If you omit all three of the initialization
parameters, Oracle will create a non-OMF-based control file in the
system-specific default location.
Note: If the database creates an OMF control
file, and it is using a server parameter file, then the database
sets the CONTROL_FILES initialization parameter in the server
parameter file.
Redo Log Files
If you omit the LOGFILE clause during database
creation, Oracle will create the redo log files according to the
same rules as mentioned above.
 |
If you like Oracle tuning, see the
book "Oracle
Tuning: The Definitive Reference", with 950 pages of tuning
tips and scripts.
You can buy it direct from the publisher for 30%-off and get
instant access to the code depot of Oracle tuning scripts. |