We have two ONLINE backup options for taking Oracle database backup
RMAN
User Managed
Both options are needed ARCHIVELOG mode to take ONLINE database backup.
But why Oracle recommended using RMAN to take oracle database backup?
Because there is too many other option for database backup which are not exist in User Managed or if I say we can’t use those options with User Managed backup.
Many of newbie is scare about RMAN (Recovery Manager) backup procedure and thinking it is too complicated but actually it is not.
How we take ONLINE database backup through User Managed method?
SQL> alter database begin backup;
Database altered.
SQL> ---copy all datafiles to backup location
SQL> alter database end backup;
Database altered.
SQL> --switch logfile
SQL> alter system switch logfile;
SQL> --create controlfile backup
SQL> alter database backup controlfile to 'e:\backup\control01.ctl';
Database altered.
SQL> --create spfile backup
SQL> create pfile='e:\backup\init.ora' from spfile;
File created.
NOW user managed backup is complete.
For above 5 steps we need to create scripts and run it.
We can also use above 5 steps through RMAN with single command and take database backup
RMAN> configure controlfile autobackup on;
RMAN> configure controlfile autobackup format for device type disk to 'e:\backup
\%F';
RMAN> run
2> {
3> backup database format 'e:\backup\%U';
4> SQL 'alter system switch logfile';
5> backup archivelog all delete input format 'e:\backup\%U';
6> }
Now RMAN backup is complete.Just above command will take database backup and also DELETE all archivelog file which are backed up.
Advantage of RMAN
- We no need to COPY data files manually to backup location
- We can directly take/transfer backup on TAPE drive.
- We don’t put database in backup mode
- We can take backup in single RUN command
- RMAN is fast then User Managed backup
- RMAN also take backup of archivelog and delete all archivelog which backed up.
- We no need to take backup of spfile or controlfile separately RMAN will take backup of both.
"Teach Oracle Learn Oracle" -- Taj Contact me for support at askdbataj@gmail.com This blog is dedicated to all ORACLE Professionals and Learning Students.
Search This Blog
Saturday, May 10, 2008
RMAN versus User Managed Backup-Part-I
Subscribe to:
Post Comments (Atom)
3 comments:
Nice post tah.
Good.
Regards,
Babu
A very intelligent post !
Thanks a lot .
PERFECT !!!!
it would be nice if you give restore and recover mechanism for both types
Post a Comment