0% found this document useful (0 votes)
297 views

Oracle DBA Interview Questions and Answers - Backup and Recovery

Oracle Datapump can be used for data migration tasks like schema refresh, transporting objects between databases, and backups. It works faster than traditional exp/imp utilities by using direct path loads and parallel processing. During a Datapump export, performance can be improved by setting parameters like BUFFER, writing dump files to separate disks, and exporting in parallel. On import, disabling constraints and indexes beforehand and recreating them later can help speed. Datapump utilizes network bandwidth and memory on both database servers, processing objects in parallel across CPUs and writing to multiple files if the destination is space-constrained.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
297 views

Oracle DBA Interview Questions and Answers - Backup and Recovery

Oracle Datapump can be used for data migration tasks like schema refresh, transporting objects between databases, and backups. It works faster than traditional exp/imp utilities by using direct path loads and parallel processing. During a Datapump export, performance can be improved by setting parameters like BUFFER, writing dump files to separate disks, and exporting in parallel. On import, disabling constraints and indexes beforehand and recreating them later can help speed. Datapump utilizes network bandwidth and memory on both database servers, processing objects in parallel across CPUs and writing to multiple files if the destination is space-constrained.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

OracleDBAInterviewQuestionsandAnswersDatapump

OracleDatapumpInterviewQuestionsandAnswers

Inwhichcasesimp/expisused?
Eliminatedatabasefragmentation
Schemarefresh(movetheschemafromonedatabasetoanother)
Detectdatabasecorruption.Ensurethatallthedatacanberead(ifthedatacanbereadthatmeansthereis
noblockcorruption)
Transportingtablespacesbetweendatabases
Backupdatabaseobjects

WhicharethecommonIMP/EXPproblems?
ORA00001:Uniqueconstraint...violatedPerhapsyouareimportingduplicaterows.UseIGNORE=Nto
skiptablesthatalreadyexist(impwillgiveanerroriftheobjectisrecreated)orthetablecouldbedropped/
truncatedandreimportedifweneedtodoatablerefresh..
IMP00015:Statementfailed...objectalreadyexists...UsetheIGNORE=Yimportparametertoignore
theseerrors,butbecarefulasyoumightendupwithduplicaterows.
ORA01555:SnapshottoooldAskyouruserstoSTOPworkingwhileyouareexportingoruseparameter
CONSISTENT=NO(Howeverthisoptioncouldcreatepossiblereferentialproblems,becausethetablesarenot
exportedfromonesnapshotintime).
ORA01562:FailedtoextendrollbacksegmentCreatebiggerrollbacksegmentsorsetparameter
COMMIT=Y(withanappropriateBUFFERparameter)whileimporting.

HowcanwecheckDATAPUMPfileiscorruptedornot?Sometimeswemaybeinsituation,tocheckwhether
thedumpfileexportedlongtimebackisVALIDornotorourapplicationteamissayingthatthedumpfile
providedbyusiscorrupted.
UseSQLFILEParameterwithimportscripttodetectcorruption.Theuseofthisparameterwillreadtheentire
datapumpexportdumpfileandwillreportifcorruptionisdetected.
impdpsystem/***directory=dump_dirdumpfile=expdp.dmplogfile=corruption_check.log
sqlfile=corruption_check.sql
ThiswillwriteallDDLstatements(whichwillbeexecutedifanimportisperformed)intothefilewhichwe
mentionedinthecommand.

HowcanwefindelapsedtimeforparticularobjectduringDatapumporExport?Wehavean
undocumentedparametermetricsinDATAPUMPtocheckhowmuchittooktoexportdifferentobjectstypes.
Expdpsystem/passwddirectory=dump_dirdumpfile=expdp_full.dmplogfile=expdp_full.logfull=ymetrics=y

Howtomovetablefromonetablespacetoanothertablespace?
Youcanuseanyofthebelowmethod:
1.Exportthetable,dropthetable,createdefinitionoftableinnewtablespaceandthenimportthedatausing
(impignore=y).
2.Createnewtableinnewtablespacethendroptheoriginaltableandrenametemporarytablewithoriginal
tablename.
CREATETABLEtemp_nameTABLESPACEnew_tablespaceasselect*from'source_table'
DROPTABLEreal_table
RENAMEtemp_nametoreal_table

WhatisthedifferencebetweenSQL*loaderandImportutilities?
Boththeseutilitiesareusedforloadingthedataintothedatabase.Thedifferenceisthattheimportutilityrelies
onthedatabeingproducedbyanotheroracleutilityExportwhileSQL*Loaderisahighspeeddataloading
mechanismallowsdatatobeloadedthathasbeenproducedbyotherutilitiesfromdifferentdatasource.SQL*
LoaderloadsdatafromstandardOSfilesorflatfileinoracledatabasetables.Export/Importallowsmoving
existingdatainoracleformattoandfromoracledatabase.

Howtoreorganizeschema?
Wecanusedbms_redefinitionpackageforonlinereorganizationofschemaobjects.Otherwiseusing
import/exportanddatapumputilityyoucanrecreateorreorganizeyourschema.

HowwecanimprovetheEXPPerformance?
1.SettheBUFFERparametertoahighvalue(e.g.2M)
2.Ifyourunmultipleexportsessions,ensuretheywritetodifferentphysicaldisks.

HowwecanimprovetheIMPperformance?
1.ImportthetableusingINDEXFILEparameter(theimportisnotdone,butafilewhichcontainstheindexes
creationisgenerated),importthedataandrecreatetheindexes
2.Storethedumpfiletobeimportedonaseparatephysicaldiskfromtheoracledatafiles
3.Ifthereareanyconstraintsonthetargettable,theconstraintsshouldbedisabledduringtheimportand
enabledafterimport
4.SettheBUFFERparametertoahighvalue(ex.BUFFER=30000000(~30MB))andCOMMIT=yorset
COMMIT=n(isthedefaultbehavior:importcommitsaftereachtableisloaded,however,thisusealotofthe
rollbacksegmentsorundospaceforhugetables.)
5.Usethedirectpathtoimportthedata(DIRECT=y)
6.(ifpossible)IncreaseDB_CACHE_SIZE(DB_BLOCK_BUFFERSpriorto9i)considerablyintheinit<SID>.ora
file
7.(ifpossible)SettheLOG_BUFFERtoabigvalueandrestartoracle.

HowDatapumpworksinternally?WhatresourceswillbeutilizedatNetworklevel,inMemorylevel?

HowtoExportDumpfiletodifferentmountpoints(multipledumpfiles)sametimebothinEXPand
EXPDP,asthedestinationhaslessspaceavailable?

You might also like