Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Agenda
Types of failures and #$%& %r!hi'e!'ure $anual (s) #$%& "n-'ape
a!kups in "ra!le
a!kups
Types of failures
.ns'an!e /ailure
0sually !onne!'ed *i'h an "ra!le pro!ess failure
$edia /ailure
Disk failure, s'orage array !on'roller failure e'!)
Blo!k Corrup'ion
0sually !aused
1u-an error
.n -os' !ases a!!iden'ally dele'ed2upda'ed da'a Da'a ase user or DB%
Disas'er
/ire, flood, ear'h3uake, plane !rash e'!)
a!kups
1o' 6on-line7
ar!hi(elogs
a!kups
a!kups8 full, in!r) 6!u-ula'i(e, differen'ial7,
Differen' 'ypes of
Differen' s!opes8 full da'a ase, 'a lespa!e6s7 or da'afile6s7 Do no' re3uire da'a ase do*n'i-e Can
e used 'o re!o(er full da'a ase, single2-ul'iple 'a lespa!e6s72da'afile6s7 or a !orrup'ed lo!k e re!o(ered 'o any poin' in 'i-e *i'hin assu-ed a!kup re'en'ion period
a!kups
a!kup granulari'y
Logi!al !opy of da'a in 'he da'a ase :uppor' for differen' Can
e 'aken ei'her *i'h lega!y +,por'2.-por' 'ools or *i'h Da'a 5u-p 6;0g7
Backup proc.
SGA
RedoLog
Db file
RMAN architecture
Target Database
Target Database
Auxiliary Database
Catalog Database
a!kupse'
a!kup
Cu-ula'i(e, differen'ial
%r!hi(elog
a!kups a!kups
Ta lespa!e6s7, da'afile6s7
Differential incremental
Cumulative incremental
a!kup s'ra'egies
a!kups are no' so hea(y for 'he sys'e- as -anual on-line a!kups lo!ks a!kup, res'ore and re!o(ery opera'ions a!kups
#$%& au'o-a'i!ally 'ra!k da'a ase s'ru!'ure !hanges 5ro(ides easy, au'o-a'ed ?eeps in(eno'ory of 'aken
a!kups are in'eres'ing u' usually no' suffi!ien' for a disas'er re!o(ery
"n-disk
#e!o(ery !an
$anagers
$edia $anager Li rary 6$$L7 is re3uired Differen' !onfigura'ion 'asks for differen' $$Ls
pro(ide $$Ls
$os' popular are8
Ti(oli :'orage $anager @eri'as &e'Ba!kup +$C &e'Worker
RMAN &onfiguration
#$%& !an
e pre!onfigured
Can fa!ili'a'e
a!kup au'o-a'ion
configure RETENTION POLICY TO RECOVERY WINDOW OF 31 DAYS; configure DEFAULT DEVICE TYPE TO ' !"'; configure DEVICE TYPE ' !"' PARALLELIS# $; configure C%ANNEL DEVICE TYPE & !"' ()r* +'ENV+ ,TDPO-OPTFILE+.o("."i/o0i." *.c0ien".or)c0e.!in."1(o2o("3'; configure DEVICE TYPE DIS4 PARALLELIS# $; configure #A5SETSI6E TO $77 8; configure )rc9i/e0og !)c:u( co(ie for 1e/ice ";(e ' !"' "o 1;
The S%OW ALL !o--and lis's all #$%& !onfigura'ion se''ings To !lear a gi(en se''ings append CLEAR a' 'he end of 'he
CONFI8URE !o--and
a!kups
uild o*n a!kup s'ra'egy 'ha' sui's gi(en da'a ase es' s'ra'egies8 a!kup
a!kup s'ra'egy8 le(el 0 a!kups A le(el ; a!kups 6!u-ula'i(e and2or differen'ial7 and ar!hi(elog a!kups in e'*een) a!kup as !opy of 'he *hole da'a ase A in!re-en'al a!kups used 'o upda'e 'he !opy A ar!hi(ed redo logs)
produ!'ion sys'e-s
Ba!kups go 'o 'apes Weekly or
.n!re-en'al
a!kup s'ra'egy8
% le(el ; !u-ula'i(e
Backup operations at Tier' Cen'ral -a!hine 'o s!hedule and run all 'he
a!kups
Cen'ral #$%& !a'alog e,por'ed on regular +,a-ples of #$%& !o--ands
asis
eing used8
run + crosscheck archivelog all, backup force tag )some_tag-.T/ incremental level . check logical database force format /0d-0T-01-lvl.T/ plus archivelog format /0d-0T-01-lvl.Tarch/, delete noprompt force archivelog all completed before 2sysdate 3 %4, 5 run + crosscheck archivelog all, backup tag )some_tag- D/ incremental level database format /0d-0T-01-lvl D/ plus archivelog format /0d-0T-01-lvl Darch/, delete noprompt force archivelog all completed before )sysdate 6 %*, 5
run + backup maxsetsi'e %.789 tag / D&-Copy-tag/ device type disk incremental level for recover of copy !ith tag )D&-Copy-tag* database, recover device type disk copy of database !ith tag D&-Copy-tag until time )sysdate 3% ), delete force noprompt backupset device type disk tag D&-Copy-tag completed before )sysdate 3%*, 5
#e3uires8
Con'rol file re!o(ery 6if i'Ds los'7 Da'afile res'ore fro- a
startup mount run + allocate channel c device type disk$sbt, allocate channel c% device type disk$sbt, restore database check readonly, recover database, alter database open, 5
The -os' 'ypi!al re!o(ery in !ase of sys'e-s i-ple-en'ing :%$+ approa!h .f done af'er a disas'er i' has 'o
1ard*are !onfigura'ion ": and "ra!le sof'*are ins'alla'ion #e-!rea'ion or res'ore fro- non-#$%&
e pre!eded y8
%:$ ins'an!e and diskgroup !onfigura'ion 6if needed7 $$L ins'alla'ion and !onfigura'ion )))
#e3uires
:pfile res'ore Con'rolfile res'ore Da'afiles res'ore and re!o(ery
set dbid(xxxxxxx startup nomount, run + allocate channel c device type disk$sbt, restore spfile to )some_location* from autobackup, recover database, alter database open resetlogs, 5 shutdo!n immediate, startup nomount, run + allocate channel c device type disk$sbt, restore controlfile from autobackup, alter database mount, 5 run + set until time ( 4to-date:/%73A193%..; ..<..<../=/dd3mon3yyyy hh%7<mi<ss/>4, allocate channel c device type disk$sbt, allocate channel c% device type disk$sbt, restore database check readonly, recover database, alter database open resetlogs, 5
#e3uires
5oin' in 'i-e re!o(ery of 'he *hole da'a ase
or o Ee!'s
lo!k !orrup'ion
Can
a(aila le
e dis!o(ered *i'h #$%& !)c:u( /)0i1)"e 1)")!) e !o--and lo!ks !an e found in @FD%T%B%:+GBL"C?GC"##05T."&
@RA3. A8B< @RACCD data block corrupted :file E ?= block E 77> @RA3. .< data file ?< )d<ForacleForadataFdataFmydb-maintbs-. #dbf* run + allocate channel c device type disk$sbt, blockrecover datafile ? block 77, 5
een los'
#e3uires
To pu' offline da'afiles and 'a lespa!es The da'a ase !an
eing re!o(ered
run + sGl 2alter tablespace users offlineH, allocate channel c device type disk$sbt, restore tablespace users, recover tablespace users, sGl 2alter tablespace users onlineH, 5
User s !uide
Backup and Recovery Re"erence