Академический Документы
Профессиональный Документы
Культура Документы
of ORACLE RMAN
Maxym Kharchenko
Central Florida ORACLE Users Group
June 2009
Who am I
Maxym Kharchenko, maxym@softcomputer.com
a Scorpio
Reasonably fast
You might think of using WHERE clause in that SQL
System slowness
Lack of security
Even downtime
?
Backup Backup Backup
1 2 3 4 5 6 7 8 9 10 11 12 13
Why DBAs make mistakes
(with backups) ?
There are 2 major reasons:
Know it all
Remember everything
1
ALTER DATABASE BEGIN BACKUP;
Get the list of database files
(optional) Exclude read only/unneeded
Copy database files
Check that copy is successful
ALTER DATABASE END BACKUP;
ALTER SYSTEM SWITCH ARCHIVE LOG CURRENT;
Get the list of ARC destinations
Copy archived logs
Check that copy is successful
ALTER DATABASE BACKUP CONTROLFILE TO ;
Copy controlfile
Copy parameter/spfile/password file
Check that copy is successful
2
Every single step in the procedure
Including implied (switch that log)
REMEMBERS:
What backups to keep, remove
Special cases (i.e. KEEP FOREVER)
3
Incremental Backups
Compressed Backups
Encrypted Backups
Block Recovery
Etc
RMAN Manages Binary Metadata
4
Create test
DB copy of DB
(Data) excluding
historical data
DB Copy
Standby DB
Create a
pluggable copy
of tbs Lab_main
As of 1 am
yesterday
Lab_main TBS
The HOW of RMAN
RMAN configuration
in a nutshell
Recovery Auxiliary AUX
Catalog Database Output location
Auxiliary Channels
AND
Target
Database
THEN
Channels
RMAN backup Data Copies
RMAN Backup as copy Recovery from copy
A A A A
B B B B
A A
A
B B
B
RMAN backup Backupsets
Backup as backupset 1. Backups can be smaller:
Incremental, Compressed
2. (some) Backups can be faster:
A1 B3 A3
A1 A2 A3 Incremental with B.C.T.
11
Thu (1)
15 8
=
12
Tuesday (copy/level 0)
6
Speeding Up
Incremental Backups
Backup
1 2 3 4 5 6 7 8 9 10 11 12 Datafile 5 Repository
Backup
1 2 3 4 5 6 7 8 9 10 11 12 Datafile 5 Repository
4 B.C.T log
10
Sunday:
RMAN> backup device type SBT incremental level 0 database
plus archivelog;
Monday:
RMAN> backup device type DISK incremental level 1 database;
RMAN> backup device type SBT archivelog all;
shutdown immediate
startup nomount
restore controlfile from autobackup;
alter database mount;
1. Alert log
2. RMAN> backup validate check logical datafile N;
SQL> SELECT * FROM v$database_block_corruption;
3. RMAN> backup check logical datafile N;
4. UNIX> dbv data_file
Repository Repository
Database Database
Repository Repository
Database Database
FRA Sizing Considerations
Remove/Create
Repository
Database
Database
FRA How Large ?
FRA Components FRA size depends on:
FRA: Disk
group 1 (/testdb/redo01.arc)
ca
pli
Du
group 2 (/testdb/redo01.arc)
s port Aux DB size 100M reuse;
n
Tra
Script processor
The WHY of RMAN
Why use RMAN?
RMAN utility:
boring ;-)
Any Questions ?