Professional Documents
Culture Documents
Objectives
After completing this lesson, you should be able to do
the following:
Use the RMAN BACKUP command to create backup
sets and image copies
Manage the backups and image copies taken with
RMAN
5-2
Interactive client
Type commands at RMAN prompt
Use when doing analysis, running reports or stored
scripts
Batch mode
Use with automated jobs
Specify a command file when starting RMAN
Set the log file to obtain information
Pipe interface
Specify the PIPE command line argument
Use to communicate data between sessions or
between RMAN and an external application
5-3
RMAN
Backup
SPFILE
Target
database
Archived
log files
5-5
Control
file
Stored
scripts
Catalog maintenance
CROSSCHECK
DELETEEXPIRED
LIST
CHANGE
REPORT
LIST
Catalog
database
RMAN Commands
RMAN commands are of the following types:
Stand-alone
Executed individually at the RMAN prompt
Cannot appear as subcommands within RUN
Job
Must be within the brackets of RUN
Executed as a group
Stand-alone or job
Can be executed at the RMAN prompt and run
individually
Can be run within the brackets of RUN and executed
within a group
5-6
RUN {
BACKUP AS BACKUPSET
FORMAT '/u01/db01/backup/%d_%s_%p'
DURATION 10:00 MINIMIZE LOAD
(DATABASE);
SQL 'alter system archive log current';
7> }
5-7
Data file
1
Data file
3
Data file
2
Tablespace
HR_DATA
5-8
Data file
1
Data file
2
Data file
3
Backup
set
Backup Constraints
5-9
Data file
4
Data file
5
Channel
MML
Data file
2
Data file
3
Data file
9
Channel
MML
Data file
6
Data file
7
Data file
8
Backup
piece 2
Channel
MML
5-10
Backup
piece 1
Backup
Piece 3
Compressed Backups
RMAN> BACKUP AS
2> COMPRESSED BACKUPSET
3> DATABASE;
Database files
RMAN>
2>
3>
4>
5-12
Compressed
backup files
Image Copy
RMAN>
2>
3>
RMAN>
4>
5>
5-13
BACKUP AS COPY
DATAFILE '/ORADATA/users_01_db01.dbf'
FORMAT '/BACKUP/users01.dbf' tag=DF3;
BACKUP AS COPY
ARCHIVELOG LIKE 'arch_1060.arc'
FORMAT 'arch_1060.bak';
Data file
3
Data file
3
Archived
log file
Archived
log file
5-15
Data files
1,3
Data file
3
Data files
2,4
Data file
4
Backup set
Backup set
Data file
1
Backup set
BACKUP Options
5-16
RMAN> BACKUP
2>
FORMAT '/disk1/backup/ar_%t_%s_%p'
3>
ARCHIVELOG FROM SEQUENCE=234
4>
DELETE INPUT;
5-18
Data file
copies
Archived log
file copies
5-19
Control
file
SPFILE
5-20
Full backup
Cumulative
incremental backup
Differential
incremental backup
0
Lvl
Day Sun
5-22
Level 0
1c
Mon
Tue
Wed
Thu
1c
Fri
Sat Sun
CTWR
SGA
5-23
Redo
generation
1011001010110
0001110100101
1010101110011
Change
tracking
file
Redo log
5-24
Image copy
of data file
Incremental
backup files
5-27
5-28
Incremental
Days
Redundancy
Recovery window
5-30
5-31
5-32
V$ARCHIVED_LOG
V$BACKUP_CORRUPTION
V$BACKUP_DEVICE
V$BACKUP_FILES
V$BACKUP_PIECE
V$BACKUP_REDOLOG
V$BACKUP_SET
V$BACKUP_SPFILE
V$COPY_CORRUPTION
V$RMAN_CONFIGURATION
5-34
Summary
In this lesson, you should have learned how to:
Use the RMAN BACKUP command to create backup
sets and image copies
Manage the backups and image copies taken with
RMAN
5-36
5-37