Professional Documents
Culture Documents
Implement RMAN
Nanak Sawlani
Jesse Crew
ZLB Behring
ZLB Behring Intro
2004 2
Agenda
RMAN Overview
RMAN Catalog setup
Backup procedure and examples
Recovery examples
RMAN Reporting
Maintenance of catalog
Questions and Answers
2004 3
RMAN will not back up
Oracle software
Configuration files (tnsnames,sqlnet etc)
2004 4
RMAN limitations
2004 5
RMAN Architecture
ta rg e t ta rg e t h o m e
DB R M A N b in a r y RMAN
s erver proc es s es C a ta lo g
--
c h a n n e ls T arg e t
v e rs io n
m e d ia c o m p a tib le
m anagem ent r e p o s it o r y
la y e r
2004 6
Steps to backup using RMAN
2004 7
Media Management Layer
2004 8
Use of Catalog
2004 9
Catalog creation/setup
2004 10
Target database
2004 11
RMAN terms
backup sets
Logical grouping of backup files
Backup piece
A physical binary file created by RMAN
Channel is the server process
4 channels (four parallel streams)write or read to one tape
Channels can be allocated for TAPE or DISK
Backup Retention Policy
How long you want to keep the backups
2004 12
Incremental backup (levels)
2004 13
HOT backup
It does not use begin backup/end backup
using RMAN for running hot backup does not impact
the volume of redo logging
RMAN reads the data blocks directly from the data file
and uses an internal oracle mechanism (read –
consistency) exactly as a normal SQL statement.
2004 14
Hot backup example
run {
allocate channel t1 type 'SBT_TAPE';
backup
tag hot_db_bk_level0
filesperset 1
format 'bk_%s_%p_%t'
(database);
sql 'alter system archive log current';
backup filesperset 5
format 'al_%s_%p_%t'
(archivelog all delete input);
}
2004 15
Cold backup using RMAN
2004 16
Cold backup example
run {
# Cold database level 0 backup
allocate channel t1 type 'SBT_TAPE';
allocate channel t2 type 'SBT_TAPE';
allocate channel t3 type 'SBT_TAPE';
allocate channel t4 type 'SBT_TAPE';
backup incremental level 0
tag cold_db_bk_level0
filesperset 1
format 'bk_%s_%p_%t'
(database);
sql 'alter database open';
}
2004 17
RMAN Commands
resync catalog
Reads the control file and synchronizes the catalog with database
backup information
Crosscheck
Checks repository to ensure physical file exists
e.g If you manually remove archive log file using OS command
Crosscheck command does not delete OS file or record from
repository.
2004 18
Restore
2004 19
Restore all datafiles example
2004 20
Point in time recovery
run {
set until time '2002-05-22:09:45:00';
allocate channel t1 type 'SBT_TAPE';
allocate channel t2 type 'SBT_TAPE';
restore (database);
recover database;
sql 'alter database open resetlogs';
}
2004 21
Storing scripts in Catalog
2004 22
RMAN and Backup of control files
2004 23
Catalog maintenance
2004 24
RMAN Reporting
List
list backup
list backup summary
list expired backup
Report
report obsolete
report schema- reports the tablespace and associated data files
report schema at time ‘sysdate-7’
Report need backup days=3
show all
To see the configuration setting
2004 25
How to remove database from Catalog
Note: Once removed from catalog, RMAN can no longer recover the
database
2004 26
OEM Interface
2004 27
Monitoring RMAN jobs
v$session_longops
Provides progress report on RMAN backup and restore
v$session_wait
Lists the events for which sessions are waiting
It only lists RMAN events and not media manager events
RMAN views
rc_database database registered in the catalog
rc_tablespace all tablespaces registered in the catalog
rc_datafile all data files registered in the catalog
rc-stored_script scripts stored in the catalog
2004 28
Components of RMAN session
2004 29
Version support Matrix
2004 30
Catalog upgrade
2004 31
Check corruption
2004 32
RMAN can be used to
2004 33
Tuning RMAN
2004 34
Running SQL commands
2004 35
Known problems and Bugs
2004 36
Good practice
2004 37
RMAN in 10g
RMAN in 9i
can re-start the failed backups or restores
Trial restore
RMAN in 10g
Disk based recovery
Compression of backups
2004 38
Summary
RMAN Overview
RMAN Catalog setup
Backup procedure and examples
Recovery examples
Maintenance of catalog
There is more
Trial recovery
Re-starting of failed backups and restores
RMAN in RAC environment
Restoring on another server
2004 39
Resources
2004 40
Thank you
Nanak.Sawlani @zlbbehring.com
Jesse.Crew @zlbbehring.com
Special Thanks to
Rich Bernat, ChevronTexaco Corp
2004 41