Monitoring and Administration with SAP on DB2 · PDF fileMonitoring and Administration with...
Transcript of Monitoring and Administration with SAP on DB2 · PDF fileMonitoring and Administration with...
Monitoring and Administration with SAP on DB2Introduction to the DBA Cockpit
Ralf StaufferDevelopment Architect, SAP AGSAP on DB2 for Linux, UNIX, and Windows
© SAP 2009 / Page 2
1. Managing System Landscapes2. Initial Setup3. Monitoring4. Administration5. Documentation
Agenda
© SAP 2009 / Page 3
Managing System Landscapes – Using the System Landscape Directory
Data providers send database and connectiondataAutomatically update of SLD at start of the applicationinstanceConfiguration of DBA Cockpit systems from SLD
DB
DBA CockpitConfiguration
Sys1Sys2...
SLD I/F
SLD
DBDB
Configuration I/F
© SAP 2009 / Page 4
Managing System Landscapes- Integration withSolutionManager
One central system formonitoringCommon view of systemlandscapeIntegrated setupEvaluation of databasealertsNavigation fromSolutionManager Diagnosticsinto DBA CockpitUsing central monitoring isthe recommended way forold SAP releases
DB
DBA CockpitConfiguration
Sys1Sys2...
SLD I/F
SolutionManager
SLD
DBDB
Configuration I/F
© SAP 2009 / Page 5
Managing System Landscapes - Details
FunctionalityRZ20 MonitoringHistorized performance and spacedataIntegration with central planningcalendarUsable for any DB2 databaseAlmost no difference betweenABAP/local System, JavaNo RFC necessary
Restrictions byKind of ApplicationDatabase Release...
For more information see SAP Note 1124987
© SAP 2009 / Page 6
Initial Setup – SAP Prerequisites (I)
Standard Jobs of common basisSAP_COLLECTOR_FOR_PERFMONITOR
Scheduled via SM36 - Button Standard Jobs on main screenDispatching control via table TCOLLMaintenance of TCOLL via report RSCOLL40TCOLL contents described in note 12103Performs history collection, cleanup actions etc.
SAP_CCMS_MONI_BATCH_DPScheduled via RZ21 ( Menu Technical Infrastructure -> Local Method Execution ->Activate Background Dispatching )Schedules Alert Data Collectors of RZ20 for all observed Databases
© SAP 2009 / Page 7
Initial Setup – SAP Prerequisites (II)
DBA Planning CalendarMinimum is REORGCK for all Tables Job which provides
REORG RecommendationsCurrent Table SizesExceptional Table ConditionsOptional: Compression Check Results (not a regular task)
Monitoring InfrastructureSAP Table FunctionsRetention periods of history dataAUTOMAINTENANCE settings
© SAP 2009 / Page 8
Monitoring - Sources
All data is retrieved by SQL means usingDB2 Snapshot table functions SNAP_GET_...DB2 Administrative table functionsSpecial SAP table functions installed by SAPINST or manually
© SAP 2009 / Page 9
Monitoring – Performance – Ad Hoc Data
Snapshot data are available on different levelsglobally by database (partition)by bufferpoolsby application/statementby tablespaceby table (only subset)SQL Cache Monitor to identify expensive SQL statements
© SAP 2009 / Page 10
Monitoring – Workload Management Data
Data provided by Workload Management (WLM)Standard setup provided by SAPSetup can be changed via the DBA CockpitUses DB2 event monitors to collect statistical data and threshold violations
© SAP 2009 / Page 11
Monitoring - Space
TablesSystem catalog informationREORG recommendationsSpace calculations (now provided by DB2 and exact!)RUNSTATS settingsInformation from ADMIN_GET_TAB_INFO
Tablespaces and ContainersCheckpoint Mechanism similar to Reset Logics of Snapshots (may be usede.g for client copy)
© SAP 2009 / Page 12
Monitoring – Backup and Recovery
Based on evaluation of backup historyCustomer should not prune history by himselfAutomatic Prune is done by background job
Analyzing log file status is closely related to db2 logfile management, SAP Admin Tools are no longer supported Useful when analyzing alert Missing Log Files
© SAP 2009 / Page 13
Monitoring – Configuration
Controlling DB/DBM ParametersDPF: Delta display for different settings across partitionsRegistry settings with deviations from SAP standard
System Catalog Information forDB Partitions Buffer Pools
© SAP 2009 / Page 14
Monitoring – Historization
Local HistorizationPerformed via SAP Jobs in the SolutionManager systemHistory data is stored in the managing systemHard-coded evaluation screens
Performance WarehousePerformed as part of the extractor framework provided by SolManData is stored in the SolutionManager BWFlexible evaluation based on BW reporting tools
© SAP 2009 / Page 15
Monitoring – RZ20
Common available monitoring infrastructureScheduling via background dispatcher of alert monitorConfiguration via transaction RZ21No CEN for Remote Database necessary, only local contexts!
Database ContentSetup of standardized monitoring tree (Automatically, at change of system cfg)Data providers for monitoring attributesAdditional, database specific configuration via DBA Cockpit
This configuration should normally not be changed Simplified UI within DBA Cockpit
Access to monitoring tree via transaction RZ20 for testingSelect SAP CCMS Monitor Templates – DatabaseMenu Extras –> Activate Maintenance FunctionMenu Edit –> Nodes(MTE) –> Start method –> Start data-collection method
© SAP 2009 / Page 16
Adminstration - General
AuthorizationsCentral enabling/disabling via profile parameter dbs/db6/ccms_maintenanceUser related via authorization objects / profiles / roles
S_ADMI_FCD for protection of transaction codesS_DATASET for access to files on application serversS_LOG_COM for execution of logical commandsS_RZL_ADM for CCMS administration
Uses special connection for local systems with different user, typically db2<sid>
Database Administration Functions forTablespacesDB PartitionsBuffer PoolsDB/DBM Parameters
Advisory Information with generated SQL statement
AuditingALL changes of database objects via DBA Cockpit are logged in the DBA Audit LogNO logging of manual changes via CLP or other DB2 means!
© SAP 2009 / Page 17
Administration – Using the Planning Calendar
Simply spoken an additional layer on top of SM36/SM37 for maintaining DB related tasksUses a set of configuration and runtime information tablesAll job output directed to SM37 job logEach job writes status record to special protocol tableInitial setup with job wizardBe aware of other DB related background jobs when planningCleanup/Reset according to note 592974
© SAP 2009 / Page 18
Administration – Jobs in the Planning Calendar
RUNSTATSDepending on DB CFG AUTORUNSTATS switchNormally only Single Table RUNSTATS should be used
Be careful if profiles are existingSpecial Settings might be overwritten by DB2 Autorunstats and vice versa
Is automatically run after REORG jobs of DB13Problem if DB2 profiles are used (needs synchronized with DBSTATC)
REORGDepending on DB CFG AUTOREORG switchREORG of tablespaces to reduce High-Water Mark (better use DB6CONV)Single Table Reorg
BackupAll current backup are supportedBackup to different media (Tape, TSM, VendorLib, Snapshot Backup)
© SAP 2009 / Page 19
Administration – Jobs in the Planning Calendar
REORGCHKMust always run!Must be scheduled once per weekCalculates data for SYSCAT and one schema (see ConnectionConfiguration)Resulting Data is stored to special tables DB6TREORG and DB6IREORG
Index sizes are not per index, only globally availableCompression check only from time to time, too expensive
Special BW Jobs, partly not schedulable by DB13Jobs of MDC Advisor
© SAP 2009 / Page 20
Administration – Using the Planning Calendar
Viewing of JobsQuick monitoring via Jobs -> DBA LogAll jobs executed by SAP standard jobs (History, parameter changes…)All jobs scheduled via DB13All tools started manually from outside All DPW data collectorsState <undefined> indicates severe error (program aborted)
Job SchedulingInitial setup via wizardUse of Recurrence PatternsAvailability of Jobs depends on SAP and DB2 Release and on DB CFG
© SAP 2009 / Page 21
Administration – SAP RUNSTATSvs. DB2 Autorunstats
SAP DB2When
Which
How
Why
Result
Scheduling via DB13
Runstats_All and Runstats_DBSTATC
Scheduling by DB2, Controlled by Online Maintenance Window
Exceptions defined by DBSTATC Exceptions defined by Autorunstats Policies
Default is basic table with detailedindex, special handling byDBSTATC
Default is distributed table with detailed index, special handling by defining profiles
Thresholds for UDI counters definedin DB13
Thresholds for UDI counter fix, special treatmentof large tables
Each table has statistics age <= 1 week, heavily changed <= 1 day
Only for tables with changes, no guaranteed time, but normally faster
© SAP 2009 / Page 22
Administration – SAP REORG vs. DB2 Autoreorg
SAP DB2When
Which
How
Why
Scheduling via DB13
Autoreorg
Scheduling by DB2, Controlled by Online and Offline Maintenance Window
Exceptions defined by DB13 SizeThreshold
Exemptions defined by Autoreorg Policies
Depending on REORGCHK recommendations
Depending on REORGCHK recommendations, more precise for index reorgs (better evaluationof F7, F8)
Flagged by Reorgchk_All job Flagged by REORGCHK
© SAP 2009 / Page 23
Documentation
SDNunder http://www.sdn.sap.com/irj/sdn/db6Important SAP notes
1027146 Database administration and monitoring in the DBA Cockpit1027336 DB6: New functions in the DBA Cockpit (incl. PDF Version of Online Dokumentation)1124987 DB6: Availability of administration functions1268290 DB6: Scheduling the job "REORGCHK for all tables“1314750 DB6: DBA Cockpit Correction Collection SAP Basis 7.00 / 7.101309424 DB6: DBA Cockpit Correction Collection SAP Basis 7.01 / 7.11