Team-Fly
OracleInternals:Tips,
Tricks,andTechniquesfor
DBAs
byDonaldK. ISBN:084931139X
Burleson(ed)
AuerbachPublications©2002
(878pages)
Providesavaluable
compilationof
articles,pointersand
practicesfromtheOracle
Internalnewsletter.
TableofContents
OracleInternals—Tips,Tricks,andTechniquesforDBAs
Introduction
PartI-OracleApplicationsDevelopmentTechniques
Chapter1 - APracticalExampleofDataConversion
Chapter2 - UsingWizardsinanOracleDeveloper6iForm
UsingOracle’sDeveloper6itoCreateaRecord
Chapter3 Directory
UsingHierarchicalTreeItemsinOracle’s
Chapter4 Developer6i
PopulatingOracleFormHierarchies
Chapter5 IncrementallyatRuntime
OracleDesigner2.1.2.API:EnforcingColumn
Chapter6 - NamingStandards
PartII-OracleWebDevelopment
Chapter7 - Buildinga.comfromtheGroundUp
Chapter8 - RapidWebDeploymentwithWebDB
Chapter9 - IntroductiontoiASfortheOASAdministrator
Chapter10 - ViewingPerformanceDatawithOAS
Chapter11 - TopDBAScriptsforWebDevelopers
Chapter12 - Web-BasedTestingandCapacityPlanning
Chapter13 - HTTPListeners
Chapter14 - IntroductiontoUTL_HTTP
Portal3.0:MovingFoldersAcrossContent
Chapter15 AreaswithItsAPI
Chapter16 - NotWebDB3.0,NotiPortal,ButOraclePortal
PartIII-JavaandOracle
Chapter17 - TheFastTracktoJavawithOracle
Chapter18 - BuildingaJavaAppletforMonitoringOracle
PartIV-OracleandUNIX
Chapter19 - UNIXScriptsforOracleAdministration
Chapter20 - UNIXTipsandTricksfortheOracleDBA
FileExchangeSolutions:SQL*Loader,PL/SQL,
Chapter21 andPro*C
GaugingHowLinuxMayChangetheDBMS
Chapter22 Market
PartV-OracleBackupandRecovery
StrategiesforanArchivesManagement
Program
Chapter24 - ScriptingOracleBackupswithRMANandEBU
Chapter25 - AlertMechanismsforRMANBackups
Chapter26 - TipsandScriptsforImplementingRMAN
Chapter23 -
Chapter27 - PagingPeoplewithOracle8iOutoftheBox
PartVI-OracleSQLTuning
Chapter28 - Cost-BasedOptimization:WhysandHows
Chapter29 - AnalyticFunctions
PiranhasinthePool:InvestigationsintoLiteral
Chapter30 SQLandOracleSharedPoolPerformance
Chapter31 - ManagingDatabaseObjectsinSets
Chapter32 - Oracle’sJoins
Chapter33 - To_Format
PartVII-OracleDiskManagement
ExploringDiskSizeandOracleDiskI/O
Performance
AdaptiveStrategiesforDiskPerformancein
Chapter35 Oracle
Chapter36 - RAIDandOracle
Chapter37 - VisualizingtheI/OSignature
Chapter34 -
PartVIII-DistributedOracleSystems
AutomatingDistributionofOracleClient
Software
Chapter39 - SQL*NetDiagnosticsandPerformanceTuning
Chapter38 -
PartIX-OracleBufferandSGAManagement
Chapter40 - PinningPackagesintheSGA
InvestigatingtheMultipleBufferPoolFeatureof
Chapter41 Oracle8
Chapter42 - DivingintotheSharedPool
Chapter43 - ManagingMultipleBufferPoolsinOracle8
Chapter44 - Oracle8iBufferCache:NewFeatures
PartX-OracleTableManagement
Chapter45 - HowIReorganizedaLargeDatabase
Chapter46 - PartitionandConquer
Chapter47 - EliminatingSpaceReorganizationsinOracle8i
DeterminingtheTableRebuildRatioforOracle
Chapter48 Tables
Chapter49 - OracleParallelQuery
Chapter50 - ManagingOracleTableFreelists
PartXI-OracleSecurity
Chapter51 - UsingRolesinOracleSecurity
Chapter52 - ManagingRow-LevelSecurityinOracle8i
Chapter53 - AuditingOracle
PartXII-OracleDataWarehousing
Chapter54 - What’sWrongwithMyData?
Chapter55 - OracleExpressDevelopmentintheEnterprise
AnApproachtoLoadAnalysisandStress
Chapter56 Testing
Chapter57 - UndocumentedExpress
EnterpriseTransformationandData
Chapter58 Management
PartXIII-OracleDatabaseInternalsManagement
Chapter59 - GettingaQuickStartwithOracle8i
Chapter60 - OracleSessionsMonitoring
Chapter61 - TheObject/RelationalFeaturesofOracle8
Chapter62 - HardwareConsiderations
Chapter63 - OracleExtras
Chapter64 - Oracle’sTriggers
Chapter65 - Concurrency
Chapter66 - TheSupportingGROUPS
Chapter67 - RegisteringaMetadataSchema
Chapter68 - ORADEBUG:AUseful(Undocumented?)Utility
Index
Chapter69 - UsingtheDBMS_LOCKBuilt-InPackage
ListofAppendices
ListofExhibits
Team-Fly
Team-Fly
BackCover
IfyouareatypicalOracleprofessional,youdon'thave
theluxuryoftimetokeepupwithnewtechnologyand
readallthenewmanualstounderstandeachnew
featureofeachreleaseofOracle.Youneeda
comprehensivesourceofinformationandtechniques
forusingthenewtechnology.YouneedOracle
Internals:Tips,Tricks,andTechniquesforDBAs.
Thisbookisacompendiumofthebestandmostuseful
articlesfromOracleInternals,AuerbachPublications'
newsletterforOracledatabaseadministratorsand
otherOracleprofessionals.EditedbyOracleguru
DonaldK.Burleson,itprovidesin-depth,highly
technicalinformationnotfoundinanyotherbooks,
informationonlyavailablefrompeersandconsultants.
Thechaptersfocusonthetrulytoughstuff--proven
techniqueslearnedinthetrenches.Youcouldgetthis
informationfromothersources,butyou'dhavetohunt
andpeckforit.OracleInterals:Tips,Tricks,and
TechniquesforDBAsgivesyoualltheadviceyouneed
inoneeasy-to-useresource.
FEATURES
HighlightsthesuiteofOracleWebdevelopment
toolsandgivesyouanin-depthunderstandingof
theinternalcommunicationsbetweenHTTPand
XML
DemonstrateshowJavacanbeusedtocreate
portableandrobustOracleapplications
Containsinvlauabletipsandtricksregardinghowto
usethedifferentdialectsofUNIXtocommunicate
withthedatabase
ProvidesinformationfromOracletuningexpertson
maximizingtheperformanceofSQLstatements
withinOracle'slibrarycacheandensuringthatyour
Oracledatabaserunsatoptimallevels
ExplainstheinternalarchitectureofdiskI/O
subsystemsandhowtoensurethattheymake
properuseofOracle'sRAMbuffersinorderto
minimizediskI/O
ExploresissuessurroundingdistributedOracle
systems,specficallytechniquesforautomatingthe
distributionofOracleclientsoftwareandtoolsfor
Net8andSQL*Netperformancetuning
CoversthetechnicalnuancesoftheEBUandRMAN
products
Team-Fly
Team-Fly
OracleInternals-Tips,Tricks,andTechniquesfor
DBAs
DonaldK.Burleson,Editor
Chapter44,'Oracle8iBufferCache:NewFeatures,'copyright©2000by
JohnBeresniewiczandSavantCorporation.Printedwithpermission.
Chapter47,'EliminatingSpaceReorganizationsinOracle8i,'copyright
©2000,RobinSchumacher.Printedwithpermission.
LibraryofCongressCataloging-in-PublicationData
Oracleinternals:tips,tricks,andtechniquesforDBAs/editedbyDonald
K.Burleson
p.cm.
Includesbibliographicalreferencesandindex.
ISBN0-8493-1139-X
1.Oracle(Computerfile)2.Relationaldatabases.I.Burleson,Donald
K.
QA76.9.D3
07292001
005.756dc21
2001032077
Thisbookcontainsinformationobtainedfromauthenticandhighly
regardedsources.Reprintedmaterialisquotedwithpermission,and
sourcesareindicated.Awidevarietyofreferencesarelisted.
Reasonableeffortshavebeenmadetopublishreliabledataand
information,buttheauthorandthepublishercannotassume
responsibilityforthevalidityofallmaterialsorfortheconsequencesof
theiruse.
Neitherthisbooknoranypartmaybereproducedortransmittedinany
formorbyanymeans,electronicormechanical,includingphotocopying,
microfilming,andrecording,orbyanyinformationstorageorretrieval
system,withoutpriorpermissioninwritingfromthepublisher.
Allrightsreserved.Authorizationtophotocopyitemsforinternalor
personaluse,orthepersonalorinternaluseofspecificclients,maybe
grantedbyCRCPressLLC,providedthat$1.50perpagephotocopiedis
paiddirectlytoCopyrightClearanceCenter,222RosewoodDrive,
Danvers,MA01923USA.ThefeecodeforusersoftheTransactional
ReportingServiceisISBN0-8493-1139-X/02/$0.00+$1.50.Thefeeis
subjecttochangewithoutnotice.Fororganizationsthathavebeen
grantedaphotocopylicensebytheCCC,aseparatesystemofpayment
hasbeenarranged.
TheconsentofCRCPressLLCdoesnotextendtocopyingforgeneral
distribution,forpromotion,forcreatingnewworks,orforresale.Specific
permissionmustbeobtainedinwritingfromCRCPressLLCforsuch
copying.
DirectallinquiriestoCRCPressLLC,2000N.W.CorporateBlvd.,Boca
Raton,Florida33431.
TrademarkNotice:Productorcorporatenamesmaybetrademarksor
registeredtrademarks,andareusedonlyforidentificationand
explanation,withoutintenttoinfringe.
VisittheAuerbachPublicationsWebsiteat
www.auerbach-publications.com
©2002byCRCPressLLC
AuerbachisanimprintofCRCPressLLC
NoclaimtooriginalU.S.Governmentworks
InternationalStandardBookNumber0-8493-1139-X
LibraryofCongressCardNumber2001032077
PrintedintheUnitedStatesofAmerica1234567890
Contributors
MichaelR.Ault
Consultant,DMRConsultingGroup,Alpharetta,Georgia
SikhaBagui
Lecturer,DepartmentofComputerScience,UniversityofWestFlorida,
Pensacola,Florida
CharlesBanyay
Manager,DeloitteConsulting,Toronto,Ontario,Canada
JohnBeresniewicz
TechnicalProductManager,PreciseSoftwareSolutions,Montgomery
Village,Maryland
BradleyD.Brown
ChairmanandChiefArchitect,TheUltimateSoftwareConsultants,
Lakewood,Colorado
WilliamG.Brown
SeniorConsultant,SymmetryCorp.,SanRafael,California
DonaldK.Burleson
Editor,Kittrell,NorthCarolina
TonyCalalano
Consultant,TheUltimateSoftwareConsultants,Chicago,Illinois
TrevorClarke
ManagementConsultant,DeloitteConsulting,Toronto,Ontario,Canada
HervéDeschamps
TechnicalManager,OracleCorporation,Miami,Florida
RichardEarp
AssociateProfessor,DepartmentofComputerScience,Universityof
WestFlorida,Pensacola,Florida
JefferyFeldman
Manager,DeloitteConsulting,Toronto,Ontario,Canada
HowardFosdick
IndependentDatabaseAdministrator,Chicago,Illinois
FrederickGallegos
CISA,CDE,CGFM,MSBA,AuditAdvisorandFacultyMember,
ComputerInformationSystemsDepartment,CaliforniaStatePolytechnic
University,Pomona,California
JonathanGennick
OracleDatabaseAdministrator,Writer,andEditor,O'Reilly&Associates,
Cambridge,Massachusetts
RickGreenwald
Author,Evanston,Illinois
RomanKab
President,OptimumComputingResources,Cary,NorthCarolina
PaulKorzeniowski
FreelanceWriter,Sudbury,Massachusetts
RichardLee
SeniorConsultant,OperationsReengineering,Deloitte&Touche
ConsultingGroup,Toronto,Ontario,Canada
JonathanLewis
IndependentOracleConsultant,Surrey,England
CharlesMansfield
IndependentOracleContractor,Hillsborough,NorthCarolina
PaulMundell
Consultant,WestHollywood,California
JohnAdolphPalinski
OracleDeveloper,MidwesternPublicUtility,Omaha,Nebraska
RajPande
DatabaseAdministrator,MerrillLynch,Dayton,NewJersey
DmitryPetrov
OracleDatabaseAdministrator,St.Petersburg,Russia
EllenRobinson
Founder,CEO,andPresident,DottoDotCommunications,Denver,
Colorado
BruceD.Rodgers
DomesticSalesVicePresident,SEEKSystems,Inc.,Seattle,
Washington
J.B.Sastry
TechnicalManager,SystemsPerformanceGroup,OracleConsulting
Services,Denver,Colorado
RobinSchumacher
VicePresident,ProductManagement,EmbarcaderoTechnologies,Inc.,
NewAlbany,Indiana
GaryE.Sharpe
PresidentandChiefExecutiveOfficer,TerascapeSoftware,Needham,
Massachusetts
SergShestakov
OracleDatabaseAdministrator,St.Petersburg,Russia
AnunayaShrivastava
FinancialandManufacturingApplications,ComputechAnswers,Detroit,
Michigan
DavidC.Sisk
DatabaseAdministratorandInternalTechnologyConsultant,RhonePoulenc,ResearchTrianglePark,NorthCarolina
MichaelJ.D.Sutton
Adm.A.,CMC,ISP,MIT,BusinessProcessandDocumentManagement
ServicesGroupDirector,Rockland,Ottawa,Ontario,Canada
BijuThomas
OracleDatabaseAdministrator,RenaissanceWorldwide,Inc.,Fort
Worth,Texas
MarkB.Wallace
IndependentConsultant,LosAngeles,California
GuangShengWan
OracleDatabaseAdministrationConsultant,Pittsburgh,Pennsylvania
AlexWatts
PrincipalConsultant,KraftwareSystems,Kent,England
JosephC.Yin
SeniorProgrammerAnalyst,ITACorporateEngineering,Qualcomm
Incorporated,SanDiego,California
Team-Fly
Team-Fly
Introduction
SincetheinceptionofOracleInternalswehavebeenveryfortunateto
havesomeoftheworld'sleadingOracleguruscontributehighlytechnical
materialtoourpublication.
Today'sOracleprofessionalsarenowchallengedmorethaneverbefore
tokeeppacewiththeOracletechnology.Oraclehasevolvedfroma
simplerelationaldatabaseintooneofthemostcomplexEcommerce
platformseverdevised.Itisnotenoughfortoday'sOracleprofessionalto
justunderstandtheOracledatabase.Rather,theOracleprofessional
mustalsounderstandthecomponentsofWebservertechnology,XML,
Oraclesecurity,OracleandJava,andahostofotherareasthatarevery
importantsothatOracleadministratorscandotheirjobsproperly.
Therapidrateoftechnologychangemandatesthatperiodicalssuchas
OracleInternalsexistsothatpracticingOracleprofessionalscankeep
pacewiththeinformationneededtosurvive.Thisdrivingneedfor
technicaltipswasthemainreasonforthecreationandongoingsuccess
ofOracleInternals.ThetypicalOracleprofessionalnolongerhasthe
luxuryofbeingabletokeepupwiththetechnologyandreadallofthe
newmanualstounderstandthenewfeatureswithineachnewreleaseof
Oracle.Instead,heorshereliesonOracleInternalstoprovide
comprehensiveandin-depthtipsandtechniquesforusingthenew
technology.
OracleInternalshasbeenveryfavorablyreceivedbytheOracle
community,inpartbecauseofthewonderfulcontentofthearticles,and
inpartbecauseoftheneedarisingwithintheOraclecommunityforhighly
detailedtechnicalinformationoncomplextechnicaltopics.
JustastheOracleprofessionalischallengedtokeeppacewith
technology,OracleInternalsischallengedwithfindingtop-notchtechnical
articlesthatcanbeusedtoassistOracleprofessionalsinmaximizingthe
utilizationoftheirknowledgetoincorporateofallofOracle'snew
features.
ThisbookistheculminationofthebestarticlesfromOracleInternals
overthepasttwoyears.Itisourhopethatyouwillfindthesein-depth
studiesofOracletobebothinformativeanduseful.
Team-Fly
Team-Fly
PartI:OracleApplicationsDevelopment
Techniques
ThefirstareawepresentisoneregardingOracleapplicationstipsand
techniques.Asisknown,Oraclesupportsahostofdifferentfrontends,
allthewayfromVisualBasic,toPowerBuilder,WebHTML,andOracle's
nativedevelopmenttools.Thereisagreatdealofdemandfromthe
marketplaceforpeoplewhohaveexpertiseinthedevelopmentofOracle
applicationsandcanprovidetipsfortherapidandsuccessful
developmentofcustomapplications.Thissectionalsodiscussesthe
OracleApplicationsproductplatformsandhowOraclemanagerscanuse
OracleAppstofullyimplementthevariousOracleApplicationsmodules.
TheareaofOracleapplicationsisoneofthebroadestwithintheOracle
field.
Ratherthanconcentratingonaspecificproduct,OracleInternals
providessolicitedinformationregardingOracleForms,OracleDeveloper,
andotherapplicationstoolsthatdirectlyimpacttheperformanceand
configurationoftheOracledatabase.
Thechaptersinthissectionderivefromawealthofsources-fromHervé
Deschamps,aseniorOraclecorporatetechnicalmanager,toJohn
Palinski,anotedauthorandexpertonOracledevelopertools.
ChapterList
Chapter1:APracticalExampleofDataConversion
Chapter2:UsingWizardsinanOracleDeveloper6iForm
Chapter3:UsingOracle'sDeveloper6itoCreateaRecordDirectory
Chapter4:UsingHierarchicalTreeItemsinOracle'sDeveloper6i
Chapter5:PopulatingOracleFormHierarchiesIncrementallyat
Runtime
Chapter6:OracleDesigner2.1.2.API:EnforcingColumnNaming
Standards
Team-Fly
Team-Fly
Chapter1:APracticalExampleofData
Conversion
Overview
CharlesBanyay
Conversion-thewordisenoughtodimtheenthusiasmofmostsystems
developers.Thewordinstillsfearinsome,trepidationandloathingin
others.Regardlessofthenatureoftheprojectwithwhichsheorheis
involved,ifthereisanyconversioneffortinvolved,thereactionisthe
same.Excludeitfromprojectscope!Letsomeoneelsedoit!Although
somemightsuspectthattheremaybesomereligiousconnotationhere,
andrightlyso,thetopicofthisarticleisnotconvertingfromonereligion
toanother.Noristhetopicsoftwareconversion,althoughthiswouldbe
closertothemark.Thisarticledealswiththevariousformsofthe
conversionofdata.
Eveniftheprojectpromisestobeprimarilydevelopmentor
implementation,whichisusuallythedreamofmostdevelopers,andeven
ifitinvolvessomeofthelateststate-of-the-arttechnology,theword
'conversion'immediatelythrowsapalloverallthelusterandglitterand
dimsthehopesofaninterestingendeavor.Mostsystems
implementationsinvolvesomeformofconversion.Whenthesoftware
changes,thedatamodelorthedataitselfoftenchangeswithit.
Forsomereason,conversionshavecometobeassociatedwiththe
mundane,boring,andtiresomeaspectsofsystemsimplementation.Most
developerswouldconsiderconversioneffortsasboring,tiresome,and
devoidofinterestingchallenges,whencomparedtotheimplementation
ofstate-of-the-arttechnology.
Thisisamisconceptioninmanyinstances.Conversioneffortscanbeas
challengingasanystate-of-the-arttechnology.Theycanexercisethe
mostcreativeabilitiesoftechnologyprofessionals.Anentirebook
chapterprobablycouldbedevotedtodiscussingthepossiblereasons
behindthegenerallackofenthusiasmfortheconversioneffort.This
chapter,however,willfocusonexaminingthefollowing:
Differenttypesofconversioneffortsthatoneencountersduring
systemsimplementationprojects
TheTaxonomyoftheconversioneffort
Commonpitfallsthatcanhaveratherdetrimentaleffectsonthe
overalleffortifoneisnotawareofthemanddoesnottakethe
necessaryprecautionsbeforehand
Team-Fly
Team-Fly