 |
|
Oracle
Enhancements in RMAN
Oracle Tips by Burleson Consulting |
This
is an excerpt from "Oracle 10g New Features for Administrators" by
Ahmed Baraka.
Configuration Changes
When opening a database that was recovered using a
backup or a current control file, the Oracle server automatically
re-creates any locally managed temporary files if they do not exist.
The files are recreated with the same creation size and storage
settings. You can change the temporary file names by using the RMAN
SET NEWNAME FOR TEMPFILE and SWITCH TEMPFILE command options.
You no longer need to re-create the control file
when any of the following configuration parameters are modified:
MAXLOGFILES, MAXLOGMEMBERS, MAXINSTANCES. This ensures that you do
not lose the RMAN catalog metadata through control file recreation,
and reduces system down-time requirements.
RMAN backups to backup sets do not back up never
used blocks. In addition, Oracle Database 10g no longer backs up
non-used blocks in locally managed tablespaces. Examples of such
blocks are blocks that belong to dropped or truncated objects.
Using the BACKUP AS COPY Command
The RMAN COPY command has been deprecated in
Oracle Database 10g and replaced with BACKUP AS COPY command.
BACKUP AS COPY command enables you to copy:
database, tablespaces, datafiles, archived redo logs
and control files.
If you want RMAN to create image copies by default
(rather than backuset):
RMAN> configure
device type disk backup type to copy
To create a backup set in the command level:
RMAN> backup as
backupset database
Performing Backups
RMAN> backup
database;
RMAN> backup copy of database;
RMAN> backup tablespace users;
RMAN> backup copy of tablespace users;
RMAN> backup datafile 10;
RMAN> backup copy of datafile 10;
RMAN> backup current controlfile;
RMAN> backup controlfilecopy all;
Using the CATALOG Command
RMAN> catalog backuppiece 'filename'
RMAN> catalog datafilecopy 'filename'
RMAN> change backuppiece 'file_name' uncatalog
Using the CATALOG START WITH Command
You can ask the RMAN to search in a certain
directory for all backup files that arent part of the catalog
already:
RMAN> catalog
start with "C:\ORACLE\FLASH_RECOVERY_AREA\NINA\DATAFILE"
Compressed Backups
Oracle Database 10g lets you compress RMAN backups
to save on storage.
You must set the COMPATIBLE initialization
parameter to a minimum of 10.0.0.
You cant compress an image copy; you can compress
a backup only if you are using backup sets.
The V$BACKUP_FILES view contains information on
backup files including the compression status.
RMAN> CONFIGURE
DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET
RMAN> BACKUP AS COMPRESSED BACKUPSET DATABASE
Automatic Channel Failover
If one of the channels on which the RMAN is
performing a backup fails, the RMAN will automatically try to use an
alternative channel, provided you are using multiple channels.
Enhancements in RMAN Scripts
1. Convertibility of RMAN Scripts
In Oracle Database 10g, you can change a stored
script into a text script and vice versa.
RMAN> print script
full_backup to file 'my_script_file.txt'
2. Global RMAN Scripts
Oracle Database 10g provides a new concept of global
scripts, which you can execute against any database registered in
the recovery catalog, as long as your RMAN client is connected to
the recovery catalog and a target database simultaneously.
RMAN> create
global script global_full_backup
{ backup database plus archivelog;
delete obsolete; }
 |
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. |