Sie sind auf Seite 1von 5

Sachin's DBA Blog: RMAN in Oracle

1 of 5

http://satya-dba.blogspot.in/2009/01/rman-was-first-introduced-in-oracle8...

Find us on Google+ Google+

Translator

Select Language

My Articles
* Bits n Bytes
* Database of Life
* Databases in the world
* First day in Job (at IDRBT)
ADRCI Commands in Oracle

January 29, 2009

RMAN in Oracle
Oracle Recovery Manager (RMAN)
RMAN was introduced in Oracle8, RMAN has since been enhanced (in Oracle 9i),
enhanced (in Oracle 10g) and enhanced (in Oracle 11g).

ASM
Auditing in Oracle

Recovery Manager(RMAN) is an Oracle provided (free) utility for backing-up, restoring and recovering Oracle

Background Processes in Oracle

databases. RMAN ships with the Oracle database and doesn't require a separate installation. The RMAN executable is
located in $ORACLE_HOME/bin directory.

Block Change Tracking


Data Dictionary Views
Data Pump Export Import
Data Pump in Oracle
DataDictionary views Vs V$ views
Export and Import
Flash/Fast Recovery Area (FRA)

RMAN is a Pro*C application that translates commands to a PL/SQL interface through RPC (Remote Procedure Call).
The PL/SQL calls are statically linked into the Oracle kernel, and does not require the database to be opened (mapped
from the ?/rdbms/admin/recover.bsq file).
The RMAN environment consists of the utilities and databases that play a role in backing up our data. At a minimum,
the environment for RMAN must include the following:

Flashback

The target database to be backed up.

Flashback Query

The RMAN client (rman executable and recover.bsq), which interprets backup and recovery commands,
directs server sessions to execute those commands, and records our backup and recovery activity in the
target database control file.

Golden Gate LogDump Utility


Commands
Indexes on Oracle Partitions
Logical Standby Databases
Managing Oracle Partitions

Some environments will also use these optional components:

Materialized View Logs

A recovery catalog database, a separate database schema used to record RMAN activity against one or more
target databases (this is optional, but highly recommended).

Materialized View Types


Materialized Views
Materialized Views Refresh Groups

A flash recovery area, called as fast recovery area from 11g release2, a disk location in which the database
can store and manage files related to backup and recovery.

NID Utility (DBNEWID Utility)

Media management software, required for RMAN to interface with backup devices such as tape drives.

Oracle 10g DBA OCA/OCP Dumps


Oracle 12C

Large pool (LARGE_POOL_SIZE) is used for RMAN.

Oracle Certifications (for DBAs)


Oracle Solaris 11

Benefits of RMAN

Partitioning in Oracle

Some of the benefits provided by RMAN include:

Password file (orapwd utility)

Backups are faster and uses less tapes (RMAN will skip empty blocks)

Physical Standby Databases

Less database archiving while database is being backed-up

Profiles in Oracle

RMAN checks the database for block corruptions

RMAN (Recovery Manager)

Automated restores from the catalog

RMAN Commands

Files are written out in parallel instead of sequential

RMAN Incremental Backups


Recycle bin in Oracle

Duplicate

Remote Diagnostic Agent (RDA)

Download Pdf

Diamond wedding sets

Backup and recovery

Data Recovery

Rollback Segments
SQL*Loader
Setting SQL prompt

RMAN can be operated from Oracle Enterprise Manager, or from command line. Here are the command line
arguments:

Snapshot Standby Databases

Argument

Value

Startup/Shutdown Options

target

quoted-string connect-string for target database

catalog

quoted-string connect-string for recovery catalog

Statistics in Oracle
Statspack in Oracle

Description

nocatalog

none

Temporary Tablespace Group

cmdfile

quoted-string name of input command file

Transportable Tablespaces (TTS)

log

quoted-string name of output message log file

Undo Tablespace/Management

trace

quoted-string name of output debugging message log file

Wait events in Oracle Database

append

none

What's New in Oracle 10g Release


1/2

debug

optional-args activate debugging

Temporary Tablespace

What's New in Oracle 11g Release


1
What's New in Oracle 11g Release
2
What's New in Oracle 12c Release
1

if specified, then no recovery catalog

if specified, log is opened in append mode

msgno

none

send

quoted-string send a command to the media manager

pipe

string

building block for pipe names

timeout

integer

number of seconds to wait for pipe input

checksyntax none

show RMAN-nnnn prefix for all messages

check the command file for syntax errors

What's New in Oracle 9i Release


1/2
asmcmd
dgmgrl utility
emca commands
emcli commands
emctl commands
ggsci - Oracle GoldenGate
lsnrctl commands

$
$
$
$
$
$
$
$

rman
rman
rman
rman
rman
rman
rman
rman

TARGET SYS/pwd@target
TARGET SYS/pwd@target NOCATALOG
TARGET SYS/pwd@target CATALOG rman/pwd@cat
TARGET=SYS/pwd@target CATALOG=rman/pwd@cat
TARGET SYS/pwd@target LOG $ORACLE_HOME/dbs/log/rman_log.log APPEND
TARGET / CATALOG rman/pwd@cat
TARGET / CATALOG rman/pwd@cat CMDFILE cmdfile.rcv LOG outfile.txt

10/29/2015 11:50 AM

Sachin's DBA Blog: RMAN in Oracle

2 of 5

oracleasm

http://satya-dba.blogspot.in/2009/01/rman-was-first-introduced-in-oracle8...

$ rman CATALOG rman/pwd@cat$ rman @/my_dir/my_commands.txt

Popular Posts

Using recovery catalog


Auditing in Oracle
Flash/Fast Recovery Area
Password file (orapwd utility) in
Oracle
RMAN (Recovery Manager)
Commands in Oracle
Automatic Storage Management
(ASM)
Data Pump Export & Import
utilities in Oracle

Followers

with Google Friend Connect

Members (147) More

One (base) recovery catalog can manage multiple target databases. All the target databases should be register with the
catalog.

Start by creating a database schema (usually named rman), in catalog database. Assign an appropriate tablespace to it
and grant it the recovery_catalog_owner role.
$ sqlplus "/as sysdba"
SQL> create user rman identified by rman default tablespace rmants quota unlimited on rmants;
SQL> grant resource, recovery_catalog_owner to rman;
No need to grant connect role explicitly, because recovery_catalog_owner role has it.
Log in to catalog database with rman and create the catalog.
$ rman catalog rman/rman
RMAN> create catalog;
RMAN> exit;
Now you can continue by registering your databases in the catalog.
$ rman catalog rman/rman@cat target system/manager@tgt
RMAN> register database;

Data recovery software

Windows media player

Auto Tracker

Interview Question

Using virtual private catalog

Already a member? Sign in

Follow by Email

Visitor Count (from Jan 2013)

A virtual private catalog is a set of synonyms and views that enable user access to a subset of a base recovery catalog.
The owner of the base recovery catalog can GRANT or REVOKE restricted access to the catalog to other database users.
Each restricted user has full read/write access to his own metadata, which is called a virtual private catalog. The RMAN
metadata is stored in the schema of the virtual private catalog owner. The owner of the base recovery catalog controls
what each virtual catalog user can access.
$ sqlplus "/as sysdba"
SQL> create user vpc identified by vpc default tablespace rmants quota unlimited on rmants;
SQL> grant resource, recovery_catalog_owner to vpc;
Log in to catalog database with rman and grant the catalog to vpc.
$ rman catalog rman/rman
RMAN> GRANT CATALOG FOR DATABASE target_db TO vpc;
RMAN> exit;
Log in to catalog database with vpc and create the virtual private catalog.
$ rman catalog vpc/vpc
RMAN> CREATE VIRTUAL CATALOG;
RMAN> exit;
$ sqlplus vpc/vpc
SQL>exec rman.DBMS_RCVCAT.CREATE_VIRTUAL_CATALOG;

Recovery Manager commands


ADVISE FAILURE

Will display repair options for the specified failures. 11g R1 command.

ALLOCATE

Establish a channel, which is a connection between RMAN and a database instance.

ALTER DATABASE

Mount or open a database.

BACKUP

Backup database, tablespaces, datafiles, control files, spfile, archive logs.

BLOCKRECOVER

Will recover the corrupted blocks.

CATALOG

Add information about file copies and user-managed backups to the catalog repository.

CHANGE

Update the status of a backup in the RMAN repository.

CONFIGURE

To change RMAN settings.

CONNECT

Establish a connection between RMAN and a target, auxiliary, or recovery catalog database.

CONVERT

Convert datafile formats for transporting tablespaces and databases across platforms.

CREATE CATALOG

Create the base/virtual recovery catalog.

CREATE SCRIPT

Create a stored script and store it in the recovery catalog.

CROSSCHECK

Check whether backup items still exist or not.

DELETE

Delete backups from disk or tape.

DELETE SCRIPT

Delete a stored script from the recovery catalog.

DROP CATALOG

Remove the base/virtual recovery catalog.

DROP DATABASE

Delete the target database from disk and unregisters it.

DUPLICATE

Use backups of the target database to create a duplicate database that we can use for testing
purposes or to create a standby database.

EXECUTE SCRIPT

Run an RMAN stored script.

EXIT or QUIT

Exit/quit the RMAN console.

FLASHBACK
DATABASE

Return the database to its state at a previous time or SCN.

GRANT

Grant privileges to a recovery catalog user.

HOST

Invoke an operating system command-line subshell from within RMAN or run a specific operating
system command.

IMPORT CATALOG

Import the metadata from one recovery catalog into another recovery catalog.

LIST

List backups and copies.

PRINT SCRIPT

Display a stored script.

10/29/2015 11:50 AM

Sachin's DBA Blog: RMAN in Oracle

3 of 5

http://satya-dba.blogspot.in/2009/01/rman-was-first-introduced-in-oracle8...

RECOVER

Apply redo logs or incremental backups to a restored backup set in order to recover it to a
specified time.

REGISTER

Register the target database in the recovery catalog.

RELEASE CHANNEL Release a channel that was allocated.


REPAIR FAILURE

Will repair database failures identified by the Data Recovery Advisor. 11g R1 command.

REPLACE SCRIPT

Replace an existing script stored in the recovery catalog. If the script does not exist, then
REPLACE SCRIPT creates it.

REPORT

Report backup status - database, files, backups.

RESET DATABASE

Inform RMAN that the SQL statement ALTER DATABASE OPEN RESETLOGS has been executed
and that a new incarnation of the target database has been created, or reset the target database
to a prior incarnation.

RESTORE

Restore files from RMAN backup.

RESYNC CATALOG

Perform a full resynchronization, which creates a snapshot control file and then copies any new
or changed information from that snapshot control file to the recovery catalog.

REVOKE

Revoke privileges from a recovery catalog user.

RUN

To run set of RMAN commands, only some RMAN commands are valid inside RUN block.

SEND

Send a vendor-specific quoted string to one or more specific channels.

SET

Settings for the current RMAN session.

SHOW

Display the current configuration.

SHUTDOWN

Shutdown the database.

SPOOL

To direct RMAN output to a log file.

SQL

Execute a PL/SQL procedure or SQL statement (not SELECT).

STARTUP

Startup the database.

SWITCH

Specify that a datafile copy is now the current datafile, that is, the datafile pointed to by the
control file.

TRANSPORT
TABLESPACE

Create transportable tablespace sets from backup for one or more tablespaces.

UNREGISTER

Unregister a database from the recovery catalog.

UPGRADE CATALOG

Upgrade the recovery catalog schema from an older version to the version required by the RMAN
executable.

VALIDATE

To validate. 11g R1 command.

All RMAN commands executed through channels. A channel is a connection (session) from RMAN to target database.
These connections or channels are used to perform the desired operations.

Flash/Fast Recovery Area (FRA)


Flash recovery area is a disk location in which the database can store and manage files related to backup and recovery.
To set the flash recovery area location and size, use DB_RECOVERY_FILE_DEST and DB_RECOVERY_FILE_DEST_SIZE.

RMAN new features in Oracle 10g


Managing recovery related files with flash recovery area.
Optimized incremental backups using block change tracking (Faster incremental backups) using a file (named
block change tracking file). CTWR (Change Tracking Writer) is the background process responsible for
tracking the blocks.
Reducing the time and overhead of full backups with incrementally updated backups.
Comprehensive backup job tracking and administration with Enterprise Manager.
Backup set binary compression.
New compression algorithm BZIP2 brought in.
Automated Tablespace Point-in-Time Recovery.
Automatic channel failover on backup & restore.
Cross-Platform tablespace conversion.
Ability to preview the backups required to perform a restore operation.
RMAN> restore database preview [summary];
RMAN> restore tablespace tbs1 preview;

RMAN new features in Oracle 11g Release 1


Multisection backups of same file - RMAN can backup or restore a single file in parallel by dividing the work
among multiple channels. Each channel backs up one file section, which is a contiguous range of blocks. This
speeds up overall backup and restore performance, and particularly for bigfile tablespaces, in which a datafile
can be sized upwards of several hundred GB to TB's.
Recovery will make use of flashback logs in FRA (Flash Recovery Area).
Fast Backup Compression - in addition to the Oracle Database 10g backup compression algorithm (BZIP2),
RMAN now supports the ZLIB algorithm, which offers 40% better performance, with a trade-off of no more
than 20% lower compression ratio, versus BZIP2.
RMAN> configure compression algorithm 'ZLIB' ;
Will backup uncommitted undo only, not committed undo.
Data Recovery Advisor (DRA) - quickly identify the root cause of failures; auto fix or present recovery
options to the DBA.
Virtual Private Catalog - a recovery catalog administrator can grant visibility of a subset of registered
databases in the catalog to specific RMAN users.
RMAN> grant catalog for database db-name to user-name;
Catalogs can be merged/moved/imported from one database to another.
New commands in RMAN
RMAN> list failure;
RMAN> list failure errnumber detail;
RMAN> advise failure;

10/29/2015 11:50 AM

Sachin's DBA Blog: RMAN in Oracle

4 of 5

http://satya-dba.blogspot.in/2009/01/rman-was-first-introduced-in-oracle8...

RMAN> repair failure;


RMAN> repair failure preview;
RMAN> validate database; -- checks for corrupted blocks
RMAN> create virtual catalog;

RMAN new features in Oracle 11g Release2


The following are new clauses and format options for the SET NEWNAME command:A single SET NEWNAME
command can be applied to all files in a database or tablespace.
SET NEWNAME FOR DATABASE TO format;
SET NEWNAME FOR TABLESPACE tsname TO format;
# New format identifiers are as follows:
# %U - Unique identifier. data_D-%d_I-%I_TS-%N_FNO-%f
# %b - UNIX base name of the original datafile name. For example, if the original datafile name was
$ORACLE_HOME/data/tbs_01.f, then %b is tbs_01.f.

RMAN related views


Control File V$ View

Recovery Catalog View

View Describes

V$ARCHIVED_LOG

RC_ARCHIVED_LOG

Archived and unarchived redo logs

V$BACKUP_DATAFILE

RC_BACKUP_CONTROLFILE

Control files in backup sets

V$BACKUP_CORRUPTION

RC_BACKUP_CORRUPTION

Corrupt block ranges in datafile backups

V$BACKUP_DATAFILE

RC_BACKUP_DATAFILE

Datafiles in backup sets

V$BACKUP_FILES

RC_BACKUP_FILES

RMAN backups and copies in the repository

V$BACKUP_PIECE

RC_BACKUP_PIECE

Backup pieces

V$BACKUP_REDOLOG

RC_BACKUP_REDOLOG

Archived logs in backups

V$BACKUP_SET

RC_BACKUP_SET

Backup sets

V$BACKUP_SPFILE

RC_BACKUP_SPFILE

Server parameter files in backup sets

V$DATAFILE_COPY

RC_CONTROLFILE_COPY

Control file copies on disk

V$COPY_CORRUPTION

RC_COPY_CORRUPTION

Information about datafile copy corruptions

V$DATABASE

RC_DATABASE

Databases registered in the recovery catalog


(RC_DATABASE) or information about the currently
mounted database (V$DATABASE)

V$DATABASE_
BLOCK_CORRUPTION

RC_DATABASE_
BLOCK_CORRUPTION

Database blocks marked as corrupt in the most recent


RMAN backup or copy

V$DATABASE_INCARNATION RC_DATABASE_INCARNATION All database incarnations registered in the catalog


V$DATAFILE

RC_DATAFILE

All datafiles registered in the recovery catalog

V$DATAFILE_COPY

RC_DATAFILE_COPY

Datafile image copies

V$LOG_HISTORY

RC_LOG_HISTORY

Historical information about online redo logs

V$OFFLINE_RANGE

RC_OFFLINE_RANGE

Offline ranges for datafiles

V$PROXY_ARCHIVEDLOG

RC_PROXY_ARCHIVEDLOG

Archived log backups created by proxy copy

V$PROXY_CONTROLFILE

RC_PROXY_CONTROLFILE

Control file backups created by proxy copy

V$PROXY_DATAFILE

RC_PROXY_DATAFILE

Datafile backups created by proxy copy

V$LOG and V$LOGFILE

RC_REDO_LOG

Online redo logs for all incarnations of the database


since the last catalog resynchronization

V$THREAD

RC_REDO_THREAD

All redo threads for all incarnations of the database since


the last catalog resynchronization

V$RESTORE_POINT

RC_RESTORE_POINT

All restore points for all incarnations of the database


since the last catalog resynchronization

RC_RESYNC

Recovery catalog resynchronizations

V$RMAN_CONFIGURATION

RC_RMAN_CONFIGURATION

RMAN persistent configuration settings

V$RMAN_OUTPUT

RC_RMAN_OUTPUT

Output from RMAN commands for use in Enterprise


Manager

RC_RMAN_STATUS

Historical status information about RMAN operations

V$TABLESPACE

RC_TABLESPACE

All tablespaces registered in the recovery catalog, all


dropped tablespaces, and tablespaces that belong to old
incarnations

RC_TEMPFILE

V$TEMPFILE

All tempfiles registered in the recovery catalog

V$RMAN_STATUS

RMAN related Packages


DBMS_RCVCAT
DBMS_RCVMAN
DBMS_BACKUP_RESTORE
Source: Internet
Related Articles: RMAN (Recovery Manager) commands in Oracle RMAN Incremental Backups

Automatic storage management

Duplicate

Download Pdf

Diamond wedding sets

Backup and recovery

+4 Recommend this on Google


Reactions:

10/29/2015 11:50 AM

Sachin's DBA Blog: RMAN in Oracle

http://satya-dba.blogspot.in/2009/01/rman-was-first-introduced-in-oracle8...

3 comments

Add a comment

Top comments

Mahboob Ali 1 month ago - Shared publicly


superb
Reply

Narisepalli Naveen Kumar 1 month ago - Shared publicly


again very useful information to me. simplied and required information about Rman..thanks satya.
Reply

3 years ago

I'm really enjoying the theme/design of your blog. Do you ever run into any internet browser compatibility
problems? A small number of my blog audience have complained about my website not operating correctly in
Explorer but looks great in Firefox. Do you have any ideas to help x this problem? <i>Also visit my web site</i> ...
<b><a href="http://wiki.lezilla-project.org/wiki/index.php?title=User:EliseMpv" rel="nofollow">software</a></b>

Newer Post

Home

Older Post

Subscribe to: Post Comments (Atom)

Oracle Interview Questions/FAQs


Oracle AppsDBA (E-Business Suite) Interview Questions/FAQs
Oracle ASM Interview Questions/FAQs
Oracle Data Guard Interview Questions/FAQs
Oracle DBA Interview Questions/FAQs Part1
Oracle DBA Interview Questions/FAQs Part2
Oracle DBA Interview Questions/FAQs Part3
Oracle DBA Interview Questions/FAQs Part4
Oracle Exadata Interview Questions/FAQs
Oracle Export/Import - Data Pump Interview Questions/FAQs
Oracle GoldenGate Interview Questions/FAQs
Oracle Performance related interview Questions/FAQs
Oracle PL/SQL Interview Questions/FAQs
Oracle RAC Interview Questions/FAQs
Oracle RMAN Interview Questions/FAQs
UNIX Interview Questions/FAQs for Oracle DBAs

Secure Connection

5 of 5

10/29/2015 11:50 AM