Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
100% found this document useful (1 vote)
822 views

Oracle DBA Interview Questions and Answers - Backup and Recovery

An incremental level 1 backup taken on Monday at 9PM after a level 0 full backup on Sunday at 9PM would backup all block changes made since the level 0. If the database then crashed on Tuesday, the level 0 and incremental level 1 backups could be used to recover the database to its state as of Monday 9PM. Without any backups available, a level 1 incremental backup cannot be taken as it requires a level 0 full backup as the parent.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
822 views

Oracle DBA Interview Questions and Answers - Backup and Recovery

An incremental level 1 backup taken on Monday at 9PM after a level 0 full backup on Sunday at 9PM would backup all block changes made since the level 0. If the database then crashed on Tuesday, the level 0 and incremental level 1 backups could be used to recover the database to its state as of Monday 9PM. Without any backups available, a level 1 incremental backup cannot be taken as it requires a level 0 full backup as the parent.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

OracleDBAInterviewQuestionsandAnswersBackupand

Recovery

OracleBackupandRecoveryInterviewQuestionsandAnswers

Howwouldyoudecideyourbackupstrategyandtimingforbackup?Infactbackupstrategyispurely
dependsuponyourorganizationbusinessneed.
Ifnodowntimethendatabasemustberunonarchivelogmodeandyouhavetotakefrequentlyordailybackup.
Ifsufficientdowntimeisthereandlossofdatawouldnotaffectyourbusinessthenyoucanrunyourdatabasein
noarchivelogmodeandbackupcanbetakeninfrequentlyorweeklyormonthly.
Inmostofthecaseinanorganizationwhennodowntimethenfrequentinconsistentbackupneeded(daily
backup),multiplexonlineredologfiles(multiplecopies),differentlocationforredologfiles,databasemustrun
inarchivelogmodeanddataguardcanbeimplementedforextrabitofprotection.

WhatisdifferencebetweenRestoringandRecoveryofdatabase?
Restoringmeanscopyingthedatabaseobjectfromthebackupmediatothedestinationwhereactuallyitis
requiredwhereasrecoverymeanstoapplythedatabaseobjectcopiedearlier(rollforward)inordertobring
thedatabaseintoconsistentstate.

Whatisthedifferencebetweencompleteandincompleterecovery?Anincompletedatabaserecoveryisa
recoverythatitdoesnotreachtothepointoffailure.TherecoverycanbeeitherpointoftimeorparticularSCN
orParticulararchivelogspeciallyincaseofmissingarchivelogorredologfailurewhereasacompleterecovery
recoverstothepointoffailurepossiblywhenhavingallarchivelogbackup.

WhatisthebenefitofrunningtheDBinarchivelogmodeovernoarchivelogmode?
Whenadatabaseisinnoarchivelogmodewheneverlogswitchhappenstherewillbealossofsomeredoes
loginformationinordertoavoidthis,redologsmustbearchived.Thiscanbeachievedbyconfiguringthe
databaseinarchivelogmode.

Ifanoracledatabaseiscrashed?Howwouldyourecoverthattransactionwhichisnotinbackup?Ifthe
databaseisinarchivelogwecanrecoverthattransactionotherwisewecannotrecoverthattransactionwhichis
notinbackup.

WhatisthedifferencebetweenHOTBACKUPandRMANbackup?
Forhotbackupwehavetoputdatabaseinbeginbackupmode,thentakebackupwhereasRMANwouldnot
putdatabaseinbeginbackupmode.RMANisfastercanperformincremental(changesonly)backup,anddoes
notplacetablespaceinhotbackupmode.
CanweuseSametargetdatabaseasCatalogdatabase?
No,therecoverycatalogshouldnotresideinthetargetdatabase(databasetobebackedup)becausethe
databasecannotberecoveredinthemountedstate.

Incrementalbackuplevels:
Level0fullbackupthatcanbeusedforsubsequentincrementals
RMAN>backupincrementallevel0database
DifferentialLevel1onlytheblocksthathavechangedsincethelastbackup(whetheritislevel0orlevel1)
RMAN>backupincrementallevel1differentialdatabase
CumulativeLevel1allchangessincethelastlevel0incrementalbackup
RMAN>backupincrementallevel1cumulativedatabase
Afullbackupcannotbeusedforacumulativelevel1backup.
Acumulativelevel1backupmustbedoneontopofanincrementallevel0backup.

WhyRMANincrementalbackupfailseventhoughfullbackupexists?IfyouhavetakentheRMANfull
backupusingthecommandBackupdatabase,whereasalevel0backupisphysicallyidenticaltoafullbackup.
Theonlydifferenceisthatthelevel0backupisrecordedasanincrementalbackupintheRMANrepositorysoit
canbeusedastheparentforalevel1backup.Simplythefullbackupwithoutlevel0cannotbeconsideredas
aparentbackupfromwhichyoucantakelevel1backup.

CanweperformRMANlevel1backupwithoutlevel0?Ifnolevel0isavailable,thenthebehaviordepends
uponthecompatibilitymodesetting(oracleversion).
Ifthecompatibilitymodelessthan10.0.0,RMANgeneratesalevel0backupoffilescontentsatthetimeof
backup.
Ifthecompatibilityisgreaterthan10.0.0,RMANcopiesallblockchangessincethefilewascreated,andstores
theresultsaslevel1backup.

HowtoputManual/UsermanagedbackupinRMAN?Incaseofrecoverycatalog,youcanputbyusing
catalogcommand:
RMAN>CATALOGSTARTWITH/oracle/backup.ctl

HowtocheckRMANversioninoracle?IfyouwanttocheckRMANcatalogversionthenusethebelowquery
fromSQL*plus
SQL>Select*fromrcver

WhathappensactuallyincaseofinstanceRecovery?WhileOracleinstancefails,Oracleperformsan
InstanceRecoverywhentheassociateddatabaseisbeingrestarted.Instancerecoveryoccursin2steps:
Cacherecovery:Changesbeingmadetoadatabasearerecordedinthedatabasebuffercacheaswellas
redologfilessimultaneously.Whenthereareenoughdatainthedatabasebuffercache,theyarewrittento
datafiles.IfanOracleinstancefailsbeforethesedataarewrittentodatafiles,Oracleusesonlineredologfiles
torecoverthelostdatawhentheassociateddatabaseisrestarted.Thisprocessiscalledcacherecovery.
Transactionrecovery:Whenatransactionmodifiesdatainadatabase(thebeforeimageofthemodifieddata
isstoredinanundosegmentwhichisusedtorestoretheoriginalvaluesincasethetransactionisrolledback).
Atthetimeofaninstancefailure,thedatabasemayhaveuncommittedtransactions.Itispossiblethatchanges
madebytheseuncommittedtransactionshavegottensavedindatafiles.Tomaintainreadconsistency,Oracle
rollsbackalluncommittedtransactionswhentheassociateddatabaseisrestarted.Oracleusestheundodata
storedinundosegmentstoaccomplishthis.Thisprocessiscalledtransactionrecovery.

MyDatabasehasLevel1backup,tellmewhatareallbackedup?withExample?

DatabaseisUPandhastakenLevel0backup,isthebackuptakenisConsistentorInconsistent?

HowdoyousayabackupisConsistentorInconsistent,OracleTerminology?

CanwetakebackupwhentheDatabaseisdown?

IfihaveaRMANfullbackupLevel0ofSun@9PM,onMon9PMtakenincrementalLevel1
backup.Whattypeofbackupdoyougetandwhatisactuallybackedup?

IfihaveaRMANfullbackupofSun@9PM,onMon9PMtakenincrementalLevel1backup.OnTuesday
DatabaseCrashed.Whattypeofbackupdoyougetandwhatisactuallybackedup?

ThereisnoBackupavailable,CanwetakeaLevel1backup?

Atablegotdroppedbetween9AM11AMhowtogettheTablebackupusingRMAN,
DBsize500GBavailablemountpointspacefortablerecoveryis15GB?

SysAdminhaschangedthetimefrom10:00AMto9:30AM,tabledropped,Howdoyourecoverthe
Table?

ADATAFILEiscorruptedandthereisnobackup,Howtorecoverthedatafile?

AllControlfilesarecorrupted,Howtorecoverthecontrolfile?

You might also like