RMAN Setup using Recovery Catalog:
Recovery
Manager is one of the valuable tool that is provided by oracle in order to do
the backup and recovery activities. This document provides an overview on how
to setup the recovery manager using the recoveryy catalog in the Oracle
versions > 10g.
Steps for
configuring RMAN
·
Create a repository
database/Use any existing database as repository
Connect to the repository database as sysdba.
·
Create
a tablespace for the RMAN user:
SQL>Create tablespace rman datafile ‘/u01/oracle/TESTDB/rman01.dbf’;
·
Create
RMAN user by using the following command.
SQL>Create user rman idenfied by
rman default tablespace rman;
·
Grant
the required privilegs to connect and also the reovery catalog owner privileges
to RMAN user.
SQL>Grant resource,connect,recovery_catalog_owner
to rman;
Once the above steps are completed, start RMAN, connect
to catalog and initialize the create catalog command.
·
$
rman catalog rman/rman@TESTDB
Recovery manager: Release 11.2.0.2 –
Production
Copyright © 1995, 2004, Oracle .
All rights reserved.
Connected to recovery catalog
database
Recovery catalog is not installed
·
RMAN>
create catalog;
Recovery catalog created
·
RMAN>
exit;
Register the database in the catalog. This is
required in order to take the backup of the target database.
Register the target database
$ rman target sys@DB002 catalog rman/rman@TESTDB
RMAN> register
database;
Database registered in recovery
catalog
Starting full resync of recovery catalog
To set the parameters of the RMAN Connect to RMAN
$ rman target sys@DB002 catalog rman/rman@TESTDB log=rman.log
It will create log file in the oracle home directory.
Open and edit that file as per the requirements.
Backup operations using recovery
catalog
To backup the spfile and controlfile
Login to RMAN
$
rman target sys/um_aumt_s1@DB002 catalog rman/rman@TESTDB
RMAN>
backup current controlfile spfile;
Oncce
the recovery sync is completed, please take a level 0 backup of the database by
using the following command.
RMAN>
backup incremental level 0 as compressed backup set database;
Restore Operation
Restoring
a control file
Start
the database instance in nomount connect to RMAN
and
issue the following command on RMAN
$
rman target sys@DB002 catalog rman/rman@TESTDB
RMAN>restore
controlfile;
Restoring
the Entire Database
The
entire restore and recover operation can be performed within RMAN. First we
startup and open the database in mount mode.
$
rman target target sys@DB002 catalog rman/rman@TESTDB
RMAN>
startup mount;
RMAN>
restore database;
RMAN>
recover database;
RMAN>
alter database open;
Database
Opened.
No comments:
Post a Comment