simplifying database administration with bmc change manager

8
TECHNICAL WHITE PAPER Simplifying Database Administration with BMC CHANGE MANAGER for DB2

Upload: databaseguys

Post on 23-Jun-2015

483 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Simplifying Database administration with BMc chanGe ManaGeR

technical White PaPeR

Simplifying Database administration with BMc chanGe ManaGeR for DB2

Page 2: Simplifying Database administration with BMc chanGe ManaGeR

table of contents

TheAdministrativeChallengeofChange...................................................................................1

>BMCCHANGEMANAGERforDB2—CompareFeature...........................................................1

CompareInput..............................................................................................................................1

ChoosingAppropriateInputSources..........................................................................................1

>DB2Catalog.................................................................................................................................2

>DDLfiles......................................................................................................................................2

>Baselines.....................................................................................................................................2

>Migrateworklists.........................................................................................................................2

DevelopingaBaselineStrategy..................................................................................................2

CompareOutputSources............................................................................................................3

>CDLImplementation...................................................................................................................3

OverviewoftheCompareProcess..............................................................................................3

DatabaseManagementScenarios..............................................................................................4

>Scenario1—MigratenewsetofDB2structuredefinitionchanges..........................................4

>BMCCHANGEMANAGERSolution............................................................................................4

>Scenario2—Backoutdatabasedefinitionchanges...................................................................4

>BMCCHANGEMANAGERSolution............................................................................................4

Summary.......................................................................................................................................5

Page 3: Simplifying Database administration with BMc chanGe ManaGeR

the administrative challenge of changeManagingDB2intoday’sbusinessenvironmentismore

difficultthanever.Businessdynamicshaveincreased

therateofchangeandcomplexitywithinthetypicalIT

environment.Theexplosivegrowthofdata,thedeclinein

experiencedworkforce,andtheabilitytorespondtothe

needsofcriticalDB2applicationsisaconstantchallenge.

Objectsaregrowingandchangingintheirnumber,size,

andtype.Whenacriticalapplicationrequiresachange,

itaffectstheunderlyingobjects.Howcanyouensure

availabilitywhilemaintainingdataintegrity?

Considerthefollowingdatabasemanagementscenariosand

howyoumightsolvethemmanually:

>Identifythestructuredifferencesbetweentwodatabases

andthenmakeoneofthemlookliketheother.Inother

words,migrateanewsetofDB2structuredefinition

changesfromonesubsystemtoanother.

>Backoutaseriesofdatabasedefinitionchangesmade

toadatabaseoverthepastfewmonths,perhapsby

differentpeople,becausetheapplicationdevelopersneed

tobackouttheirprogramchanges.

Youmayknowtheexactmanualprocessthatneedstobe

performedtocomparethe“before”imageoftheobject

definitionsthatyouwanttochangetoan“after”imagethat

alreadyrepresentswhatyouwanttheobjecttolooklike.You

mayhaveanelectronicorhardcopyofbothimagessothat

youcanperformamanualcomparison.However,because

ofthesizeoftheobjects,youmightbetryingtoread

andcomparetensofthousandsoflinesofdatadefinition

language(DDL).Youcandoamanualcomparison,butit

willbetimeconsuming,tedious,anderrorprone.Andif

youdon’thavea“before”or“after”image,thenitwillbea

researchprojectjusttodeterminewhattheobjectsoriginally

lookedlike,orshouldlooklike.BMC®CHANGEMANAGER

forDB2providesanautomated,error-proofmethod.

BMCCHANGEMANAGERforDB2—

Comparefeature

BMCCHANGEMANAGERforDB2providesaCompare

featurethatperformscomplextaskswithaccuracy,speed,

andrelativeease.Onceyouperformsomeinitialplanning

andpreparation,alongwithsomeunderstandingofBMC

CHANGEMANAGER,you’llbeabletodevelopachange

methodologythatcanbeimplementedandusedrepeatedly

withsuccess.Thefollowingtopicswillfamiliarizeyouwith

BMCCHANGEMANAGERforDB2components,terms,

andconcepts.Thisdocumentwillalsocoverhowtoperform

thetwoscenariospreviouslydiscussed.TheBMCCHANGE

MANAGERforDB2userguideandonlinecanalsohelp

furthertailorandfinetuneachangemethodologytosuit

yourneeds.Thefirststepisunderstandingtheinputsources

thatarevalidforCompare.

compare inputPlanningbeginswithknowingwhattheComparefeature

ofBMCCHANGEMANAGERforDB2usesasinput.

TheComparefeatureevaluatestwosetsofinputtoeach

otheranddifferencesareidentified.ThetwoCompare

inputscanbefromanyofthesesources:

>DB2catalog—asetofDB2tablesthataremaintainedby

DB2,whichcontaindefinitionsforallobjectsbelongingto

asubsystem

>DDLfile—afilecontainingDDLinaformatthatis

executableinSPUFI.TheDDLmustconsistofCREATE

andALTERstatements.ALTERstatementsmust

referenceobjectsthatarepreviouslynamedinCREATE

statements(forexample,ALTERstatementsthatareused

tocreateaprimarykey).

>Baseline—asnapshotofthedefinitionofobjects

capturedataparticularpointintime.Abaselineiscreated

inBMCCHANGEMANAGERandstoredintheBMC

CHANGEMANAGERDB2tables.Theobjectsinthe

baselinecanresideintheDB2catalog(acatalogbaseline)

orinaDDLfileorworklist(aDDLbaseline).Inacatalog

baseline,objectsthatarestoredintheDB2catalogare

usedasinputtocreatethebaseline.InaDDLbaseline,

objectdefinitionsthatarestoredinaDDLfileorBMC

CHANGEMANAGERmigrateworklistareusedasinputto

createthebaseline.

>BMCCHANGEMANAGERmigrateworklist—DDL

createdbytheAnalysiscomponentofBMCCHANGE

MANAGERwithcontrolstatementswrappedaround

theDDL.LikeaDDLfile,amigrateworklistconsistsof

CREATEandALTERstatements.ALTERstatementsmust

referenceobjectsthatarepreviouslynamedinCREATE

statements(forexample,ALTERstatementsthatareused

tocreateaprimarykey).

choosing appropriate input SourcesThenextplanningstepistoconsiderwhichCompare

inputsourcesbestfityourenvironmentandneeds.

WhenyouexecuteCompare,theinputsourcesdescribed

previouslyarecalledCompare1andCompare2.Allpossible

combinationsarevalid,meaningthat16differentCompare

typesarevalid.Becauseeverycombinationworks,you

canchoosetheonesthatworkbestforagivensituation.

Eachofthe16Comparetypeshasadvantagesfordifferent

situations,soitisimportanttochoosetherightonesfor

yourstrategyorfortheparticularinstanceyouhaveinmind.

PAG E > 1

Page 4: Simplifying Database administration with BMc chanGe ManaGeR

TheCompareinputsourceshavethefollowingstrengths:

DB2catalog

Thecatalogcontains(unquestionably)thecurrent

definitionoftheobjectsinuse.Catalogobjectsindifferent

subsystemscanbecomparedusingDB2’sDistributedData

Facility(DDF),whichgreatlyexpandstherangeofusefor

comparisonsinvolvingcatalogobjects.

Acatalog-to-catalogcomparisonistheonlyComparetype

thatoffersautomaticchangerules.Automaticchange

rulesmatchthedatabasenames,creators,andschema

namesinCompare1tothoseinCompare2.Thismatching

savesonestepinthepreparationprocessforperforminga

comparison,thusreducingthepossibilityoferrorand

savingtime.

DDLfiles

SoftwarevendorsoftenprovideflatfilescontainingDDL

thatisexecutableinSPUFItocreatedatabaseobjectsfor

theirapplications.ComparecanreadDDLfilesastheyare,

withoutmodification.

YoucancreateabaselineofaDDLfile.Youcanalsodo

thereverse;inotherwords,youcanconvertabaselineto

aDDLfilebyusingBMCCHANGEMANAGERtocreatea

baselinereport.

Baselines

BaselinesaretheonlyCompareinputsourcethatenable

Comparetorecognizerenamedobjects.Everytimeyouuse

aBMCCHANGEMANAGERAlterWorkIDtorenamean

objectorcolumn,forinstance,thiseventisrecordedinthe

BMCCHANGEMANAGERtables.Whenabaselineisone

oftheinputstoCompare,Comparetracesthehistoryand

recognizesthedifferencebetweenarenamescenarioand

anadd/deletescenario.Therefore,Compareknowswhether

thedatainacolumnshouldbekept(arenamescenario)or

discarded(anadd/deletescenario).

Becauseabaselinecanbetakenofobjectsinthecatalog,

aDDLfile,oramigrateworklist,theBMCCHANGE

MANAGERbaselinetablescanbeacentralrepositoryfor

allversionsofyourDDL,nomatterhowtheDDLoriginated.

Baselinesindifferentsubsystemscanbecompared

usingDDF,whichgreatlyexpandstherangeofusefor

comparisonsinvolvingbaselines.

Migrateworklists

YoucancreateBMCCHANGEMANAGERmigrateworklists

anytime.It’sawayofobtainingacopyoftheDDLthat

wasusedtocreatedatabaseobjectsthatcurrentlyexist

intheDB2catalog.Youcancauseamigrateworklistto

begeneratedwithdifferentdatabasenames,creators,

andschemanamesbyusinganoutboundmigrateprofile

withchangerulesatthetimeyoucreatetheworklist,thus

avoidingtheneedtoedittheDDLmanually.

Youcancreateabaselineofamigrateworklist.

Developing a Baseline StrategyBMCCHANGEMANAGERbaselinescanactasacentral

repositoryforallversionsofyourdatabasesandDDL.

BecausetheDB2catalog,DDLfiles,andBMCCHANGE

MANAGERmigrateworklistsareallvalidinputstothe

baselineprocess,youhavealotofflexibilityincreating

abaseline.Abaselineisapointtowhichyourobject

definitionsmayberecovered.Generallyspeaking,you

shouldcreatebaselinesofyourdatabaseorDDLat

meaningfulsyncpoints—attimeswhenitisimportantfor

youtohaveasnapshotofwhatthedatabaselookedlike

atthatmoment.

Abaselinecanalsobeusedasoneoftheinputstoa

comparisonthatyoumayneedatsometimeinthefuture.

Whencreatingbaselines,considertheprojectlifecycle

characteristicsandthechangemanagementprocessinyour

environment.Howaredatabasechangesmigratedfromone

environmenttothenext?

>Ifthechangestoyourdatabaseenvironmentarebased

onareleasetheory,movinginorganizedgroupingsof

changesinafirst-in,first-outfashion,youmaywantto

createabaselineaftereachsetofdatabasechanges

isapplied

>Ifdatabasechangesmovefromoneenvironmenttothe

nextinnopredictableorderorgrouping,youmaynot

wanttocreateabaselineeverytimeachangeismade.

Inthiscase,youmaywanttolookatthebroader

pictureandcreateabaselineonlyaftermajorchange

implementations

Whenyoucreateabaseline,includeacommentthat

willhelpyourememberthecontentsandsignificanceof

thatparticularbaseline.Yourcomments,alongwiththe

baseline’snameandthedateandtimethatitwascreated,

willhelpyouinthefuturetoselecttheparticularbaseline

youneedtouseforacomparison.

PAG E > 2

Page 5: Simplifying Database administration with BMc chanGe ManaGeR

PAG E > 3

compare Output SourcesWhenyouexecuteCompare,BMCCHANGEMANAGER

producesthreeoutputs:

>AChangeDefinitionLanguage™(CDL®)file.CDLisa

patentedBMCproprietarylanguage.TheCDLfileisaflat

file,usuallyaPDSmemberthatcontainsarecordofthe

differencesbetweenthetwosetsofobjectsthatwere

compared.Inotherwords,itisarecordofthestructure

changesthatwouldhavetobemadetoonesetofobjects

tomakethemlookliketheotherset.CDLisreadableby

theImportcomponentofBMCCHANGEMANAGER.

Ifamigrateorbaselineprofileisusedtodefinethescope

forthecomparison,thescoperulesappearascomments

intheCDLfile,servingasareminderofthescopefor

thecomparison.MultipleCDLfilescanbegenerated

fromoneexecutionofCompare.Thissavesmuchmanual

effortwhenyouneedtosendCDLfilesthatareidentical

exceptfordatabasename,creator,andschemaname,

todifferentenvironments(knownaslocationsinBMC

CHANGEMANAGER).

>TheComparereportshowsyouthedifferencesbetween

theCompare1andCompare2objects.Theiroriginal

namesandattributevaluesareshownsidebyside,so

youcanseetheir“before”and“after”images.Onlyone

Comparereportisproduced,evenifmultipleCDLfiles

arecreated.

>Thediagnosticlogcontainsmessagesandreturncodes

indicatingthestatusofCompareprocessing.

CDLimplementation

OnceCDLhasbeencreatedastheresultofthe

Compareprocess,followthesestepstoimplement

yourdatabasechanges:

>UsetheImportcomponenttoreadtheCDLandstore

thechangesintheBMCCHANGEMANAGERtables

inanAlterWorkID.Thisachievesthesameendresult

asifyouhadmanuallyenteredthechangesusingthe

Specificationcomponent.ImportingCDLisanautomated

waytospecifychangesforDB2objects.TheSpecification

componentcanalsobeusedtoviewtheimported

changesandmakefurthermodifications.

>UsetheAnalysiscomponenttocreateaworklist

containingtheDDLthatisrequiredtoimplement

yourchanges.

>UsetheExecutioncomponenttoexecutetheworklist.

Overview of the compare Process

Figure1.TheflowoftheCompareprocessinBMCCHANGEMANAGERforDB2

Page 6: Simplifying Database administration with BMc chanGe ManaGeR

PAG E > 4

Database Management ScenariosThissectiondiscusseshowtheComparefeaturecansolve

thedatabasemanagementchallenges.Ineachscenario,

someComparetypesrequirethoughtandadvance

preparation.Forexample,youwillneedtocreatebaselines

orsavecopiesofDDLfilesorworklistsatgoodsyncpoints

aheadoftime,sothattheyareavailabletousethemto

performacomparison.

Scenario1—MigratenewsetofDB2structuredefinitionchanges

Identifythestructuredifferencesbetweentwodatabases,

andthenmakeoneofthemlookliketheother.Inother

words,migrateanewsetofDB2structuredefinition

changesfromonesubsystemtoanother.

BMCCHANGEMANAGERsolution

Inthiscase,youareupdatingthecurrentdatabaseto

versionthatexistsinthecatalog.Becausethedatabaseyou

wanttochangeisusuallydefinedinaDB2catalog,oneof

thefollowingComparetypeswouldbetheeasiestwayto

accomplishthetask.Considertheadvantagesofeachtype

describedearlierandwhatyouhaveavailableforthesecond

Compareinput(Compare2).

>Performacatalog-to-catalogcomparisonifbothdatabases

(the“before”and“after”images)arealreadydefinedin

theDB2catalog.BecauseCompareusesDDFtoretrieve

objectsfromremotelocations,acatalog-to-catalog

comparisoncanbeusedevenwhenthedatabasesare

definedindifferentsubsystems.

>Performacatalog-to-baselinecomparisonifyoucreate

abaselineofyourdatabasesatcrucialandmeaningful

timesduringaproject’slifecycle.Thecommentsyou

storedwiththebaselinewhenyoucreateditwillhelpyou

rememberthesignificanceeachbaseline.

>Performacatalog-to-DDLcomparisonwhenthe

Compare2databaseisnotdefinedintheDB2catalogand

youdon’thaveabaselinetouse.Youwouldneedtohave

savedacopyoftheDDLattherightpointintimeand

remembereditssignificancetocomparethecatalogto

therightversionoftheDDL.Thiscomparisontypeisalso

usefulifaccesstothecatalogforCompare2isrestricted

duetoshopstandards.

>Performacatalog-to-worklistcomparisonwhenthe

Compare2databaseisnotdefinedintheDB2catalog

andyoudon’thaveabaselinetouse.Youwouldneedto

havesavedacopyofamigrateworklistattherightpoint

intimeandremembereditssignificancetocomparethe

catalogtotherightworklist.Thiscomparisontypeisalso

usefulifaccesstothecatalogforCompare2isrestricted

duetoshopstandards.

Scenario2—Backoutdatabasedefinitionchanges

Backoutaseriesofdatabasedefinitionchangesmadeto

adatabaseoverthepastfewmonths,perhapsbydifferent

people,becausetheapplicationdevelopersneedtoback

outtheirprogramchanges.

BMCCHANGEMANAGERsolution

Inthiscase,youarechangingthedatabasetoaprevious

versionofwhatiscurrentlystoredinthecatalog.Because

thedatabaseyouwanttochangeisdefinedintheDB2

catalog,acatalog-to-baselinecomparisonwouldprobably

serveyoubestinthiscase,providedyouhaveabaseline

createdattherightpointintime.Here’swhy:

>Baselinesrecognizerenamedobjects.

>Ifyoucreatefullrecoverybaselines,youcanrestoreboth

thestructuresandthedatatoaparticularpointintime.

Youmaydecidethatoneofthefollowingtypesof

comparisonswouldserveyouequallyaswell:

>Catalog-to-catalog

>Catalog-to-DDLfile

>Catalog-to-worklist

Page 7: Simplifying Database administration with BMc chanGe ManaGeR

SummaryIntoday’scomplexDB2forz/OSenvironments,itis

imperativetohaveawell-thought-outchangemanagement

philosophyandrobusttoolset.BMCCHANGEMANAGER

forDB2meetsthechallengesinthefollowingways:

>Youcanmaintainyourchangephilosophybyallowingyou

toversionyourdatabaseenvironmentatyourchoiceof

intervals,facilitatingbothupgradetonewversionsand

fallbacktoearlierversions.

>Yousavesignificanttimeandeffortbyautomating

theprocessofmigratingdatabasechangestoother

environmentswhileprovidingfallbackcapability.Besides

savingtime,automationhelpstoguaranteetheaccuracy

ofanotherwisemanual,error-proneprocess.

Withtherighttoolstoimplementchangemanagement

procedures,youcanefficientlymanagethecomplexities

ofanyDB2forz/OSenvironment.Thisallowspersonnel

toworktogetherseamlessly,sharingadministrativeduties

ofmanagingcomplexenvironmentsandrespondinginthe

quickestwaypossibletoimplementchangeandmaintain

businessperformanceobjectives.

PAG E > 5

Page 8: Simplifying Database administration with BMc chanGe ManaGeR

AboutBMCSoftwareBMCSoftwaredeliversthesolutionsITneedstoincreasebusinessvaluethroughbettermanagementoftechnologyandITprocesses.Ourindustry-leadingBusiness

ServiceManagementsolutionshelpyoureducecost,lowerriskofbusinessdisruption,andbenefitfromanITinfrastructurebuilttosupportbusinessgrowthandflexibility.

OnlyBMCprovidesbestpracticeITprocesses,automatedtechnologymanagement,andaward-winningBMC®Atrium™technologiesthatofferasharedviewintohow

ITservicessupportbusinesspriorities.Knownforenterprisesolutionsthatspanmainframe,distributedsystems,andend-userdevices,BMCalsodeliverssolutions

thataddresstheuniquechallengesofthemidsizedbusiness.Foundedin1980,BMChasofficesworldwideandfiscal2006revenuesofmorethan$1.49billion.

ActivateyourbusinesswiththepowerofIT.www.bmc.com.

1-D87TBLBMCSoftware,theBMCSoftwarelogosandallotherBMCSoftwareproductorservicenamesareregisteredtrademarksortrademarksofBMCSoftware,Inc.Allotherregisteredtrademarksortrademarksbelongtotheirrespectivecompanies.©2007BMCSoftware,Inc.Allrightsreserved.

*68713*