C Ge
n Square acle Resource Center
RMAN back
- What is Rman
- Why use Rman
- Understanding The Rman Architecture
- Taking Backup in Non archive Backup Mode
- Taking Backup in archive Mode
- Enhancement in 10g For Rman ***
- 9i Enhancement For Rman
- Other Commands for Rman
- Conclusion
Recovery Manager is a tool that manages the process of creating backup and also manages the process of restoring and recovering them.
In addition to RMAN repository records, the recovery catalog can also hold RMAN stored scripts, sequences of RMAN commands for common backup tasks. Centralized storage of scripts in recovery catalog can be more convenient than working with command files 
- No Extra Costs.. It is available free.
- RMAN introduced in Oracle 8 it has become simpler with new version and easier that user managed backups.
- Proper Security
- You are 100% sure your database has been backed up .
- It contains details of backup taken in the central repository
- Facility of Testing validity of backups also command like cross check to check the status of backup.
- Oracle 10g has got further optimized incremental backups with has resulted in improvement of performance during backup
- and recovery time
- Parrallel operation are supported
- Better Querying facility for knowing different details of backup.
- No Extra redo generated when backup is taken. compared to online backup
- Without rman.which results in saving of space in hard disk.
- RMAN is an intelligent tool
- Maintains repository of backup metadata.
- Remembers backup locations
- Knows what needs backup set locations
- Knows what needs to be backed up
- Knows what is required for recovery
- Know what backups are redundant
- It handles database corruptions
Understanding The Rman Architecture
An Oracle Rman comprises of
RMAN Executables This could be present and fired even from client side
Target Databases This is the database which needs to be backed up
Recovery Catalog Recovery Catalog is optional otherwise backup
backup details are stored in target database control file
It is a repository of information queried and updated by Recovery Manager
It is a schema or user stored in Recovery Manager
One schema can support many databases
It contains information on Physical schema of Target Database
data file and archive log, backup sets and pieces
Recovery Catalog is a must in following scenarios
- In order to store scripts
Media Management Software
Media management software is a must if you are using RMAN for storing backup in tape drive directly
Backups in Rman
Oracle backup in RMAN are the following type
RMAN complete backup
RMAN incremental backup
These backup are of RMAN proprietary nature
Image copy
The advantage of image copy is it is not in RMAN proprietary format
BackupFormat
RMAN backup is not in oracle format but in RMAN format.
Oracle backup comprises of backup sets and consists of backup peices
Backup sets are logical entity
In Oracle 9i it gets stored in default locations
There are two type of backup sets
Datafile backup sets, Archivelog Backup sets
One more important point of data file backup sets is it donot include empty blocks,
A backup set will contain many backup pieces
A single backup piece consists of physical files which are in RMAN proprietary format.
Backups in Rman
Oracle Backup in RMAN are thefollowingtype
Backup complete backup ;
Image Copy
Backup Format
Example of Using Backup Using Rman..
Taking RMAN backup
In non archive mode in dos prompt type
RMAN
- You get the RMAN prompt
RMAN > Connect Target
Connect to target database : Magic < Dbid= 129283912>
Using target database controlfile instead of recovery catalog
Let us take a simple backup of database in Non Archive Mode
Shutdown immediate; - Shutdown The database;
Startup mount;
Backup database; -- This starts backing the database
Alter database open;
We can fire the same commands in archive log mode
And whole of datafiles will be backed
Backup database plus archivelog;
Restoring Database
Restoring database has been made very simple in 9i .
It is just restore database.
Rman is intelligent to identify which dataifiles has to be restored and the locations of backed up file.
Oracle Enhancement for Rman in 10g
Flash Recovery Area
Incrementally Updated Backups
Faster Incremental Backups
SWITCH DATABASE COMMAND.
Binary Compression
Global Scripting
Duration Clause
Configure This
Oracle Enhancement for Rman in 10g
Automatic Channel Failover
Compress Backup Sets
Recovery Through Reset Logs
Cross Backup Sets
Flash Backup and Recovery Area
The flash Recovery area notifies the administrator when the disk space consumption is nearing the defined quota and there is no more files to purge. |
Incrementally Updated Backups
Below you can see the example of incrementally updated Backups Backup incremental level 1 Recover copy of database |
Faster Incremental Backup
|
SWITCH DATABASE COMMAND. Disadvantage is it is only a temporary solution since |
Global Scripting
|
Duration Clause BACKUP DURATION 4:00 PARTIAL MINIMIZE TIME DATABASE FILESPERSET 1; You can limit the time the backup is going to takeplace by this command |
Automatic Channel Failover
|
Compressed BackupSets Rman > configure device type disk backup type to compressed backupset;
|
Recoverey Through ResetLogs |
These are Oracle 9I Enhancement in Rman
|
Persistent Rman Configuration Configure Retention policy to redundancy 3;
|
Configure Backup Optimization On
|
Block Media Recovery The alert log file, Trace File,Analyze Table Command, Dbverify utility,V$Backup_Corruption & V$Copy_Corruption command.
|
Trial Recovery SQL> recover database until cancel test;
|
Oracle Enterprise Manager
|
Archive Log Failover Obselete |
Auto Backp of Control file
|
|
Misc Rman Commands
Show all :--- Displays all the rman configuration for the particular target database
Example show all
Configure retunetion policty to reduncandacncy1
Backup optimization off
Default device type to disk
Controlfile autobackup off
Encryption to database off;
Observation
Introduced in Oracle 8i it has become more powerful and simpler with the newer version of Oracle9 and Oracle 10g ..
So if you really dont want to miss something critical please start using RMAN.
Paul Johny
Ocp 8 8i 9i 10g DBA
WWW.CPISOLUTOIN.COM\ORACLE.HTML