Professional Documents
Culture Documents
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:
The target database to be backed up.
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.
Some environments will also use these optional components:
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).
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.
Media management software, required for RMAN to interface with backup devices
such as tape drives.
Large pool (LARGE_POOL_SIZE) is used for RMAN.
Benefits of RMAN
Argument
Value
Description
target
catalog
nocatalog
none
cmdfile
log
trace
append
none
debug
optional-args
activate debugging
msgno
none
send
pipe
string
timeout
integer
checksyntax none
$
$
$
$
$
$
$
$
$
rman
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
CATALOG rman/pwd@cat$ rman @/my_dir/my_commands.txt
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.
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;
ALLOCATE
BLOCKRECOVER
CATALOG
CHANGE
CONFIGURE
CONNECT
CONVERT
CROSSCHECK
DELETE
DELETE SCRIPT
DROP CATALOG
DROP DATABASE Delete the target database from disk and unregisters it.
DUPLICATE
FLASHBACK
DATABASE
GRANT
HOST
IMPORT CATALOG
LIST
PRINT SCRIPT
RECOVER
REGISTER
RELEASE
CHANNEL
REPAIR FAILURE
RUN
SEND
SET
SHOW
SHUTDOWN
SPOOL
SQL
STARTUP
SWITCH
TRANSPORT
TABLESPACE
UNREGISTER
UPGRADE
CATALOG
VALIDATE
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 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.
Reducing the time and overhead of full backups with incrementally updated backups.
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.
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
V$COPY_CORRUPTION
RC_COPY_CORRUPTION
Information about
datafile copy
corruptions
V$DATABASE
V$DATABASE_
BLOCK_CORRUPTION
RC_DATABASE
Databases
registered in the
recovery catalog
(RC_DATABASE)
or information
about the
currently
mounted
database
(V$DATABASE)
RC_DATABASE_
BLOCK_CORRUPTION
Database blocks
marked as
corrupt in the
most recent
RMAN backup or
copy
All database
V$DATABASE_INCARNATIO RC_DATABASE_INCARNATIO incarnations
N
N
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
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$THREAD
V$RESTORE_POINT
RC_REDO_LOG
RC_REDO_THREAD
RC_RESTORE_POINT
RC_RESYNC
Recovery catalog
resynchronization
s
RMAN persistent
V$RMAN_CONFIGURATION RC_RMAN_CONFIGURATION configuration
settings
V$RMAN_OUTPUT
V$RMAN_STATUS
V$TABLESPACE
RC_RMAN_OUTPUT
Output from
RMAN commands
for use in
Enterprise
Manager
RC_RMAN_STATUS
Historical status
information about
RMAN operations
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
Source: Internet
Related Articles: RMAN (Recovery Manager) commands in Oracle RMAN Incremental
Backups