Monitoring and Administration with SAP on DB2 Introduction to the DBA Cockpit Ralf Stauffer Development Architect, SAP AG SAP on DB2 for Linux, UNIX, and Windows
Agenda 1. Managing System Landscapes 2. Initial Setup 3. Monitoring 4. Administration 5. Documentation SAP 2009 / Page 2
Managing System Landscapes Using the System Landscape Directory Data providers send database and connection data Automatically update of SLD at start of the application instance Configuration of DBA Cockpit systems from SLD Configuration Sys1 Sys2... DBA Cockpit Configuration I/F SLD I/F SLD DB DB DB SAP 2009 / Page 3
Managing System Landscapes- Integration with SolutionManager One central system for monitoring Common view of system landscape Integrated setup Evaluation of database alerts Navigation from SolutionManager Diagnostics into DBA Cockpit Using central monitoring is the recommended way for old SAP releases Configuration Sys1 Sys2... DBA Cockpit Configuration I/F SLD I/F SLD SolutionManager DB DB DB SAP 2009 / Page 4
Managing System Landscapes - Details Functionality RZ20 Monitoring Historized performance and space data Integration with central planning calendar Usable for any DB2 database Almost no difference between ABAP/local System, Java No RFC necessary Restrictions by Kind of Application Database Release... For more information see SAP Note 1124987 SAP 2009 / Page 5
Initial Setup SAP Prerequisites (I) Standard Jobs of common basis SAP_COLLECTOR_FOR_PERFMONITOR Scheduled via SM36 - Button Standard Jobs on main screen Dispatching control via table TCOLL Maintenance of TCOLL via report RSCOLL40 TCOLL contents described in note 12103 Performs history collection, cleanup actions etc. SAP_CCMS_MONI_BATCH_DP Scheduled via RZ21 ( Menu Technical Infrastructure -> Local Method Execution - >Activate Background Dispatching ) Schedules Alert Data Collectors of RZ20 for all observed Databases SAP 2009 / Page 6
Initial Setup SAP Prerequisites (II) DBA Planning Calendar Minimum is REORGCK for all Tables Job which provides REORG Recommendations Current Table Sizes Exceptional Table Conditions Optional: Compression Check Results (not a regular task) Monitoring Infrastructure SAP Table Functions Retention periods of history data AUTOMAINTENANCE settings SAP 2009 / Page 7
Monitoring - Sources All data is retrieved by SQL means using DB2 Snapshot table functions SNAP_GET_... DB2 Administrative table functions Special SAP table functions installed by SAPINST or manually SAP 2009 / Page 8
Monitoring Performance Ad Hoc Data Snapshot data are available on different levels globally by database (partition) by bufferpools by application/statement by tablespace by table (only subset) SQL Cache Monitor to identify expensive SQL statements SAP 2009 / Page 9
Monitoring Workload Management Data Data provided by Workload Management (WLM) Standard setup provided by SAP Setup can be changed via the DBA Cockpit Uses DB2 event monitors to collect statistical data and threshold violations SAP 2009 / Page 10
Monitoring - Space Tables System catalog information REORG recommendations Space calculations (now provided by DB2 and exact!) RUNSTATS settings Information from ADMIN_GET_TAB_INFO Tablespaces and Containers Checkpoint Mechanism similar to Reset Logics of Snapshots (may be used e.g for client copy) SAP 2009 / Page 11
Monitoring Backup and Recovery Based on evaluation of backup history Customer should not prune history by himself Automatic 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 12
Monitoring Configuration Controlling DB/DBM Parameters DPF: Delta display for different settings across partitions Registry settings with deviations from SAP standard System Catalog Information for DB Partitions Buffer Pools SAP 2009 / Page 13
Monitoring Historization Local Historization Performed via SAP Jobs in the SolutionManager system History data is stored in the managing system Hard-coded evaluation screens Performance Warehouse Performed as part of the extractor framework provided by SolMan Data is stored in the SolutionManager BW Flexible evaluation based on BW reporting tools SAP 2009 / Page 14
Monitoring RZ20 Common available monitoring infrastructure Scheduling via background dispatcher of alert monitor Configuration via transaction RZ21 No CEN for Remote Database necessary, only local contexts! Database Content Setup of standardized monitoring tree (Automatically, at change of system cfg) Data providers for monitoring attributes Additional, 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 testing Select SAP CCMS Monitor Templates Database Menu Extras > Activate Maintenance Function Menu Edit > Nodes(MTE) > Start method > Start data-collection method SAP 2009 / Page 15
Adminstration - General Authorizations Central enabling/disabling via profile parameter dbs/db6/ccms_maintenance User related via authorization objects / profiles / roles S_ADMI_FCD for protection of transaction codes S_DATASET for access to files on application servers S_LOG_COM for execution of logical commands S_RZL_ADM for CCMS administration Uses special connection for local systems with different user, typically db2<sid> Database Administration Functions for Tablespaces DB Partitions Buffer Pools DB/DBM Parameters Advisory Information with generated SQL statement Auditing ALL changes of database objects via DBA Cockpit are logged in the DBA Audit Log NO logging of manual changes via CLP or other DB2 means! SAP 2009 / Page 16
Administration Using the Planning Calendar Simply spoken an additional layer on top of SM36/SM37 for maintaining DB related tasks Uses a set of configuration and runtime information tables All job output directed to SM37 job log Each job writes status record to special protocol table Initial setup with job wizard Be aware of other DB related background jobs when planning Cleanup/Reset according to note 592974 SAP 2009 / Page 17
Administration Jobs in the Planning Calendar RUNSTATS Depending on DB CFG AUTORUNSTATS switch Normally only Single Table RUNSTATS should be used Be careful if profiles are existing Special Settings might be overwritten by DB2 Autorunstats and vice versa Is automatically run after REORG jobs of DB13 Problem if DB2 profiles are used (needs synchronized with DBSTATC) REORG Depending on DB CFG AUTOREORG switch REORG of tablespaces to reduce High-Water Mark (better use DB6CONV) Single Table Reorg Backup All current backup are supported Backup to different media (Tape, TSM, VendorLib, Snapshot Backup) SAP 2009 / Page 18
Administration Jobs in the Planning Calendar REORGCHK Must always run! Must be scheduled once per week Calculates data for SYSCAT and one schema (see Connection Configuration) Resulting Data is stored to special tables DB6TREORG and DB6IREORG Index sizes are not per index, only globally available Compression check only from time to time, too expensive Special BW Jobs, partly not schedulable by DB13 Jobs of MDC Advisor SAP 2009 / Page 19
Administration Using the Planning Calendar Viewing of Jobs Quick monitoring via Jobs -> DBA Log All jobs executed by SAP standard jobs (History, parameter changes ) All jobs scheduled via DB13 All tools started manually from outside All DPW data collectors State <undefined> indicates severe error (program aborted) Job Scheduling Initial setup via wizard Use of Recurrence Patterns Availability of Jobs depends on SAP and DB2 Release and on DB CFG SAP 2009 / Page 20
Administration SAP RUNSTATSvs. DB2 Autorunstats When Which SAP Scheduling via DB13 Runstats_All and Runstats_DBSTATC Exceptions defined by DBSTATC DB2 Scheduling by DB2, Controlled by Online Maintenance Window Exceptions defined by Autorunstats Policies How Why Default is basic table with detailed index, special handling by DBSTATC Thresholds for UDI counters defined in DB13 Default is distributed table with detailed index, special handling by defining profiles Thresholds for UDI counter fix, special treatment of large tables Result 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 21
Administration SAP REORG vs. DB2 Autoreorg When Which SAP Scheduling via DB13 Autoreorg Exceptions defined by DB13 Size Threshold DB2 Scheduling by DB2, Controlled by Online and Offline Maintenance Window Exemptions defined by Autoreorg Policies How Why Depending on REORGCHK recommendations Flagged by Reorgchk_All job Depending on REORGCHK recommendations, more precise for index reorgs (better evaluation of F7, F8) Flagged by REORGCHK SAP 2009 / Page 22
Documentation SDN under http://www.sdn.sap.com/irj/sdn/db6 Important SAP notes 1027146 Database administration and monitoring in the DBA Cockpit 1027336 DB6: New functions in the DBA Cockpit (incl. PDF Version of Online Dokumentation) 1124987 DB6: Availability of administration functions 1268290 DB6: Scheduling the job "REORGCHK for all tables 1314750 DB6: DBA Cockpit Correction Collection SAP Basis 7.00 / 7.10 1309424 DB6: DBA Cockpit Correction Collection SAP Basis 7.01 / 7.11 SAP 2009 / Page 23