You are on page 1of 13

Oracle 8I Backup and Recovery Quick Study Guide

A DBAs most important responsibility is to keep the database available to users. 1. Protect the database from failures. 2. Increase Mean-Time-Between-Failures (MTBF). 3. ecrease Mean-Time-To-!eco"er (MTT!). #. Minimi$e ata %oss. Control Files: Binar& file that is needed to mount a database and contains the followin' information( atabase name and I ) creation date) file and redo locations) tables*ace names) lo' histor&) bac+u* info (,I - reusable b& !M./)) lo' se0uence number) chec+*oint information. .re read to mount and o*en the database. 1hould be bac+ed u* an& time *h&sical chan'es are made to the database. Online Redo Logs: 2sed onl& for reco"er& of committed data not &et written to the data files. o not need to be bac+ed u*) but can be bac+ed u* cold to co*& database and a"oid ha"in' to o*en new database with !313T%451. . filled redo lo' cannot be reused until a chec+*oint has occurred and the redo lo' has been written b& the .!6n *rocess. Multi*le7. Processin' can continue as lon' as 1 member from each 'rou* is a"ailable. %o' switches occur when8 9hen online redo lo' fills. 9hen fast start chec+*ointin' is set. .t the lo':chec+*oint:inter"al. .t the lo':chec+*oint:timeout. .t instance shutdown (e7ce*t .B4!T). 9hen forced b& an .%T3! 1;1T3M 6<36=P4I/T 9hen a tables*ace is ta+en offline. 9hen an online bac+u* is started. Arc ived Redo Logs: !edo files that ha"e filled and co*ied to a bac+u* location (.rchi"e:lo':dest). .re critical for reco"er& in a hot bac+u* scheme. C eckpoints: 9rites all modifies buffers to the datafiles. atafiles alwa&s ha"e committed data. !ecords 16/ in the control file and u*dates all file headers. (/ote( e7ce*t read onl& tables*aces). Fast Start C eckpointing !8I": F.1T:1T.!T:I4:T.!53T>n (bloc+s). !educes time needed for instance crash reco"er& b& ensurin' that roll forward will onl& re0uire n bloc+s. 6an also use %45:6<36=P4I/T:I/T3!?.% and %45:6<36=P4I/T:TIM342T to influence. Fast Start Recovery: B is a"ailable at the end of the roll forward *rocess) indi"idual user *rocesses *erform rollbac+ when the bloc+s needin' rolled bac+ are re0uested.

#ata$ase Sync roni%ation: .ll online datafiles (e7ce*t read-onl& tables*aces)) redos) and control files must ha"e the same chec+*oint number (16/) for the database to be o*ened.

Roll$ack Seg&ents: 1tore location of data and the data as it e7isted before bein' modified for read consistenc&. urin' reco"er&) used to undo uncommitted chan'es a**lied from redo lo's to datafiles. .re bac+ed u*. 'ransporta$le 'a$lespaces: 1) Ma+e tables*ace !ead 4nl&. 2) 37*ort the Metadata. 3@P T!./1P4!T:T.B%31P.63>; T.B%31P.63 ts1 3) 6o*& data file to tar'et s&stem. #) 6o*& e7*ort dum* to tar'et s&stem. A) Im*ort the Metadata. IMP T!./1P4!T:T.B%31P.63>; .T.FI%31 (file1) file2) B) Brin' tables*ace online and enable ori'inal for !eadC9rite. Note: Nested tables, varrays, and bitmap indexes are NOT transportable. ()#A'ABAS* - %ists status and reco"er& info (db name) I ) creation date) last chec+*oint) etc) ()#A'AFIL* - Info on file D) name) creation date) status) chec+*oint) etc. ()BAC+,- - 9hich files are .6TI?3 in bac+u* mode. ()#A'AFIL*./*A#*R - 9hich file are in bac+u* mode (F2EE;>;31). ()I0S'A0C*.R*CO(*R1 - 6ontains si$e information of redo lo's. ()R*CO(*R.FIL* - use to determine which file(s) need reco"er&. ()R*CO(*R1.FIL*.S'A',S - files needin' reco"er& and their reco"er& status. ()R*CO(*R1.S'A',S - o"erall database reco"er& info. #ata$ase Failure 'ypes: 1) 1tatement failure - failed 1F% is automaticall& rolled bac+ and an error is returned to user. 2) 2ser Process failure - abnormal disconnect - PM4/ detects and rolls bac+ and releases loc+s. 3) 2ser 3rror (dro* table) data) - B. is re0uired to reco"er data (im*ort or incom*lete reco"er&) #) Instance Failure - .bnormal shutdown - Instance sim*l& needs restarted) 1M4/ auto reco"ers b& a) !ollin' forward chan'es in the redo lo' not recorded in the datafiles before 4*en of database. b) !ollbac+s can occur after the database is o*en) when bloc+ data is re0uested. A) Media Failure - %oss or corru*tion of files - B. needs to a**l& a**ro*riate reco"er&. Read Only 'a$lespaces: .%T3! T.B%31P.63 ts1 !3. 4/%;G 6hec+*oint occurs when made read onl&) 16/ is written to headers) and does not chan'e. 1hould be bac+ed u* (alon' with control file) immediatel& followin' read onl&. #ata2iles CA0 contain unco&&itted data - ata is chan'ed and uncommitted and forced off to dis+ b& the B9! *rocess when more db buffer s*ace is re0uested b& other transactions.

Setting up Arc ive Logging: %45:.!6<I?3:1T.!T > T!23 in init.ora) .%T3! .T.B.13 .!6<I?3 %45G In Oracle8I you can have multiple archive destinations and multiple archive processes. %45:.!6<I?3:M.@:P!4631131 > n 2se to define multi*le archi"er *rocesses. For multi*le archi"er destinations) %45:.!6<I?3: 2P%3@: 31T > HdirI 4! %45:.!6<I?3: 31T:1 > HdirIG 8 %45:.!6<I?3: 31T:A > HdirIG %45:.!6<I?3:126633 : 31T > n (number of destinations for successful lo' switch). E ample! %45:.!6<I?3: 31T:1 > J%46.TI4/>Carchi"e1 M./ .T4!; !34P3/K %45:.!6<I?3: 31T:2 > J%46.TI4/>Carchi"e2 4PTI4/.%K %45:.!6<I?3: 31T:3 > J%46.TI4/>Carchi"e3 4PTI4/.%K %45:.!6<I?3: 31T:# > J13!?I63>standb&:db1 M./ .T4!; !34P3/>BLLK If %45:.!6<I?3:126633 : 31T>1 then no effect since there are 2 mandator& dests defined. If > 3) then at least 1 of the o*tionals must be written before a redo is reusable. ()#A'ABAS* or s"rm'rM.!6<I?3 %45 %I1T - for current archi"in' state. ()ARC/I(*#.LOG - .rchi"e lo' information from the control file. ()ARC/I(*.#*S' - describes all the arch destinations (A rows). ()LOG./IS'OR1 - !edo lo' information from the control file (all lo's) ()R*CO(*R1.LOG - !edo lo's needed for reco"er&. ()ARC/I(*.-ROC*SS*S - information on the archi"al *rocesses (.!6L)18) (!M./) ()BAC+,-.#A'AFIL* - info from controlfile about bac+ed u* files. ()BAC+,-.#*(IC* - list of su**orted 3rd *art& de"ices. ()BAC+,-.R*#OLOG - info on archi"e lo's in bac+u* sets. ()BAC+,-.S*' - info about bac+u* sets. ()BAC+,-.-I*C* - info about bac+u* *ieces within bac+u* sets. ()BAC+,-.CORR,-'IO0 - info about corru*t bloc+s in datafiles ()S*SSIO0.LO0GO-S - 'et status of !M./ o*eration (reco"er& or bac+u*).

'/* BAC+,Backup Considerations: .rchi"e when8 1. /o data loss is acce*table. 2. atabase is needed online 2# b& N. 3. Point in time reco"er& ma& be needed (roll db forward bac+ to a *rior state). 9hen structural chan'es are made8 1. .rchi"in' .fter chan'es) .%T3! .T.B.13 B.6=2P 64/T!4%FI%3 T4 HfileIG 2. /o .rchi"e Bac+u* entire database before and after the chan'e is made. !ead 4nl& tables*aces onl& need bac+ed u* after the& are set to read onl& or are manuall& chan'ed. - ysical $ackups: T&*es( 6losed > database le"el) 4P3/ > tables*ace or datafile le"el. 5et file information from8 ()'a$lespace and ()data2ile (or #BA.#A'A.FIL*S). ()Control2ile3 ()Log2ile COL# BAC+,-S: 1. 2. 3. 1hutdown /4!M.% or IMM3 I.T3 or T!./1.6TI4/.% (abort is inconsistent). .ll datafiles) controlfiles) online redo lo's (o*tional) and the init.ora *arameter file. 4*en the database

/O' BAC+,-S: 1. 2. 3. #. A. .%T3! T.B%31P.63 ts1 B35I/ B.6=2P Bac+ u* the tables*ace datafiles. .%T3! T.B%31P.63 ts1 3/ B.6=2P 8 Force a lo' switch - .%T3! 1;1T3M 19IT6< %45FI%3G Bac+u* controlfile - .%T3! .T.B.13 B.6=2P 64/T!4%FI%3 T4 HfileI !3213G

Logical Backups: 6an be accom*lished throu'h e7*orts.

*4-OR' 5 I6-OR' !LOGICAL": 37*ort - ma+es a lo'ical co*& of obOect definitions and data to a binar& file (%o'ical bac+u*). 6on"entional ( I!36T>/) uses 1F% select to e7tract data into buffer cache) then into e"aluation buffer irect Path ( I!36T>;) ata is read from dis+ into buffer cache - data in bloc+s is not reor'ani$ed. 64MP!311>; - initial e7tent resi$ed as total current se'ment si$e F33 B.6=>7 - . dot is dis*la&ed in lo' file for e"er& 7 records inserted. F2%%>; or 49/3!>user or T.B%31>schema.table 64/1I1T3/T>; - entire e7*ort as 1 read onl& transaction. !364! >; - u*date the information in the 1;1 tables (I/6777). P I/6T;P3> 64MP%3T3 - 37*ort all obOects and data) reinitiali$e dictionar& "iews. I/6!3M3/T.% - .ll tables that ha"e chan'ed since last incremental) com*lete) or cumulati"e. 62M2%.TI?3 - .ll tables that ha"e chan'ed since last com*lete or cumulati"e. ictionar& Tables( S1S7I0CFIL - Trac+s all e7*orts in current c&cle. S1S7I0C*4- - Trac+s which obOects are in which e7*ort files. S1S7I0C(I# - Trac+s the last e7*ort information. 6lusters are not e7*orted with the Table mode) the& are in 2ser or Full mode. 1;1 owner obOects (data dictionar&) are ne"er e7*orted.

Im*ort - !eads e7*ort files and co*ies obOect definitions and data into an 4racle database. I5/4!3>; - 4"erloo+ obOect creation errors - causes rows to be im*orted into e7istin' tables. I/ 3@FI%3>file - Inde7 creation commands written to file (no actual im*ort). 4rder of o*erations( T&*e defs Q ata Q B-Tree inde7es Q ?iews) *rocedures) constraints Q bitma* inde7es. Before im*ort( isable !ef Inte'rit& before im*orts and increase buffer si$e for better *erformance .fter im*ort( 6om*ile all in"alid obOects) reenable !I. S'A0#B1 #A'ABAS*S: 2se standb& databases to minimi$e reco"er& time. .rchi"es from the *rimar& database are a**lied to the standb&. .ddin' datafiles will *ro*a'ate to standb& (lo''ed acti"it&). !enamin' datafiles will not *ro*a'ate to the standb& and must be done manuall&. 2nreco"erable o*erations will not *ro*a'ate to the standb&.

To create a standb& database8 1. .%T3! .T.B.13 6!3.T3 1T./ B; 64/T!4%FI%3 .1 HfileIG 2. .%T3! 1;1T3M .!6<I?3 %45 62!!3/TG archi"e the current redo lo's. 3. 6o*& the controlfile) archi"e lo's) and bac+ed u* datafiles to standb& location. #. 1tart the standb& in /4M42/T mode. A. .%T3! .T.B.13 M42/T 3@6%21I?3 1T./ B; .T.B.13G To +ee* standb& current8 1. 6o*& the archi"e lo's as the& are created to the 1tandb& location. 2. !364?3! F!4M Harchi"e locationI 1T./ B; .T.B.13G To acti"ate the standb& database( 1. .%T3! .T.B.13 .6TI?.T3 1T./ B; .T.B.13 - on the current *rimar&. 2. 1<2T 49/ the current *rimar& database. 1tartu* the standb& database (resetlo's).

#A'ABAS* R*CO(*R1 SC*0ARIOS: FRO6 COL# BAC+,-8 1. 1hutdown the database. 2. !eco"er all datafiles) controlfiles (online redos) from ta*e. 3. 1T.!T2P M42/T #. .%T3! .T.B.13 !3/.M3 FI%3 if necessar& (new file locations). A. .%T3! .T.B.13 4P3/ !313T%451 (if online redos are not restored)G FRO6 /O' BAC+,-8 Co&plete 5 Initially Open 5 Closed !6ounted" 9 (1&stem or !B1 lost) or maOorit& of datafiles). 1) 6lose the database if not alread& closed. 2) !estore the necessar& files from bac+u*. 3) 1T.!T2P M42/TG #) !364?3! .T.B.13 or !364?3! .T.FI%3 HfileIG A) .%T3! .T.B.13 4P3/G Co&plete 5 Initially Open 5 Open - (File corru*tion or media failure) database is still o*en and a"ailable) 1) Ta+e tables*aces andCor datafiles to be reco"ered offline if not alread& offline. 2) !estore necessar& datafiles. 3) !364?3! .T.FI%3 HfileI or !364?3! T.B%31P.63 tsnameG #) Brin' the tables*ace or datafile online A) .%T3! .T.B.13 .T.FI%3 HfileI 4/%I/3 or .%T3! T.B%31P.63 tsname 4/%I/3G Co&plete 5 Initially Closed C Open - (media or hardware failure has brou'ht the db down). 1) Mount the database. 2) If files are online) .%T3! .T.B.13 .T.FI%3 HfileI 4FF%I/3G 3) 4*en the database) .%T3! .T.B.13 4P3/G #) !estore the necessar& datafiles. A) !364?3! .T.FI%3 HfileI or !364?3! T.B%31P.63 tsnameG B) Brin' the tables*ace or datafile online .%T3! .T.B.13 .T.FI%3 HfileI 4/%I/3 or .%T3! T.B%31P.63 tsname 4/%I/3G Co&plete 5 Initially Open 5 Open 5 Loss o2 2ile :it no $ackup (must ha"e all archi"es from *oint of ori'inal creation). 1) Ta+e the file offline if not alread&. 2) !ecreate the file( .%T3! .T.B.13 6!3.T3 .T.FI%3 Hfile1I 3) .**l& archi"e lo's to this file - !364?3! T.B%31P.63 ts1 #) Brin' tables*ace online - .%T3! T.B%31P.63 ts1 4/%I/3G Inco&plete: (To reco"er from user error or if all archi"es are not a"ailable or loss of all control files). 1. 1hutdown and bac+u* entire database. 2. !estore .%% datafiles - all datafiles must be restored to a *rior *oint in time. o not restore control file) redo lo's) *assword files) or *arameter files. 3. Mount the database. #. !364?3! .T.B.13 2/TI% 6./63% Q 2/TI% TIM3 H;;;;-MM- (<<2#(MI(11I Q 2/TI% 6<./53 scnD (Fuer& ?R%45:<I1T4!; to 'et the 16/ number) 21I/5 B.6=2P 64/T!4%FI%3G If all controlfiles are lost and cannot be recreated. If current controlfile does not match structure of db at *oint &ou are reco"erin' to. In a disaster reco"er& situation (no current control files are a"ailable). A. .%T3! .T.B.13 4P3/ !313T%451G

B.

Bac+u* the database.

To restore to a different location) Mount db) .%T3! .T.B.13 !3/.M3 .T.FI%3) 4*en db. 'o ena$le auto&atic recovery: 13T .2T4!364?3!; 4/ 3nter .2T4 when *rom*ted for an archi"e lo' !364?3! .2T4M.TI6 8 -arallel Recovery: <a"e se"eral ser"er mana'er sessions reco"erin' se*arate tables*aces simultaneousl&. 1et init.ora *arameter !364?3!;:P.!.%%3%I1M (use no more than 2 *rocesses *er dis+) !364?3! .T.B.13 P.!.%%3% 35!33 A I/1T./631 2 (A *rocesses on 2 instances>1L). #istri$uted Recovery: If com*lete reco"er& is done) no further action is re0uired. If an incom*lete reco"er& is done on a database in a distributed en"ironment) a coordinated time or chan'e based reco"er& should be *erformed on all de*endent databases to ensure 'lobal read consistenc&. 1. 2se time based reco"er& on the failed database. 2. 4*en !313T%451. 3. 6hec+ alert file for the messa'e J!313T%451 after incom*lete reco"er& 2/TI% 6<./53 scn. #. Perform incom*lete reco"eries on de*endent databases to the new 16/. Clearing a corrupted redo log 2ile (when dro**in' is not *ossible and database must be +e*t o*en): .%T3! .T.B.13 6%3.! 2/.!6<I?3 %45FI%3 5!42P 1G Perform a com*lete bac+u* after this o*eration. ;;; Recover 2ro& 2ailure a2ter R*S*'LOGS !$e2ore ne: $ackup" 1) 1<2T 49/ IMM3 I.T3G 2) 6o*& current control files to a sa"e location. 3) !estore files and control files from a time before resetlo's (last 'ood bac+u*). #) 1T.!T2P M42/TG A) 5et 16/ a**lied at last reco"er& from the alert lo'. B) !364?3! .T.B.13 2/TI% 6<./53 scn 21I/5 B.6=2P 64/T!4%FI%3G N) 1<2T 49/ /4!M.%G ,) 6o*& current sa"e control files bac+ to ori'inal location. S) 1T.!T2P M42/TG 1L) !364?3! .T.B.13 (a**lies all archi"es from resetlo's to current time)G 11) .%T3! .T.B.13 4P3/G 'a$lespace -oint in 'i&e Recovery: 1) 6lone the database 2) !estore bac+u* on clone and *erform incom*lete reco"er& to time desired. 3) 37*ort tables*ace tables from clone) Im*ort tables*ace tables (or use trans*ortable tables*ace).

'rou$les ooting: #B.BLOC+.C/*C+S,6 < 'R,* . chec+sum for e"er& bloc+ is com*uted and stored in the bloc+ header. ?erified when the bloc+ is read. 3"er& lo' bloc+ is also 'i"en a chec+sum before it is written to the redo lo'. <ea"& *erformance o"erhead. #B.BLOC+.C/*C+I0G < 'R,* 6hec+ data and inde7 bloc+s whene"er the& are chan'ed. Minimal *erformance im*act (does not chec+ bloc+s while readin'). LOG.BLOC+.C/*C+S,6 < 'R,* If set to T!23) 4racle will chec+ lo' file bloc+s for corru*tion at archi"e time (each lo' switch). 4racle will substitute 'ood bloc+s from another member for the corru*ted bloc+s. If all members are corru*t) archi"in' will not occur (must be cleared with the .%T3! .T.B.13 6%3.! 2/.!6<I?3 %45FI%3 5!42P n command and bac+ u* the database). #B(*RIF1 = FIL* S'AR' *0# BLOC+SI>* LOGFIL* F**#BAC+ /*L- -ARFIL* ? 41 utilit& to "erif& the inte'rit& of an online or bac+ed u* datafile. Bloc+si$e default is 2+ and must be s*ecified if bloc+ si$e is not 2+. 37am*le( R db" file>s&stemL1.dbf bloc+si$e>,1S2 lo'file>s&stemL1.lo' feedbac+>1LL #B6S.R*-AIR P%C1F% *ac+a'e to detect and mar+ bloc+ corru*tions. 6reated b& the d$&srpr7s@l and prctrpr7s@l scri*ts. LOG6I0*R 2se to trac+ chan'es to database to *in*oint time or 16/ to be used for imcom*lete reco"er&. 2seful in determinin' lo'ical corru*tion times. 6an be used for 'ranular lo'ical reco"er& b& undoin' s*ecific chan'es.

R*CO(*R1 6A0AG*R: Increased Performance( /o e7tra redo durin' online bac+u*. .utomatic *aralleli$ation. Incremental bloc+. 6om*ress unused bloc+s. etect corru*ted bloc+s. ?erif& "alidit& of bac+u*s. 1tore bac+u* T reco"er& scri*ts in the db.

Recovery 6etadata Control2ile( 1tored in the control file of the tar'et database. 2se 64/T!4%FI%3:!364! :=33P:TIM3 to limit the D of da&s to +ee* this information. U L>no control file e7*ansion V 4racle will create co*ies of controlfile minus the reco"er& data (sna*shots) when !M./ needs a read consistent "iew. Recovery Catalog( . 6atalo' can be created in a se*arate database to +ee* more info (less in the control file) . catalo' is also necessar& for storin' scri*ts and *erformin' autoreco"eries. 6atalo' can be used to recreate control files. 1e*arate catalo' should be +e*t for each tar'et database (usin' different schemas). 6!3.T3 213! rman:db1 8 3F.2%T T.B%31P.63 rts1 F24T. 2/%IMIT3 4/ rts1G 5!./T !364?3!;:6.T.%45:49/3! T4 rman:db1G 5!./T 64//36T) !3142!63 T4 rman:db1G R rman catalo' rman:db1Crman:db1Wcatdb ms'lo'>catalo'.lo' !M./M 6!3.T3 6.T.%45 T.B%31P.63 rts1G !M./M !35I1T3! .T.B.13G Connecting: Rr&an target s&stemCmana'erX Wdb1 Y nocatalo' Wbac+u*all.rc" lo' bac+u*1.lo' (batch cmdfile) Rr&an target s&stemCmana'erX Wdb1 Y catalog rmanCrmanWcatdb to s*ecif& a catalo' (interacti"e). 6edia 6anage&ent Layer !66L"( . com*atible MM% is needed for !M./ to write to ta*e. C annel: To *erform and record bac+u* o*erations) !M./ re0uires a lin+ to the tar'et database. 6an allocate more than 1 channel to enable *arallel o*erations. .%%46.T3 6<.//3% d1 T;P3 I1= Q /.M3 Jde"LCta*e1KG (t&*e can be ta*e if MM% installed) Standalone Co&&ands: 6<./53) 64//36T) 6!3.T3 6.T.%45) !31;/6 6.T.%45) 6!3.T3 16!IPT) 3%3T3 16!IPT) !3P%.63 16!IPT) 1T.!T2P) 1<2T 49/) !3P4!T. o not need a channel .re e7ecuted within a !2/ bloc+. R*S10C CA'ALOG - use to s&nchroni$e catalo' with chan'es in control file (done at e"er& bac+u* or co*& automaticall&. CA'ALOG - use to record chan'es done outside of !M./ (ie. 41 bac+u*). 37) 6.T.%45 .T.FI%364P; HCdis+1Cs&sL1.dbfI T.5 Hs&stsLS22IG C/A0G* - mar+ as una"ailable) delete) or "alidate a *iece) ima'e co*& or archi"ed lo'. 37) 6<./53 .!6<I?3%45 HCaCarch1I 2/6.T.%45 Duse 2/.?.I%.B%3 if tem*orar&. 37) 6<./53 .T.FI%364P; HCdis+1Cs&stem.ba+I 6!4116<36=G 37) 6<./53 .T.FI%364P; HCdis+1Cs&stem.ba+I 3%3T3 D*h&sicall& delete it. 37) 3%3T3 3@PI!3 B.6=2P Dremo"es all e7*ired records in catalo'.

R*-OR' co&&and: Produces a detailed analysis of the recovery catalog. !M./M !3P4!T SC/*6A - 9hat is the database structureZ !M./M !3P4!T 0**# BAC+,- - 9hich files need bac+ed u*Z I0CR*6*0'AL( !M./M !3P4!T /33 B.6=2P I/6!3M3/T.% 3 .T.B.13 9hich files need more than 3 incrementals for reco"er&Z #A1S( !M./M !3P4!T /33 B.6=2P .;1 3 T.B%31P.63 1;1T3M - 9hich files for the s&stem tables*ace ha"e not been bac+ed u* in 3 or more da&sZ R*#,0#A0C1( !M./M !3P4!T /33 B.6=2P !3 2/ ./6; 3 - 9hich files do not ha"e 3 or more bac+u*sZ !M./M !3P4!T OBSOL*'* !3 2/ ./6; - 9hich bac+u*s can be deletedZ !M./M !3P4!T ,0R*CO(*RABL* .T.B.13 db1- 9hich files are not reco"erableZ LIS' co&&and: Produces a detailed re*ort listin' all information for bac+u* sets) datafile co*ies) and incarnations. !M./M %I1T CO-1 OF 'ABL*S-AC* J1;1T3MKG !M./M %I1T BAC+,-S*' OF #A'AFIL* HCdis+1Cfile1IG !M./M %I1T I0CAR0A'IO0 OF #A'ABAS* db1G !M./M %I1T BAC+,- OF 'ABL*S-AC* tbs1 CO6-L*'*# AF'*R HMa& 1 1SSS LL(LL(LLIG !M./M %I1T BAC+,- OF #A'ABAS* #*(IC* '1-* Hsbt:ta*eIG SCRI-'S: 37am*le( !M./M6reate scri*t %e"elLbac+u* ( .llocate channel d1 t&*e dis+G Bac+u* Incremental le"el L format HCuL1CdbL1Cbac+u*C[d:[s:[*I file*erset A (database include current controlfile)G s0l Halter database archi"e lo' currentIG release channel d1G) !M./M run Xe7ecute scri*t %e"elLbac+u*GY Run co&&and: o*eratin' s&stem command. 1F% command. !un scri*t. !M./M run X host Jls -lK Y !M./M run X s0l Jalter s&stem switch lo'fileK Y !M./M run X e7ecute scri*t ni'htl&bac+u*GY

Incarnation: . number used to identif& the "ersion of a database *rior to a lo' se0uence bein' reset to L. . new incarnation is created when a database is reco"ered to a *oint in time or o*ened with resetlo's. .fter !313T%451) the catalo' cannot be o*ened until R6A0A R*S*' #A'ABAS*B is issued. other "iews8 RC.#A'ABAS* - info > db+e&) dbname) incarnation) chan'eD) last resetlo's time. RC.'ABL*S-AC* - which tables*aces are stored in which bac+u*set. RC.#A'AFIL* - which datafiles are stored in which bac+u*set. RC.S'OR*#.SCRI-' - which scri*ts e7ist. RC.S'OR*#.SCRI-'.LI0* - scri*t code lines.

BAC+,- options !scope" C ole $ackup: Full $ackup: Incre&ental $ackup: I&age copy: Bac+u* .%% datafiles and control file. Tar'et can be o*ened or closed. Bac+u* of 1 or more files) bac+s u* .%% B%46=1. (not incremental). ataile bloc+s that ha"e chan'ed since last incremental. 6an be cumulati"e) must ha"e a le"el L created as a base. Ph&sical co*& of a datafile on dis+.

B.6=2P U F2%% Q I/6!3M3/T.% %3?3% n V (L>Full) 1>monthl&) 2>wee+l&) 3>dail&)8,) FI%31P3!13T n <ow man& files to multi*le7 into bac+u* sets M.@64!!2PT n Ma7 corru*t bloc+s before *rocess fails. 1=IP U offline Q readonl& Q inaccessible V ( .T.B.13 Q T.B%31P.63 Q .T.FI%3 Q .!6<I?3%45 Q 62!!3/T 64/T!4%FI%3) 37am*le( !M./M .%%46.T3 6<.//3% 61 T;P3 I1=G !M./M .%%46.T3 6<.//3% 62 T;P3 I1=G !M./M .%%46.T3 6<.//3% 63 T;P3 I1=G !M./M B.6=2P I/6!3M3/T.% %3?3% L F4!M.T HCdis+1Cbac+u*Cdfile[1[t.ba+I ( .T.FI%3 1)#)A 6<.//3% 61 T.5 co*&1) ( .T.FI%3 2)3)S 6<.//3% 62 T.5 co*&2) ( .T.FI%3 B)N), 6<.//3% 63 T.5 co*&3)G !M./M 1F% H.%T3! 1;1T3M .!6<I?3 %45 62!!3/TIG

CO-1 !I&age Copies" 6an be used in *lace of restorin' files from ta*e (ima'e co*& e7ists on dis+) !M./M 64P; U .T.FI%3 Hf1I Q 62!!3/T 64/T!4%FI%3 Q .!6<I?3%45 V T4 Hf2I X%3?3% nY

R*CO(*R !M./ uses the reco"er& catalo' or control file to decide which full) incremental) ima'e co*ies and archi"ed lo's to use. !364?3! U .T.B.13 Q T.B%31P.63 Q .T.FI%3 V X 2/TI% U 6./63% Q 6<./53 Q TIM3 V 37am*le( .%%46.T3 6<.//3% d1 T;P3 /.M3 Hsbt:ta*eIG R*S'OR* .T.B.13G Drestores all necessar& files from ta*e R*CO(*R .T.B.13G 1F% H.%T3! .T.B.13 4P3/IG To relocate a file (tar'et is mounted)8 S*' 0*C0A6* F4! .T.FI%3 1 T4 HCdis+2Cs&sL1.dbfI) .T.FI%3 2 T4 HCdis+2CusrL1.dbfG 8 !31T4!3 .T.B.13G SCI'C/ #A'AFIL* .%%G Du*dates the catalo' !364?3! .T.B.13G

Ds*ecifies where to restore file

You might also like