Você está na página 1de 6

InterviewQuestions&AnsweronRMAN

WhatisRMAN?
RecoveryManager(RMAN)isautilitythatcanmanageyourentireOraclebackupandrecoveryactivities.

Whatisthedifferencebetweenusingrecoverycatalogandcontrolfile?
Whennewincarnationhappens,theoldbackupinformationincontrolfilewillbelost.Itwillbepreservedin
recoverycatalog.

Inrecoverycatalogwecanstorescripts.

Recoverycatalogiscentralandcanhaveinformationofmanydatabases.

Canweusesametargetdatabaseascatalog?
No,Therecoverycatalogshouldnotresideinthetargetdatabase(databaseshouldbebackedup),because
thedatabasecantberecoveredinthemountedstate.

HowdoyouknowthathowmuchRMANtaskhasbeencompleted?
Byqueryingv$rman_statusorv$session_longops

Fromwherelist&reportcommandswillgetinput?
Boththecommandscommandqueringv$andrecoverycatalogviews.V$BACKUP_FILESormanyofthe
recoverycatalogviewssuchasRC_DATAFILE_COPYorRC_ARCHIVED_LOG.

Commandtodeletearchivelogsolderthan7days?
RMAN>deletearchivelogallcompletedbeforesysdate7

Howmanytimesdoesoracleaskbeforedroppingacatalog?
Thedefaultistwotimesonefortheactualcommand,theotherforconfirmation.

Howtoviewthecurrentdefaultsforthedatabase.
RMAN>showall

WhatistheuseofcrosscheckcommandinRMAN?

CrosscheckwillbeusefultocheckwhetherthecataloginformationisintactwithOSlevelinformation.This
commandonlyupdatesrepositoryrecordswiththestatusofthebackups.

e.g.Ifuserremovesarchivedlogsfromdiskwithanoperatingsystemcommand,therepositorystillindicates
thatthelogsareondisk,wheninfacttheyarenot.

Whatarethedifferencesbetweencrosscheckandvalidatecommands?
Validatecommandistoexamineabackupsetandreportwhetheritcanberestored.RMANscansallofthe
backuppiecesinthespecifiedbackupsetsandlooksatthechecksumtoverifythatthecontentsareintactso
thatbackupcanbesuccessfullyrestoredifnecessary.

CrosscheckcommandistoverifythestatusofbackupsandcopiesrecordedintheRMANrepositoryagainst
mediasuchasdiskortape.Thecrosscheckcommandonlyprocessesfilescreatedonthesamedevicetypeas
thechannelrunningcrosscheck.

Whichoneisgood,differential(incremental)backuporcumulative(incremental)backup?
Adifferentialbackup,whichbacksupallblockschangedafterthemostrecentincrementalbackupatlevel1or
0

RMAN>BACKUPINCREMENTALLEVEL1DATABASE

Acumulativebackup,whichbacksupallblockschangedafterthemostrecentincrementalbackupatlevel0

RMAN>BACKUPINCREMENTALLEVEL1CUMULATIVEDATABASE

Cumulativebackupsarepreferabletodifferentialbackupswhenrecoverytimeismoreimportantthandisk
space,becauseduringrecoveryeachdifferentialbackupmustbeappliedinsuccession.Use
cumulativeincrementalbackupsinsteadofdifferential,ifenoughdiskspaceisavailabletostore
cumulativeincrementalbackups.

ThisiscommandfortakingLevel0backup.

RMAN>BACKUPINCREMENTALLEVEL0DATABASE

Whatisthedifferencebetweenbackupsetandbackuppiece?
Backupsetislogicalandbackuppieceisphysical.

RMANcommandtobackupforcreatingstandbydatabase
RMAN>duplicatetargetdatabase

YoulossonedatafileandDBisrunninginARCHIVELOGmode.Youhavefulldatabasebackupof1
week/dayoldanddonthavebackupofthis(newlycreated)datafile.Howdoyourestore/recoverfile?
Createdatafileandrecoverdatafile.

SQL>alterdatabasecreatedatafile/u01/app/oracle/oradata/xyz.dbfsize2G

RMAN>recoverdatafilefile_id

Whatisobsoletebackup&expiredbackup?
Astatusofexpiredmeansthatthebackuppieceorbackupsetisnotfoundinthebackupdestination.

Astatusofobsoletemeansthebackuppieceisstillavailable,butitisnolongerneeded.Thebackuppieceis
nolongerneededsinceRMANhasbeenconfiguredtonolongerneedthispieceaftersomanydayshave
elapsed,orsomanybackupshavebeenperformed.

Whatisthedifferencebetweenhotbackup&RMANbackup?
Forhotbackup,wehavetoputdatabaseinbeginbackupmode,thentakebackup.
RMANwontputdatabaseinbackupmode.

Howtoputmanual/usermanagedbackupinRMAN(recoverycatalog)?
Byusingcatalogcommand.

RMAN>CATALOGSTARTWITH/tmp/backup.ctl

WhataretheArchitecturalcomponentsofRMAN?
1.RMANExecutables
2.Sercerprocess
3.Channels
4.Targetdatabase
5.Recoverycatalogdatabase(optional)
6.MediamanagementLayer(optional)
7.Backups,backupsetsandbackuppieces

Whatarechannels?
AchannelisanRMANserverprocessstartedwhenthereisaneedtocommunicatewithanI/Odevice,suchas
adiskoratape.AchanneliswhatreadsandwritesRMANbackupfiles.Itisthroughtheallocationofchannels
thatyougovernI/Ocharacteristics:

TypeofI/Odevicebeingreadorwrittento,eitheradiskoransbt_tape
NumberofprocessessimultaneouslyaccessinganI/Odevice
MaximizesizeoffilescreatedonI/Odevices
Maximizerateatwhichdatabasefilesareread
Maximizenumberoffilesopenatatime

Whyisthecatalogoptional?
BecauseRMANmanagesbackupandrecoveryoperations,itrequiresaplacetostorenecessaryinformation
aboutthedatabase.RMANalwaysstoresthisinformationinthetargetdatabasecontrolfile.Youcanalsostore
RMANmetadatainarecoverycatalogschemacontainedinaseparatedatabase.Therecoverycatalogschema
mustbestoredinadatabaseotherthanthetargetdatabase.

WhatisaBackupset?
AlogicalgroupingofbackupfilesthebackuppiecesthatarecreatedwhenyouissueanRMANbackup
command.AbackupsetisRMANsnameforacollectionoffilesassociatedwithabackup.Abackupsetis
composedofoneormorebackuppieces.

WhatarethebenefitsofusingRMAN?
1.Incrementalbackupsthatonlycopydatablocksthathavechangedsincethelastbackup.
2.Tablespacesarenotputinbackupmode,thusthereisnoextraredologgenerationduringonlinebackups.
3.Detectionofcorruptblocksduringbackups.
4.ParallelizationofI/Ooperations.
5.Automaticloggingofallbackupandrecoveryoperations.
6.Builtinreportingandlistingcommands.

WhatarethevariousreportsavailablewithRMAN
RMAN>listbackup

RMAN>listarchive

Incatalogdatabase,ifsomeoftheblocksarecorruptedduetosystemcrash,Howwillyourecover?
usingRMANBLOCKRECOVERcommand

HowdoyouenabletheautobackupforthecontrolfileusingRMAN?
IssuecommandatRMANprompt.

RMAN>configurecontrolfileautobackupon

Alsowecanconfigurecontrolfilebackupformat.

RMAN>configurecontrolfileautobackupformatfordevicetypediskto

2>$HOME/BACKUP/RMAN/F.bkp

HowdoyouidentifywhataretheallthetargetdatabasesthatarebeingbackedupwithRMAN
database?
Youdonthaveanyviewtoidentifywhetheritisbackedupornot.Theonlyoptionisconnecttothetarget
databaseandgivelistbackupthiswillgiveyouthebackupinformationwithdateandtiming.

HowdoyouidentifytheblockcorruptioninRMANdatabase?Howdoyoufixit?
Usingv$block_corruptionviewyoucanfindwhichblockscorrupted.

RMAN>blockrecoverdatafile<fileid>block<blockid>

UsingtheabovestatementYourecoverthecorruptedblocks.Firstcheckwhethertheblockiscorruptedornot
byusingthiscommand

SQL>selectfile#block#fromv$database_block_corruption

file#block

2507

theaboveblockiscorrupted

conntoRman

Torecovertheblockusethiscommand

RMAN>blockrecoverdatafile2block507
theabovecommandrecovertheblock507

Nowjustverifyit..

Rman>blockrecovercorruptionlist

HowdoyouclonethedatabaseusingRMANsoftware?Givebriefsteps?Whendoyouusecrosscheck
command?
Checkwhetherbackuppiecesproxycopiesordiskcopiesstillexist.

TwocommandsavailableinRMANtoclonedatabase:

1)Duplicate

2)Restore.

ListsomeoftheRMANcatalogviewnameswhichcontainthecataloginformation?
RC_DATABASE_INCARNATIONRC_BACKUP_COPY_DETAILS

RC_BACKUP_CORRUPTION

RC_BACKUPDATAFILE_SUMMARY

HowdoyouinstalltheRMANrecoverycatalog?
Stepstobefollowed:

1)Createconnectionstringatcatalogdatabase.

2)Atcatalogdatabasecreateonenewuseroruseexistinguserandgivethatuserarecovery_catalog_owner
privilege.

3)LoginintoRMANwithconnectionstring

a)exportORACLE_SID

b)rmantargetcatalog@connectionstring

4)rman>createcatalog

5)registerdatabase

Whatisthedifferencebetweenphysicalandlogicalbackups?
InOracleLogicalBackupiswhichistakenusingeitherTraditionalExport/ImportorLatestDataPump.Where
asPhysicalbackupisknownwhenyoutakePhysicalO/sDatabaserelatedFilesasBackup.

WhatisRAID?WhatisRAID0?WhatisRAID1?WhatisRAID10?
RAID:Itisaredundantarrayofindependentdisk
RAID0:Concatenationandstripping

RAID1:Mirroring

HowtoenableFastIncrementalBackuptobackuponlythosedatablocksthathavechanged?
SQL>ALTERDATABASEenableBLOCKCHANGETRACKING

Howdoyousettheflashrecoveryarea?
SQL>ALTERSYSTEMSETdb_recovery_file_dest_size=100G

SQL>ALTERSYSTEMSETdb_recovery_file_dest=/u10/oradata/school

WhatisauxiliarychannelinRMAN?Whendoyouneedthis?
Anauxiliarychannelisalinktoauxiliaryinstance.Ifyoudonothaveautomaticchannelsconfigured,then
beforeissuingtheDUPLICATEcommand,manuallyallocateatleastoneauxiliarychannelwithinthesameRUN
command.

HowdoyouusetheV$RECOVERY_FILE_DESTviewtodisplayinformationregardingtheflashrecovery
area?
SQL>SELECTname,space_limit,space_used,space_reclaimable,number_of_filesFROM
v$recovery_file_dest

Howcanyoudisplaywarningmessages?
SQL>SELECTobject_type,message_type,message_level,reason,suggested_actionFROM
dba_outstanding_alerts

Howdoyoubackuptheentiredatabase?
RMAN>BACKUPDATABASE

Howdoyoubackupanindividualtablespaces?
RMAN>CONFIGUREDEFAULTDEVICETYPETODISK

RMAN>BACKUPTABLESPACEsystem

Howdoyoubackupdatafilesandcontrolfiles?
RMAN>BACKUPDATAFILE3

RMAN>BACKUPCURRENTCONTROLFILE

Useafastrecoverywithoutrestoringallbackupsfromtheirbackuplocationtothelocationspecifiedinthe
controlfile.

RMAN>SWITCHDATABASETOCOPY

Você também pode gostar