• No results found

Queries

In document Database Schema Reference (Page 9-186)

Thischapterliststhepre-definedqueries providedwithIBM Tivoli ConfigurationManager andthecolumnsincludedineachquery.

v Chapter5,“Configurationrepositorytables,”onpage111

ThischapterdescribestheoperationaldatatablespopulatedbyInventoryand SoftwareDistributionintheconfigurationrepositoryandliststhecolumns includedineachtable.

Publications

Thissectionlists publicationsintheIBMTivoliConfigurationManagerlibraryand anyotherrelateddocuments.Italsodescribeshow toaccessTivolipublications online andhow toorderTivolipublications.

IBM Tivoli Configuration Manager library

The followingdocuments areavailableintheIBMTivoliConfigurationManager library:

v ReleaseNotes,GI11-0926

ContainsthelatestinformationaboutthisreleaseofIBM TivoliConfiguration Manager,includinginstallationand upgradenotes;softwarelimitations, problems,andworkarounds;documentationnotes;andinternationalization notes.

v Planningand Installation,GC23-4702

ExplainshowtoplanorupgradeyourdeploymentofIBM TivoliConfiguration ManagerinaTivolienvironment aswell ashowtoinstall,upgrade,and uninstallthecomponentsofIBMTivoliConfigurationManagerusingthe availableinstallationmechanisms.

v IntroducingIBMTivoliConfigurationManager,GC23-4703

ExplainstheconceptsofIBM TivoliConfigurationManagerand itscomponents andprovidesa roadmaptotheIBMTivoliConfigurationManager

documentation.

v User’sGuideforSoftwareDistribution,SC23-4711

Explainstheconceptsandproceduresnecessarytoeffectively distributesoftware overnetworksusingtheSoftwareDistributioncomponentofIBMTivoli

ConfigurationManager.

v ReferenceManualforSoftwareDistribution,SC23-4712

Providesin-depthinformationabouttheIBM TivoliConfigurationManager commandsusedbytheSoftwareDistributioncomponentandexplainsadvanced features,concepts,and proceduresnecessarytoeffectivelyusetheSoftware Distributioncomponent.

v User’sGuideforInventory,SC23-4713

Explainstheconceptsandproceduresnecessarytoeffectively usetheInventory componentofIBM TivoliConfigurationManager andprovidesin-depth

informationaboutthecommandsusedbytheInventorycomponent.

v MessagesandCodes, SC23-4706

ProvidesdetailsofthemessagesgeneratedbytheIBM TivoliConfiguration Managercomponents.

v InventoryOnlineHelp

ProvidesrelatedinformationaboutusingtheInventorygraphical userinterface (GUI).

Prerequisite publications

The followingdocuments provideinformationthatyouneedtoset upyourTivoli environment andinstallIBM TivoliConfigurationManager:

v TivoliManagementFramework:PlanningforDeploymentGuide, GC32-0803 Explainshowtoplanfordeployingyour Tivolienvironment.Italsodescribes TivoliManagementFrameworkanditsservices.

v TivoliManagementFramework:TivoliEnterpriseInstallationGuide, GC32-0804 Explainshowtoinstall andupgradeTivoliEnterprisesoftwarewithinyour TivoliregionusingtheavailableinstallationmechanismsprovidebyTivoli SoftwareInstallationServiceandTivoliManagementFramework.Tivoli

EnterprisesoftwareincludestheTivolimanagementregion server(Tivoliserver),

managednodes,gateways, endpoints,andRDBMSinterfacemodule(RIM) objects.Thisguidealsoprovides informationabouttroubleshootinginstallation problems.

v TivoliManagementFramework:ReleaseNotes,GI11-0890

Describesthelatestinstallationinformation,includingsupportedplatforms, defects,andlimitationsforTivoliManagementFramework.

Related publications

TheTivoliManagementFramework:ReferenceManual,SC32-0806, providesin-depth informationaboutTivoliManagement Frameworkcommands.Thismanualis helpfulwhenwritingscripts thatare laterrunasTivolitasks.Thismanualalso documents defaultandvalidationpolicyscripts usedbyTivoliManagement Framework.

TheTivoliSoftwareGlossary includesdefinitionsformanyofthetechnicalterms relatedtoTivolisoftware.TheTivoliSoftwareGlossaryisavailable,inEnglishonly,at thefollowingWebsite:

http://www.ibm.com/software/tivoli/library/

AccesstheglossarybyclickingtheGlossarylinkontheleft paneoftheTivoli software librarywindow.

Accessing publications online

ThedocumentationCDcontainsthepublicationsthatareintheproductlibrary.

TheformatofthepublicationsisPDF, HTML,orboth.Refertothereadmefileon theCDforinstructions onhow toaccessthedocumentation.

TheproductCDcontainsthepublicationsthatareintheproductlibrary.The formatofthepublicationsisPDF, HTML,orboth.Toaccessthepublicationsusing a Webbrowser,opentheinfocenter.htmlfile.Thefileisintheappropriate

publicationsdirectoryontheproductCD.

IBM postspublicationsforthisand allotherTivoliproducts,astheybecome available andwhenevertheyareupdated,totheTivolisoftwareinformationcenter Website.AccesstheTivolisoftwareinformationcenterbyfirst goingtotheTivoli software libraryat thefollowingWebaddress:

http://www.ibm.com/software/tivoli/library/

Scrolldownandclick theProduct manualslink.IntheTivoliTechnicalProduct DocumentsAlphabeticalListingwindow,clicktheIBMTivoliConfiguration Manager linktoaccesstheproductlibraryattheTivolisoftwareinformation center.

Note: IfyouprintPDFdocumentsonotherthanletter-sizedpaper,settheoption intheFile” PrintwindowthatallowsAdobeReadertoprintletter-sized pagesonyourlocalpaper.

Ordering publications

YoucanordermanyTivolipublicationsonline atthefollowingWebsite:

http://www.elink.ibmlink.ibm.com/public/

applications/publications/cgibin/pbi.cgi

Youcanalsoorderbytelephonebycallingoneofthese numbers:

v IntheUnitedStates:800-879-2755 v InCanada:800-426-4968

Inothercountries,seethefollowingWebsitefora listof telephonenumbers:

http://www.ibm.com/software/tivoli/order-lit/

Contacting software support

IfyouhaveaproblemwithanyTivoliproduct,refertothefollowingIBMSoftware SupportWebsite:

http://www.ibm.com/software/sysmgmt/products/support/

Ifyouwanttocontactsoftwaresupport,seetheIBMSoftwareSupportGuideat the followingWebsite:

http://techsupport.services.ibm.com/guides/handbook.html

The guideprovidesinformationabouthowtocontactIBM SoftwareSupport, dependingontheseverityof yourproblem,and thefollowinginformation:

v Registrationand eligibility

v Telephonenumbers,dependingonthecountryinwhichyouarelocated v InformationyoumusthavebeforecontactingIBM SoftwareSupport

Conventions used in this guide

Thisguideusesseveralconventionsforspecialtermsandactionsandoperating system-dependent commandsandpaths.

Typeface conventions

Thisguideusesthefollowingtypefaceconventions:

Bold

v Lowercasecommandsandmixedcasecommandsthatareotherwise difficulttodistinguishfromsurroundingtext

v Interfacecontrols(check boxes,pushbuttons,radiobuttons,spin buttons,fields,folders,icons,listboxes, itemsinsidelistboxes,

multicolumnlists,containers, menuchoices,menu names,tabs,property sheets),labels(suchasTip:,andOperatingsystem considerations:) v Keywordsandparametersintext

Italic

v Wordsdefinedintext

v Emphasisofwords(wordsaswords)

v Newtermsintext(exceptina definitionlist) v Variablesand valuesyoumustprovide Monospace

v Examplesandcodeexamples

v Filenames,programming keywords,andotherelementsthataredifficult todistinguishfromsurroundingtext

v Messagetextandprompts addressedtotheuser v Textthattheusermust type

v Valuesforargumentsorcommandoptions

Operating system-dependent variables and paths

ThisguideusestheUNIXconventionforspecifyingenvironmentvariablesandfor directory notation.

WhenusingtheWindows®commandline,replace $variablewith%variable%for environment variablesand replaceeachforwardslash(/) withabackslash(\)in directory paths.Thenamesofenvironmentvariablesarenotalwaysthesamein Windows andUNIX.Forexample,%TEMP%inWindowsisequivalentto$tmpin UNIX.

Note: Ifyouare usingthebashshellonaWindows system,youcanusetheUNIX conventions.

Chapter 1. Introduction

IBM TivoliConfigurationManager,Version4.2.1,usesarelationaldatabase

management system(RDBMS)serverwiththeInventoryand SoftwareDistribution componentstostore data.Theconfigurationrepositoryisadatabasein theRDBMS thatcontains theschema(tablesand columns)inwhichinformationisstoredina consistent structure.

Youcanviewor runqueriesonthedataintheconfigurationrepository.For example,youcanquerytheconfigurationrepositoryforallsystemsthathavean outdatedversionof asoftwareproductthatwillneedupgrading inthenext year.

Thisbooklistsand describeseachviewand tableincludedintheconfiguration repositoryschema. Thisbookalso listsanddescribesthequeries thatyoucan install whenyouinstall IBMTivoliConfigurationManager,Version4.2.1.

Inaddition,thisbookdescribes historytrackingandlists thehistorical views, queries, andtables.

Note: Informationprovidedinthisbookregardingthetable andviewdefinitions oftheconfigurationrepositorycanalso beextractedfromthesystem catalogsofyourRDBMS. Formoreinformation,consultyourRDBMS manualsoryourdatabaseadministrator.

For agraphical representationofthetablesintheconfigurationrepository,seethe Database Schemaposterenclosedwiththisdocumentation, orcontactyour Tivoli customer supportrepresentativefora copy.Youcanalso createyourowntables and views.

For moreinformationonusingtheconfigurationrepository,seethefollowing sectionsintheUser’sGuideforInventory:

v Toaddtablestotheconfigurationrepository,seethechapteroncollecting custominformation.

v Tocreatequeries,seethechapteronqueryinginventoryinformation.

v Todeleteinformationfromtheconfigurationrepository,seethecommands appendix.

Chapter 2. History tracking

IBM TivoliConfigurationManager providesanoptionalhistorytrackingfeatureto store inventorydataand changeinformationfromallpreviousinventoryand pervasive devicescans.Datafromthecurrentscanisstoredinoperationaldata tables. Operationaldatatablesare overwrittenorupdatedduringeachscan, dependingonwhethertheUpdatewithDifferences orReplacewithCurrent Results optionisselectedfortheinventoryprofile.Operationaldatatablesreflect onlythemostcurrentscan.However, ifyouenable historytracking, new,

modified, anddeleteddatafromtheoperationaldatatablesarestored inhistory tablesastheoperationaldatatablesisoverwritten.

Youcanaccesshistoricaldatabyusinghistoryviews,queries,and tables.History views,queries,andtablesaredesignatedwithanuppercase Hand anunderscore character(H_)atthebeginningoftheirnames.FollowingtheH_,thenameofa historyview,query,ortablegenerallyhasthesamenameastheoperationalview, query,ortable withwhichitisassociated.

EachoperationaldatatablethatcontainsthecolumnCOMPUTER_SYS_IDhasa corresponding historytable.Ahistorytablehasallofthecolumnnamesfromthe corresponding operationaldatatable plusthefollowingadditionalcolumns:

RECORD_ACTION

TheRECORD_ACTION columntellswhethertherecordisanINSERT (new informationisbeingaddedtotheoperationaldatatable),an

UPDATE(part ofarecord intheoperationaldatatableisbeingmodified), ora DELETE(therecordnolongerexistsintheoperationaldatatable).

PRFL_ACTION

PRFL_ACTIONstateswhethertheprofileconfigurationoptionisReplace with CurrentResults(REPLACE)or UpdateWithDifferences

(REPLACE_WITH_DIFF).Also,whilethecolumnRECORD_TIMEin operationaldatatablescontains thetimethattherecordwasinsertedinto thedatabase,RECORD_TIMEinhistorytablescontains thetimethatthe endpointwas scanned(theCOMPUTER_SCANTIMEcolumnfromthe COMPUTERtable).

Toenable historytracking, youmust createhistorytablesintheconfiguration repository.See thePlanningandInstallationformoreinformationaboutcreating these tables.

Note: Dataisneverdeletedfromthehistorytables.Even ifyouremovea system fromtheTivolimanagementregion(Tivoliregion) usingthewinvrmnode command,therecordof thesystem’sexistenceremainsinthehistorytables unlessyoueither manuallydeletethehistorytablesoraddthetablesnames totheINVENTORY_TABLEStableand usethewinvrmnodecommand.See

“Deletinghistorytables”onpage6 andthecommandsappendixinthe User’sGuideforInventoryformoreinformation.

Using history tables for the first time

Whenyouenable historytrackingforthefirsttime, aseriesofhistorytablesis installedintheconfigurationrepository.Afterthehistorytablesareinstalled,you

Ifyouinstallthehistoricalschemaatthesametimeastheoperationaldata schema, usetheUpdatewith Differencesprofileoptionforallscans. Ifyouinstall thehistoricalschemaaftertheoperationaldataschema,usetheReplacewith CurrentResults profileoptionforthefirst scan,thenuseUpdatewithDifferences for allsuccessivescans.Thisensuresthatonlythechangedataissenttothe historytables.IfyouuseReplacewith CurrentResultsforeachscan,thesize of thehistorytableswillgrowbythesizeofthefullscanforeachscan,anditwillbe more difficulttoquerytheactualchangestotheTivoliregion.

The followingscenarioillustratesthedifferencebetweenthetwooptions.Inthis scenario,theoperationaldatatable MATCHED_SWAREisusedtostoredataabout 100 installedsoftwareapplicationsthatarefoundusingsignaturematching atan endpoint.On theinitialscan,theMATCHED_SWAREtablereturns100entriesfor thescannedsystem,sotheH_MATCHED_SWAREtablealsohas100entries.

Before thenext scan,fivesoftwareapplicationsareaddedtoandfiveare deleted fromthesystem.IfyouusetheUpdatewith Differencesoptiononthenext scan, H_MATCHED_SWARE onlyadds10entries, fiveasINSERTentriesforthefive new softwareapplicationsandfiveasDELETEentriesforthefiveapplicationsthat were removed.TheH_MATCH_SWAREtablenow has110totalentries,andthe additional entriesshowwhichsoftwareapplicationswereaddedandwhichwere deleted.

However, ifyouusetheReplacewithCurrentResultsoption,the

H_MATCHED_SWARE tableadds100entries. Combinedwith theoriginal100 entries, theReplacewith CurrentResultsoptionleavesyouwith 200totalentries after thesecondscan,allofwhicharestored asINSERTentries. Thisoption adds 90more entriesthantheUpdatewithDifferences optiondoes,andnoneofthe new entriesexplicitlyshowthatsomesoftwareapplicationsweredeleted.

Modifying history tracking for efficiency

Without customization,historytrackingcanconsumean enormousamount of database spaceand resources.Thefollowingrecommendations describeswaysto customize historytrackingtousehistorytrackingwhileminimizingthedatabase spaceandresources used:

v Deleteanyhistorytablesforwhichyoudonotwanttogatherdata.

Bydefault,theh_<database>_schema.sqlscripts createatabletocorrespondto everyinventorytablein theinv_<database>_schema.sql scriptthatcontainsthe attributeCOMPUTER_SYS_ID.Iftherearetablesforwhichyouwillnever want tokeephistorytables,youcanremovethecorrespondingCREATETABLEfrom theh_<db>_schema.sqlscript.Iftheh_<db>_schema.sqlscripthasalreadybeen run,dropthetablesatthedatabaseusingtheDROPTABLE<tablename>

statement.

Forexample,youmaynotwanttocollecthistoricalinformationfromthe

H_UNMATCHED_FILEStable.Informationfromabasicfilescanisstoredinthe UNMATCHED_FILEStable,and whenhistorytrackingison,thedataisthen storedintheH_UNMATCHED_FILEStable.Basicfileinformationisthelargest setofdatathatinventorycollects.Dependingonwhichincludedirectoriesand filetypesareselectedintheprofile, basicfileinformationcanbe 95percentor moreofthetotalscan dataforanendpoint.

Inaddition,theACCESSED_TIMEandMODIFIED_TIMEattributescanchange frequently,whichwillcausean updaterecord tobesenttothe

H_UNMATCHED_FILEStableeverytimea fileisaccessedormodified.Deleting theH_UNMATCHED_FILEStablecansignificantlyreducetheamount ofdata storedinhistorytables.

Pervasivedevicetablesare alsolikelytochangeveryfrequently.Depending upontherequirementsofyourenvironment,youshouldconsiderwhetherto collecthistoricalinformationforpervasivedevices.

v Usethesamesoftwareprofileconfigurationforeachscanof anendpoint.

Itisrecommended thatyouusetheupdatewithdifferencesoption forprofiles whenhistorytrackingisenabledbecausesoftwareand hardwarescanswork differently.Withhardwarescans,theupdatewithdifferencesoptionrecognizes whenhardwarehasbeendeselectedfromtheprofileconfiguration.For example, ifahardwarecomponentisfound inonescanandthenextscanrunswith that componentdeselectedfromtheprofile, Inventoryrecognizesthatthecomponent hasnotbeendeleted.

Withsoftwarescanning,however,ifadirectory isscannedduring onescanand thendeselectedduring thenext scan,allsoftwareinformationreturnedinthe firstscanshowsupasdeletedinthesecondscan.Topreventtheseerroneous deletesfrombeingsenttothehistorytables,youshouldscanendpointswith profileshavingincludeandexclude directoriesand thesame filetypesselected.

Ifyouneedtoscan thesameendpoints fordifferentsoftwareconfigurations overmultiple scans,youcanremovethecorrespondinghistorytablesas describedearlierinthissection.

v Adduniqueconstraints tohistorytablestolimitwhichchangedataissaved.

Historytablesarecreatedwithoutprimary keysorconstraints.Beforedatais senttothehistorytables,theconstraints alreadyhavebeenmet inthe

operationaldatatables. Inventoryonlysendsinserts, neverupdatesordeletes,to thehistorytables.Thelackofconstraints providesquickerdatainsertion.Any changeforanycolumnina historytablecausesarecord tobewritten.Ifyou wanta historyrecord tobewritten onlyifcertain columnschange,youcanadd auniqueconstraint.

Forexample,theH_COMPUTER_SYS_MEMtablehastheCOMPUTER_SYS_ID, PHYSICAL_TOTAL_KB,PHYSICAL_FREE_KB,TOTAL_PAGES,FREE_PAGES, PAGE_SIZE,VIRT_FREE_KB,RECORD_ACTION,PRFL_ACTION,

RECORD_TIMEcolumns.PHYSICAL_FREE_KB,FREE_PAGES,

VIRT_TOTAL_KB,VIRT_FREE_KB,andRECORD_TIME willprobablychange everyscan.Toinsert changedataforallthecolumnsexceptthesefive,youcan adda constrainttotheH_COMPUTER_SYS_MEMtable.Allattributesina uniqueconstraintmust benon-null,whichmeansthetableneedstobe

recreated.Ifthetablealreadyhasdatainit thatshouldbe preserved,youneed tocopythedatato atemporarytablefirst,and thenbacktotherecreated H_COMPUTER_SYS_MEMtable.Thefollowingexampleshowhowtodo thisin DB2®:

-- This view selects only the oldest records with the unique attributes we want to save.

create view H_TMP_MEM_VIEW as

select * from

H_COMPUTER_SYS_MEM H where

H.RECORD_TIME = (select MIN(RECORD_TIME) from H_COMPUTER_SYS_MEM

where COMPUTER_SYS_ID = H.COMPUTER_SYS_ID and PHYSICAL_TOTAL_KB = H.PHYSICAL_TOTAL_KB and TOTAL_PAGES = H.TOTAL_PAGES

and PAGE_SIZE = H.PAGE_SIZE

and PRFL_ACTION = H.PRFL_ACTION);

-- This temporary table is to store the rows we want to save from the H_COMPUTER_SYS_MEM table.

CREATE TABLE H_TMP_SYS_MEM (

COMPUTER_SYS_ID VARCHAR(64), PHYSICAL_TOTAL_KB INTEGER, PHYSICAL_FREE_KB INTEGER, TOTAL_PAGES INTEGER, FREE_PAGES INTEGER, PAGE_SIZE INTEGER, VIRT_TOTAL_KB INTEGER, VIRT_FREE_KB INTEGER, RECORD_ACTION CHAR(6), PRFL_ACTION VARCHAR(20), RECORD_TIME TIMESTAMP);

-- Copy the rows from H_TMP_MEM_VIEW (the desired subset of H_COMPUTER_SYS_MEM).

INSERT INTO H_TMP_SYS_MEM

select * from H_TMP_MEM_VIEW;

select * from H_TMP_MEM_VIEW;

In document Database Schema Reference (Page 9-186)

Related documents