Page
nit
QiDistributed Data base Recavny and Sesurihy
Sn oraler to recuperate from dlatabase failut
alatabase managemunt
systums reAort Vorious
recovrymanagumunt tchniquu
The ypical strategiea fo olatabas recovey cre
Sa case of soft failures Cresuling in incansistency of
dotabase) ncoven Sthatgie incluole tronsachon undo
rollback.
Sorneimed srounsachion reolo may alsa be adapted to
recover consistent state of the sransoLothioO
Sa cale of hard failores (resulhing in extunsive damoqt
tb databae) ncoveny stratugiu inolusdle nestoring
pat opy she oat abae fam arohival backup
Recovuny am pawer ailure
Sn cale of power failure, it can cause lass of informatitn
fom nan- pusistnt mamany
08 and 2DEMS restart afte power failure.
Recavuy managr initactes tecavuy om dhu transachen.
logs.
f immediate upolate moole, the rcavLny manag
taked the olowing achion s ’
Transachons in he achive. ano undont
failec listore
and written onto the abort list.
Page
Traunscohons in before -commit ist OUre edo.
No achòn is taken tansachon in dhe commit or
abort Jists
sn case of defurd upolate modla falowing chons ue taken
Transaoiond in activ and failed lists are wnittun onta
abort ist
Noundo opemtions requie os thechangu have not
been wittn so dhe disk yt
TransoahonA in befort- cammit list Cre rdone
no achen is taken on
Trani achions in the co mmit or abort IiSt.
A Recovey trom disk ailbre
A disk ailue hadl oradh Causes total databaue loss
Torecover ftom dhis, a new oisk is prepared, hen
Os isrestored onol then the databaue is recavered
using olatabaie backup and tronsactian log
Recoveny methed is same for botth imudiate and
defrdupdate mocdea. he fluwing achions ane taken
by the ncovey manage
Transactions n dhe achve or faileo lists Cre undeno
Land written onto the c A t abort Iist.
Data
Page
Trandaohon in dhe commit and before- Comtnit Mgt
Qre rdone ound written onto the oommit list in
he transachion log
Checkpoinhng
-record
Chackpaint ÀS a point in ime when the data is
written nto he dlatabae from the buffus.
Sn case of system arash, the recavery manaqur
Ldoenat have to rdo trand acthions that have been
carmmitted behre the checkpoint
Periodical checkpointng shortuns the recavry proce
To types ’ Conaistunt Checkpainting
Fuzy chaakpoinking
Consistunt oheckpointhing ’ creates a conaistent image
of the database at oheckpont
’ During ncovey only tranAachon to the night of
the ahckpoint are undone or aalon the ons
to the left nd not be pracled again
Aetions taken for chackpoinhing
An achiva transactions Sspended tempararily
AIl chounges in main memory buffur are Untten onto as
A "checkpoint" recorol is writta in he tansachan ly
The trounAaction log is witten onto disk
The susp endad sronA achions are ruumidl
*fuzey checkpointingAt the hine of chackpaintall
achve trosachond a¯n wittn onto
the troaniaction log
af powerfailure, rcavy managur prncates
only dhe trondach ons that were ach ve duing.
oheckpaint and later
Transachons comithed before chackpoint Ore uunttun
o the disk andthus donot nedto be. ndone.
Example af checkpainhing
teeck time of checkpoining
terh tne of system crouh
Tranachons
Ta commits bafort checkpoint
Starts before oheck point , commiBs before system orah
starts afu sheakpa int, cammits before aystem crash
starts aft oheckpoint and ws achve at the time
of aystem orash.
Ta
Tranyachont
Te
teheck torsh
Aehion takun by rcovey managr
Nothingof Ta
Iransachion redo on
Transachon undo on Ta.
Data
Paga
ATrand oa chan Recovy using UNDo/REDO ’
Two step proc UNDO faulhy trankachonA and thase
affected by foutty tranuachona
not
REDO al,fowlhy ransachianA that were
Unaone due do fawlhy tranachons.
Steps or UNDO opuahon
f the fwthy tanschon has dlane TNSERT, recoery
managu deletes he data item insertad.
J DELETE, rOVLry manager inserts the detetecd data itom
Sf UPDATE, COVeny manag er eliminates sthe value by
writing dhe before update value
Steps for REDO paatian
S thefowlty tranA achon does INSERT, recov1ry anagr
genrata in an iniert trom he log
S DELETE, it qenerates a deletefam the lag
UPDA TE it qenuated updlate fom he log
A Distibuted Commit prottcals One -phale commit
Two -phase comit
Three phase commit
Distibuted Ohe-phaAe commit
This is dhe simplest camit protocol.
het us cansicler thereiS antolling gite and a
numbe of slave sites when the transaetiorh s being
executead.
Page
Aftu each slave hal tolocally
calls completed
co mpleted H's troniachan,
t sends a "DONE " muage to conto lling site.
Slaves wovt
for "Cammit" or"Abart medage from Contoling
site, and dhis waihng time is aalleol window af
vulnrability.
Co ntrollinq site recieveA "DoNE"meage om each slave,
thun maked he docisionto commit or abort This is call ed
al
commit point. t then senou this mMage toSlave sitex
On recivinq this mesaqe slave either commits or
aborts and senda an acknawle dgemant malage a tha
Canhollinq site
Distribuked Tuo-phade commit
Jt reduc the vulnarabilihs of one-phase commit protacak.
purfmud in tuo phael -
’ Prpan phaae (Reacy / Not Ready)
Commit Abort phse
Distnibuted Thee-phase Commit
Steps in thre phase 0ommi ane
Prepare phaie
Prepir to commit phade
-Commit /Abort phae
DISTRLBUTED DATA SECURITY’
Threats ina
in Data base
dvailabilihs os- Reffers to non -avaibbilihy of databa se
objachs to legitimate users.
Page
Snteqrity loss - Ocurs whan unacaptable opratiana
pufomud on a database either nmalicio us,
or accidentaly
-st can happn wtwhile oreating, inkerting updatingor
dlata, and it esults jn cornupted olata
olelehing dlata
ladingto inc9mect decisions
Canfdenthaliy loss - Occurs olue to Unauthened Or
unintntanal disclo sure o
oanfolentialinfamatYian.
t may resolt in legal ochions, secunity thrats
Joss in public confdance.
KMeasu reA of ontal
Accees contol- Jn clude security mechanisnns. in a DBMS.
to protect cgainst unauharizd acces
Floy cntal- Prevents data being transfured in Qucha
way that it can be aceeed by unauthonal
agents
Data enonphion - aoling of data when Senaihve dlata
is to be communj aated over public channels