Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
   
How to take Backup using RMAN ?




By Vigyan Kaushik
Sep 06, 2001

Digg! digg!     Print    email to friend Email to Friend

Note: This article was written for educational purpose only. Please refer to the related vendor documentation for detail.




Download Free Confio Software

How to take Backup using RMAN

RMAN is an Oracle tool for taking the backup and recovering the databases. You can copy, restore, and recover datafiles, control files and archived redo logs. It has command line utility as well as GUI-based Enterprise Manager Backup. Here we are discussing the command line utility.

For example, we have TEST and PROD databases. Here TEST is the catalog database and PROD is the target database for which the backup has to be taken. You may loose your backup if you have your catalog and target databases on the same box and the box crashes .So it is always advisable to keep a separate database for RMAN catalog .

Create two databases. One for RMAN catalog(Test) and one target(PROD). Both the Databases should be archive log mode.

In catalog database (test)

create a tablespace 'CATALOG'

create a user rman/rman and give the connect , resource, recovery_catalog_owner

Also give unlimited quota on CATALOG tablespace.

Create recovery catalog

c:\rman catalog rman/rman@test log = create_rmanlog.log

Recovery Manager: Release 8.1.7.0.0 - Production

RMAN-06008: connected to recovery catalog database
RMAN-06428: recovery catalog is not installed
RMAN>

RMAN> create catalog tablespace 'CATALOG';
RMAN-06431: recovery catalog created
RMAN>

Register the database

c:\>rman catalog rman/rman@test target internal/oracle@prod

Recovery Manager: Release 8.1.7.0.0 - Production
RMAN-06005: connected to target database: PROD (DBID=4145212838)
RMAN-06008: connected to recovery catalog database

RMAN> register database;

RMAN-03022: compiling command: register
RMAN-03023: executing command: register
RMAN-08006: database registered in recovery catalog
RMAN-03023: executing command: full resync
RMAN-08002: starting full resync of recovery catalog
RMAN-08004: full resync complete

Backup the datafile

RMAN> run{
Allocate channel c1 type disk;
Backup datafile
‘c:\orawin_815\oradata\prod\system01.dbf’ format ‘c:\backup\temp01.dbf’;
}

You can change the backup fine format including the destination. In this example, this backup file is created on the local drive of the system. < /P>

 



Comments/Reviews on this article:
Suresh  BK
Dec 20, 2006

Very good Article

vikas  
Jan 26, 2006

Another good article.

mahesh sg  sg
Oct 17, 2006

Respected Sir,
Iam Mahesh,I am one of the oracle Dba student,I finished my OCA certification,present iam loking job... I saw ur all articles,realy u good. Can u plz give more information about Logical backup.with simple steps and examples.
Thanking you
MAHESH S.G

 
About author:

Vigyan Kaushik is an Oracle certified professional serving IT industry for more than 10 years as an Oracle DBA and System Administrator. He has expertise in Database Designing, Administration, Networking, Tuning, Implementation, Maintenance with web deployment activities on different Unix flavors as well as on Windows Operating Systems.

 

Please login to post your comments





  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software