DBA Cockpit

Download as pdf or txt
Download as pdf or txt
You are on page 1of 337

Database Administration Using the DBA Cockpit: IBM DB2 for Linux, UNIX, and Windows

For SAP systems based on SAP NetWeaver 7.3 SP 9 and higher Enhancement Package 2 for SAP NetWeaver 7.0 SP 4 and higher

Target Audience Consultants Administrators Others

Public 09/05/2011

SAP AG Dietmar-Hopp-Allee 16 69190 Walldorf Germany T +49/18 05/34 34 24 F +49/18 05/34 34 20 www.sap.com

Copyright 2011 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, System z9, z10, z9, iSeries, pSeries, xSeries, zSeries, eServer, z/VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server, PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER, OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX, Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of IBM Corporation. Linux is the registered trademark of Linus Torvalds in the U.S. and other countries. Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or other countries. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc.

JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, Clear Enterprise, SAP BusinessObjects Explorer and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries. Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP France in the United States and in other countries. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty. Disclaimer Some components of this product are based on Java. Any code change in these components may cause unpredictable and severe malfunctions and is therefore expressively prohibited, as is any decompilation of these components. Any Java Source Code delivered with this product is only to be used by SAPs Support Services and may not be modified or altered in any way. Documentation in the SAP Service Marketplace You can find this documentation at the following address:
http://service.sap.com/instguides

Typographic Conventions
Type Style Example Text Description Words or characters quoted from the screen. These include field names, screen titles, pushbuttons labels, menu names, menu paths, and menu options. Cross-references to other documentation Example text Emphasized words or phrases in body text, graphic titles, and table titles Technical names of system objects. These include report names, program names, transaction codes, table names, and key concepts of a programming language when they are surrounded by body text, for example, SELECT and INCLUDE. Output on the screen. This includes file and directory names and their paths, messages, names of variables and parameters, source text, and names of installation, upgrade and database tools. Exact user entry. These are words or characters that you enter in the system exactly as they appear in the documentation. Variable user entry. Angle brackets indicate that you replace these words and characters with appropriate entries to make entries in the system. Keys on the keyboard, for example, F2 or ENTER.

Icons
Icon Meaning Caution Example Note Recommendation Syntax

EXAMPLE TEXT

Additional icons are used in SAP Library documentation to help you identify different types of information at a glance. For more information, see Help on Help General Information Classes and Information Classes for Business Information Warehouse on the first page of any version of SAP Library.

Example text

Example text

<Example text>

EXAMPLE TEXT

Database Administration Using the DBA Cockpit: IBM DB2 for LUW

Contents
Database Administration Using the DBA Cockpit: IBM DB2 for Linux, UNIX, and Windows ................................................................ 9
1 Introduction to the DBA Cockpit ..................................................... 10
1.1 Web Browser-Based User Interface (Web Dynpro) ........................... 12 1.2 Maintenance Actions in the DBA Cockpit .......................................... 17 1.3 SAP GUI-Based User Interface (Deprecated) ..................................... 20

2 Configuration and Management of the System Landscape .......... 22


2.1 Configuration of Systems for Remote Monitoring ............................ 22
2.1.1 Configuring Systems for Remote Monitoring Manually ............................................ 23 2.1.2 Configuring Systems for Remote Monitoring Using the System Landscape Directory (SLD) ............................................................................................................... 26 2.1.3 Configuring Database Connections......................................................................... 28 2.1.4 Monitoring Database Connections .......................................................................... 31

2.2 Enabling the Database for the Data Collection Framework .............. 32
2.2.1 Setting Up the Data Collection Framework (DCF) Manually .................................... 34 2.2.2 Maintaining Templates for the DCF......................................................................... 35

2.3 Management of the System Landscape Using the Central Calendar ...................................................................................................... 39
2.3.1 Using the Central Calendar .................................................................................... 40

3 Special Tools in the Favorites List .................................................. 43


3.1 The EXPLAIN Function ........................................................................ 43
3.1.1 The EXPLAIN Function (Web Browser-Based Version)........................................... 43 3.1.2 The EXPLAIN Function (SAP GUI-Based Version) ............................................... 46 3.1.2.1 EXPLAIN Options ............................................................................................ 47

3.2 SQL Command Line ............................................................................. 50 3.3 The Index Advisor ................................................................................ 50
3.3.1 Retrieving Index Recommendations for the Dynamic SQL Cache ........................... 51 3.3.2 Retrieving Index Recommendations for a Single SQL Statement ............................ 53 3.3.3 Defining Virtual User-Defined Indexes .................................................................... 56 3.3.4 Validating Indexes Using the EXPLAIN Function .................................................... 58 3.3.5 Creating Indexes in the ABAP Dictionary ................................................................ 58

4 Performance ...................................................................................... 60
4.1 Performance: Performance Warehouse ............................................. 60
4.1.1 Performance Warehouse: Reporting....................................................................... 61 4.1.2 Performance Warehouse: Configuration ................................................................. 62

4.2 Performance: Time Spent Analysis .................................................... 65 4.3 Performance: Workload Statistics ...................................................... 71 4.4 Performance: Top SQL Statement Analysis ...................................... 73 4.5 Performance: Snapshots ..................................................................... 78
4.5.1 Snapshots: Database ............................................................................................. 80 4.5.1.1 Displaying Detailed Database Snapshot Data ................................................... 82 4.5.2 Snapshots: Schemas.............................................................................................. 83 4.5.3 Snapshots: Buffer Pools ......................................................................................... 84 4.5.3.1 Displaying Detailed Buffer Pool Snapshot Data ................................................. 86

September 2011

4.5.4 Snapshots: Tablespaces ........................................................................................ 87 4.5.4.1 Displaying Detailed Tablespace Snapshot Data ................................................ 89 4.5.5 Snapshots: Containers (Only DB2 V9.7 or Higher) .................................................. 89 4.5.6 Snapshots: Tables.................................................................................................. 91 4.5.7 Snapshots: Applications (Only DB2 V9.7 or Higher) ................................................ 94 4.5.8 Snapshots: Applications (Only DB2 V9.5 or Lower)............................................... 100 4.5.9 Snapshots: SQL Cache (Only DB2 V9.7 or Higher)............................................... 102 4.5.10 Snapshots: SQL Cache (Only DB2 V9.5 or Lower) ............................................. 105 4.5.11 Snapshots: System............................................................................................. 110

4.6 Performance: Critical Activities ........................................................ 111


4.6.1 Critical Activities: Threshold Violations.................................................................. 112 4.6.2 Critical Activities: Threshold Configuration ............................................................ 113

4.7 Performance: Utilities ........................................................................ 114


4.7.1 Utilities: Database Utilities .................................................................................... 115 4.7.2 Utilities: Utility History ........................................................................................... 118 4.7.3 Utilities: Inplace Table Reorganization .................................................................. 120

4.8 History: Database ............................................................................... 122 4.9 History: Tables ................................................................................... 124

5 Space ................................................................................................ 126


5.1 Space: Overview................................................................................. 126 5.2 Space: Automatic Storage................................................................. 128 5.3 Space: Database................................................................................. 129 5.4 Space: Tablespaces ........................................................................... 131
5.4.1 Maintaining Tablespaces ...................................................................................... 136

5.5 Space: Containers .............................................................................. 141 5.6 Space: File Systems........................................................................... 142 5.7 Space: Tables and Indexes................................................................ 144
5.7.1 Tables and Indexes: Top Space Consumers......................................................... 145 5.7.2 Tables and Indexes: REORG Candidates ............................................................. 146 5.7.3 Tables and Indexes: Compression Status ............................................................. 147 5.7.4 Tables and Indexes: Virtual Tables ....................................................................... 151 5.7.5 Tables and Indexes: Indexes ................................................................................ 152

5.8 Analyzing and Maintaining a Single Table ....................................... 154


5.8.1 Single Table Analysis: System Catalog ................................................................. 159 5.8.2 Single Table Analysis: Table Structure.................................................................. 161 5.8.3 Single Table Analysis: Indexes ............................................................................. 163 5.8.3.1 Indexes: System Catalog ................................................................................ 164 5.8.3.2 Indexes: Index Structure ................................................................................. 166 5.8.3.3 Indexes: Index Status...................................................................................... 167 5.8.3.4 Indexes: Compression Status.......................................................................... 169 5.8.3.5 Indexes: REORGCHK ..................................................................................... 171 5.8.4 Single Table Analysis: Table Status...................................................................... 172 5.8.5 Single Table Analysis: Compression Status .......................................................... 177 5.8.6 Single Table Analysis: REORGCHK ..................................................................... 179

6 Backup and Recovery..................................................................... 180


6.1 Backup and Recovery: Overview ...................................................... 180 6.2 Backup and Recovery: Logging Parameters ................................... 180

7 Configuration ................................................................................... 181


7.1 Configuration: Overview .................................................................... 182

September 2011

Database Administration Using the DBA Cockpit: IBM DB2 for LUW

7.2 Configuration: Database Manager .................................................... 186 7.3 Configuration: Database.................................................................... 187
7.3.1 Maintaining the Database Configuration ............................................................... 189 7.3.2 Comparing Database Configuration Parameters for Several Database Partitions .. 189

7.4 Configuration: Registry Variables .................................................... 190 7.5 Configuration: Parameter Check ...................................................... 190 7.6 Configuration: Configuration History ............................................... 195 7.7 Configuration: Buffer Pools .............................................................. 197
7.7.1 Maintaining Buffer Pools ....................................................................................... 199

7.8 Configuration: Workload Management ............................................ 201


7.8.1 Workload Management: Workloads and Service Classes...................................... 201 7.8.2 Workload Management: SAP WLM Setup Status.................................................. 205

7.9 Configuration: Database Partition Groups....................................... 207


7.9.1 Maintaining Database Partition Groups ................................................................. 209

7.10 Configuration: Special Tables Regarding RUNSTATS.................. 211 7.11 Configuring Automatic Maintenance Functions ............................ 213
7.11.1 Automatic Maintenance Settings: General Settings ............................................. 216 7.11.2 Automatic Maintenance Settings: Automatic Backup ........................................... 217 7.11.3 Automatic Maintenance Settings: Automatic RUNSTATS.................................... 220 7.11.4 Automatic Maintenance Settings: Automatic REORG.......................................... 221

7.12 Configuration: Data Classes ........................................................... 224


7.12.1 Maintaining Data Classes ................................................................................... 226

7.13 Configuration: Data Collection Framework.................................... 227


7.13.1 Data Collection Framework: Collector Configuration ........................................... 227 7.13.2 Setup of Workloads and Service Classes in SAP Environments .......................... 231

7.14 Configuring Monitoring Settings .................................................... 233

8 Jobs .................................................................................................. 234


8.1 The DBA Planning Calendar .............................................................. 234
8.1.1 Setting Up and Working with the DBA Planning Calendar ..................................... 236 8.1.1.1 Creating an Action Pattern in the DBA Planning Calendar ............................... 236 8.1.1.2 Scheduling an Action ...................................................................................... 239 8.1.1.3 Changing an Action......................................................................................... 240 8.1.1.4 Deleting an Action ........................................................................................... 241 8.1.1.5 Executing an Action ........................................................................................ 241 8.1.1.6 Displaying Scheduled Actions ......................................................................... 242 8.1.1.7 Troubleshooting .............................................................................................. 243 8.1.2 Scheduling Typical DBA Actions ........................................................................... 244 8.1.2.1 Scheduling Database Backups........................................................................ 244 8.1.2.1.1 Backup Considerations .............................................................................. 246 8.1.2.2 Archiving Log Files To Tape ............................................................................ 248 8.1.2.3 Updating Statistics .......................................................................................... 249 8.1.2.4 Reorganizing Tables ....................................................................................... 252 8.1.2.5 Scheduling a REORGCHK for All Tables......................................................... 253 8.1.2.6 Scheduling Scripts .......................................................................................... 255 8.1.2.7 Running the NLS Cleanup Job ........................................................................ 255

8.2 The DBA Log....................................................................................... 257 8.3 Back-End Configuration .................................................................... 258 8.4 The SQL Script Maintenance ............................................................. 259

September 2011

8.5 Scheduled DB2 Tasks ........................................................................ 260

9 Alerts ................................................................................................ 262


9.1 Alerts: Database System Monitoring in CCMS ................................ 262 9.2 Alerts: Configuring Database System Monitoring........................... 263 9.3 Alerts: Alert Monitor ........................................................................... 265 9.4 Alerts: Alert Message Log ................................................................. 266 9.5 Alerts: Alert Configuration ................................................................ 268

10 Diagnostics .................................................................................... 270


10.1 Diagnostics: Displaying the Audit Log ........................................... 270 10.2 Diagnostics: Lock-Wait Events ....................................................... 271 10.3 Diagnostics: Missing Tables and Indexes...................................... 273 10.4 Diagnostics: Dump Directory .......................................................... 274 10.5 Diagnostics: CLP Commands ......................................................... 274 10.6 Diagnostics: DB2 Messages............................................................ 275
10.6.1 DB2 Messages: Message History ....................................................................... 275 10.6.2 DB2 Messages: Diagnostic Logs ........................................................................ 279

10.7 Diagnostics: Trace Status ............................................................... 280 10.8 Diagnostics: Cumulative SQL Trace............................................... 282

11 BW Administration ........................................................................ 284


11.1 Improvement of MDC Settings Using the MDC Advisor................ 284 11.2 Scheduling a Health Check for the BW System ............................. 285 11.3 Administration and Monitoring of the Near-Line Storage (NLS) Database ................................................................................................... 288
11.3.1 Configuration of the Connection to the NLS Database ........................................ 289 11.3.2 Overview of the NLS Database ........................................................................... 290 11.3.3 Synchronization Check of the NLS Database ...................................................... 293

12 Appendix ........................................................................................ 295


12.1 Database Details: Buffer Pool ......................................................... 295 12.2 Database Details: Cache.................................................................. 297 12.3 Database Details: Asynchronous I/O .............................................. 298 12.4 Database Details: Direct I/O............................................................. 299 12.5 Database Details: Real-Time Statistics .......................................... 300 12.6 Database Details: Locks and Deadlocks ........................................ 300 12.7 Database Details: Logging .............................................................. 302 12.8 Database Details: Calls .................................................................... 304 12.9 Database Details: Sorts ................................................................... 306 12.10 Database Details: XML Storage..................................................... 307 12.11 Buffer Pool Details: Buffer Pool .................................................... 308 12.12 Buffer Pool Details: Asynchronous I/O ........................................ 310 12.13 Buffer Pool Details: Direct I/O ....................................................... 311 12.14 Buffer Pool Details: XML Storage ................................................. 312 12.15 Tablespace Details: Buffer Pool.................................................... 313 12.16 Tablespace Details: Asynchronous I/O ........................................ 315

September 2011

Database Administration Using the DBA Cockpit: IBM DB2 for LUW

12.17 Tablespace Details: Direct I/O ....................................................... 316 12.18 Tablespace Details: XML Storage ................................................. 316 12.19 Application Details: Application ................................................... 317 12.20 Application Details: Agents ........................................................... 321 12.21 Application Details: Assigned Agents .......................................... 323 12.22 Application Details: Agents Memory ............................................ 325 12.23 Application Details: Buffer Pool.................................................... 325 12.24 Application Details: Direct I/O ....................................................... 327 12.25 Application Details: XML Storage ................................................. 327 12.26 Application Details: Locks and Deadlocks .................................. 329 12.27 Application Details: Calls .............................................................. 330 12.28 Application Details: Sorts .............................................................. 331 12.29 Application Details: Cache ............................................................ 332 12.30 Application Details: Unit of Work.................................................. 333 12.31 Application Details: Statement...................................................... 333 12.32 Application Details: Statement Text ............................................. 335 12.33 Application Details: SQL Workspace ........................................... 337

September 2011

1 Introduction to the DBA Cockpit

Database Administration Using the DBA Cockpit: IBM DB2 for Linux, UNIX, and Windows
Use
This document explains how you administer your database using the DBA Cockpit that allows you to monitor, control, and configure your database. The DBA Cockpit provides you with access to all the functions and indicators for monitoring and administration: Checking system status and operation modes Locating potential problems as quickly as possible Early diagnosis of potential problems, for example, resource problems in the host or database system, which could adversely affect the SAP system Analyzing and tuning the SAP system and environment (host and database systems) to optimize the throughput of the SAP system Configuring the database

Naming Conventions
Throughout this document, the following naming conventions apply: IBM DB2 Version 9.7 for Linux, UNIX, and Windows is referred to as DB2 V9.7. IBM DB2 Version 9.5 for Linux, UNIX, and Windows is referred to as DB2 V9.5. IBM DB2 Version 9.1 for Linux, UNIX, and Windows is referred to as DB2 V9.1.

More Information
For additional information about running an SAP system on DB2 for Linux, UNIX, and Windows, choose SAP on DB2 for LUW in the SDN in the Useful Links section of the DBA Cockpit. For DB2-specific information, see the respective IBM DB2 Information Center and IBM manuals for your database at: https://www-04.ibm.com/support/docview.wss?rs=71&uid=swg27009474

September 2011

1 Introduction to the DBA Cockpit

1 Introduction to the DBA Cockpit


The DBA Cockpit is a platform-independent tool that you can use to monitor and administer your database. You access the DBA Cockpit by calling transaction DBACOCKPIT in your SAP system. Note By default, the DBA Cockpit starts with the Web browser-based user interface as entry screen. The SAP GUI-based user interface is still available for compatibility reasons but has been deprecated. Therefore, enhancements for new SAP system and database releases are not part of the SAP GUI. End of the note. You can use the DBA Cockpit to: Navigate between different actions Change to another action without closing the previous action and still hold all data retrieved by this action Handle central configuration Monitor remote systems using remote database connections To use the functions offered for remote monitoring, you must configure the system you want to monitor. The local system is configured automatically when you start the DBA Cockpit for the first time. After having configured the connection and depending on the database, more actions are required to configure the database monitor and to set up database administration. Caution For systems that are monitored using a remote database connection, constraints depend on whether the database release of the remote system is compatible to the database release of the local system. End of the caution.

Availability of Functions in the DBA Cockpit


The availability of functions in the DBA Cockpit depends on various conditions, such as the following: The database release level of the monitored system The release level of the monitored SAP system The application type the database is assigned to, for example, ABAP OLTP, BW, or Java, and so on.

10

September 2011

1 Introduction to the DBA Cockpit

Example All BW-specific functions of the DBA Cockpit require additional BW-functionality in the back end. End of the example. The connections that are assigned to the system, such as the availability of RFC connections The user permissions, which are SAP-specific and also database-specific For more information, see Maintenance Actions in the DBA Cockpit [page 17]. The configuration of the database, such as monitoring settings or automatic maintenance settings The configuration of the back end For more information, see Enabling the Database for the Data Collection Framework [page 32]. Depending on conditions the currently selected system is fulfilling, actions might either be disabled or not visible in the DBA Cockpit. In addition, these actions might show a reduced amount of information on screens and specific functions of affected actions might be disabled (for example, administrative functions are not available due to missing permissions).

More Information
Web Browser-Based User Interface [page 12] SAP GUI-Based User Interface (Deprecated) [page 20]

September 2011

11

1 Introduction to the DBA Cockpit

1.1 Web Browser-Based User Interface (Web Dynpro)


The Web browser-based user interface differs from the classical SAP GUI-based user interface with regard to the overall screen layout and navigation, customizing of the user interface, and the provided functions. By default, transaction DBACOCKPIT starts the Web browser-based user interface (Web Dynpro). In contrast to the standard SAPGUI, the Web browser-based user interface requires an additional configuration of the DBA_COCKPIT Web service. For more information, see SAP Note 1245200 and Administration: HTTP Communication Using the SAP System in the SAP Library at: http://help.sap.com/saphelp_sm32/helpdata/en/78/2bff7a01bd11d5991400508b6b8b11/frame set.htm The entry screen of the DBA Cockpit with the Web browser-based user interface is divided into the following areas:
Common header area Top level navigation including second-level navigation Global toolbar Framework message window Detail navigation Central system data

System landscape selector Content area

Favorites list

Useful Links list Content detail area

12

September 2011

1 Introduction to the DBA Cockpit

Navigation and Screen Layout of the Web Browser-Based User Interface Area Description

Common header Provides a standard set of functions, for example, to log off from the DBA area Cockpit or to customize the layout. In the top level navigation, you can switch between the following areas: Cross-system area on the System Landscape tab page Provides information about the overall system landscape Database-specific area on the Database tab page Provides information about the selected database Top level navigation including second-level navigation In the second-level navigation, the main task areas of database administration are provided, for example, performance monitoring, space management, and job scheduling. For fast navigation, these main task areas provide pull-down menus corresponding to the related detail levels. You can hide the areas Detail Navigation, System Landscape Selector, and Favorites by choosing the Expand or Collapse Launchpad pushbutton on the left side of the top level navigation area. If the launchpad is collapsed, the second-level navigation part provides a simplified system selection field with an F4 help. Your chosen screen layout is stored in the user settings and restored at the next start of the DBA Cockpit. Contains the main actions of the main task areas. Depending on the selected main action, a subset of related actions is available. Example Detail navigation If you choose Performance in the top level navigation area, the main actions become available, such as Performance Warehouse, Time Spent Analysis, and others. If you choose Performance Warehouse, the subactions Reporting and Configuration become available. End of the example. System landscape selector Provides a quick overview of all configured systems. This area is described in more detail under Customizing of the System Landscape Selector later in this section.

September 2011

13

1 Introduction to the DBA Cockpit

Contains a list of favorite links to special tools and actions. To provide quick access to specific tools and actions, choose Personalize Add Favorite in the common header area. An entry is added to your list of favorites. You can rename or delete favorites by choosing Personalize Organize Favorites . For more information, see Special Tools in the Favorites List [page 43]. Contains the following useful links to: The IBM DB2 Information Center Useful links By choosing this link, you can directly access online information about DB2. SAP on DB2 for LUW in the SAP Developer Network (SDN) By choosing this link, you can directly access information about the DB2 SAP community in the SDN, such as, articles and blogs. Displays the message window that is provided by the framework. Unlike the classic SAP GUI message processing, this window contains a complete history of all messages that are sent during the session. In addition, you can: Collapse or expand the window by choosing Expand Message Window or Collapse Message Window. Check if a long text for a message is available by double-clicking the message or by choosing Details. Note By default, the message window is collapsed. When a new message is generated, it is automatically expanded. End of the note. Global toolbar The global toolbar provides a set of globally available functions for navigation and content-related functions like Refresh.

Favorites list

Framework message window

Central system This area is common to most actions providing, for example, the time of the data last refresh, the startup time, and the database name.

14

September 2011

1 Introduction to the DBA Cockpit

Displays details of the currently selected action. The content area is divided into the following areas that are optionally available depending on the chosen action: The Selection area where you can enter selection criteria for the content to be displayed Content area The Summary area that provides summary views of data, for example, totals or execution times The content, which depends on the screen and action you have chosen You can refresh the content by choosing the Refresh pushbutton in the global toolbar or by changing the selection criteria and then choosing the Apply Selection pushbutton in the Selection area. Some reports are displayed as a chart. To modify the chart view, you can use the Chart Type, Values, and Chart Size menu buttons that are optionally available depending on the screen. By choosing the Chart Size menu button, you can specify the width and height of the chart to be displayed. In addition, you can open a detailed table view by choosing the Toggle Table Display pushbutton. Content detail area Only appears with certain actions and displays additional information that is related to the selected action. Typically, this area shows details that are related to the information provided in the main content area.

Chart view in the content area

Customizing the System Landscape Selector


By default, all systems are displayed without any grouping or filtering. For each configured system, the alert status, the name of the system and its database host is displayed. The following menu buttons are available for the list of systems: Refresh System Landscape You can refresh the information about the available systems in the list. Group Systems by Selected Criteria You can customize the displayed list of systems by grouping them according to the selected criteria: o o o o Database Platform Name Custom Alerts

To use a custom grouping, you must first define and add a custom group to the list. To do so, choose Add Group from the pop-up menu of the menu button Group Systems by Selected Criteria. Specify a name for the custom group and assign the systems of your choice.

September 2011

15

1 Introduction to the DBA Cockpit

As soon as you have added a custom group, the option Organize Groups becomes available in the pop-up menu of the menu button Group Systems by Selected Criteria, which lets you maintain an already existing group. Filter Systems by Selected Criteria You can filter the list of available systems to show only those systems that match the filter criteria. You filter, for example, by the alert status of the systems. Search Systems Provides an input field where you can search for a specific system in the list.

Switching from the Web Browser-Based User Interface (Web Dynpro) to the SAP GUI-Based User Interface
You have to switch back to the SAP GUI-based user interface of the DBA Cockpit in the following cases: The system to be monitored is using DB2 UDB Version 8.2 and there is specific information for DB2 UDB Version 8.2 that is not available in the Web browser-based user interface. In a heterogenous system landscape, you select a database to be monitored that does not yet fully support the Web browser-based user interface To switch the user interface, perform the following steps: 1. In your SAP system, you enter transaction DBACOCKPIT. Depending on your settings, the DBA Cockpit either starts with the Web browserbased user interface in embedded mode or with the SAP GUI-based user interface. Note Embedded mode means that the Web browser-based user interface does not open in a separate Web browser but is embedded in the SAP GUI. End of the note. 2. You switch between the two user interfaces as follows: o o To switch from the Web browser-based user interface to the SAP GUI-based user interface, choose the Switch to SAPGUI menu button To switch from the SAP GUI-based user interface to the Web browser-based user interface, choose the Switch to Web Dynpro pushbutton. Note To open the Web browser-based user interface in the full screen mode, choose the Full Screen option of the menu button. End of the note. If you want the SAPGUI to be the default UI to start with, choose the option Use SAP GUI as default UI of the Customize button in the SAP GUI. To set the WebDynpro UI as default, choose the option Use Web Dynpro as default UI.

16

September 2011

1 Introduction to the DBA Cockpit

1.2 Maintenance Actions in the DBA Cockpit


The DBA Cockpit provides a set of actions to monitor and to maintain the database. To be able to perform these actions, the SAP user requires some additional authorizations. A user must first have the global authorization and then additionally the appropriate system-specific permission. For example, to administrate a system, the user must have S_RZL_ADM authorization for maintenance and the system-specific authorization for maintenance. The following sections provide information about how global and system-specific authorizations are checked and what you need to do to gain the required authorizations. Note The maintenance actions provided in the DBA Cockpit set locks to prevent parallel processing. All changes to the database are recorded in an audit log file. End of the note.

Global Authorization Check


When you start the DBA Cockpit or change to another system in the DBA Cockpit, an authorization check is performed. You can enable or disable the database maintenance in general using the profile parameter dbs/db6/ccms_maintenance. If this profile parameter is not set in the instance profile, the default value 1 is used. Depending on the setting of profile parameter dbs/db6/ccms_maintenance, the following authorization checks exist: If the profile parameter is set to 0, SAP users cannot perform any maintenance actions, regardless of their personal permissions. If the profile parameter is set to 1, SAP users can perform maintenance actions depending on their personal permission for the authorization object S_RZL_ADM. The attribute ACTVT of this authorization object defines whether a user may maintain or only monitor objects.

System-Specific Authorization Check


In addition to the permissions that are globally granted, you can restrict access to specific systems that were configured in the DBA Cockpit. You enable or disable the system-specific permission checks using the profile parameter dbs/dba/ccms_security_level. If this profile parameter is not set in the instance profile, the default value 0 is used. Depending on the setting of profile parameter dbs/dba/ccms_security_level, the following authorization checks are performed when you select a system in the DBA Cockpit: If parameter dbs/dba/ccms_security_level is set to 0, no additional systemspecific check is performed. If parameter dbs/dba/ccms_security_level is set to 1, SAP system users can perform actions depending on their personal permission for the authorization object S_DBCON.

September 2011

17

1 Introduction to the DBA Cockpit

The attributes DBA_DBHOST, DBA_DBSID, and DBA_DBUSER must match the corresponding attributes for the database connection that was assigned to the selected system. The special value <LOCAL SYSTEM> for the attribute DBA_DBSID is used to identify the local system itself. The attribute ACTVT of this S_DBCON authorization object defines the level of permitted actions and can have the following values: Value 03 Display Description Enables read access to all screens of the DBA Cockpit except to those that only have a maintenance mode and no read-only mode Enables read and maintenance access to all screens of the DBA Cockpit except to those that require extended maintenance permissions Enables read and maintenance access to all screens of the DBA Cockpit including special maintenance screens 36 Extended maintenance Note The only screen for which extended maintenance permission is required is the SQL Command Line screen that you can access in the Favorites list of the DBA Cockpit. End of the note. You can grant authorizations for using the DBA Cockpit with the following roles: SAP_BC_S_DBCON_USER Read-only role that allows monitoring access to all systems configured within the DBA Cockpit SAP_BC_S_DBCON_ADMIN Additionally grants administration rights to the user for all systems. This role does not include the value Extended maintenance. Note Make sure that you have maintained the authorizations for your DBA user and for all background users that either run jobs of the DBA Planning Calendar or the SAP standard jobs SAP_COLLECTOR_FOR_PERFMONITOR and SAP_CCMS_MONI_BATCH_DP. End of the note.

23 Maintain

18

September 2011

1 Introduction to the DBA Cockpit

Granting Database Permissions


To access the database, the user that is used for monitoring must at least have sufficient authorizations as follows: For remote systems running on DB2 for Linux, UNIX, and Windows, you can freely choose a user for monitoring. For example, if you use the DB2 instance owner, you have all administrative authorizations. If you want to connect to remote systems running on any other database platform, see the appropriate DBA Cockpit documentation for that database platform. Local systems use a special administration connection. This connection is called +++DB6ADM and is automatically generated. When you start the DBA Cockpit and no user has been assigned to the administration connection, you are asked for the user credentials. If you do not supply the correct user credentials, a standard connection with the SAP connect user is used instead of the administration connection. In this case all administrative actions of the DBA Cockpit are disabled. You can change the user and password for the administrative connection as described in Configuring Database Connections [page 28], which is mandatory for background tasks that require administrative permissions. Recommendation To receive full administrative permission, we recommend that you use the instance owner db2<dbsid> for the administration connection. End of the recommendation. Systems that are monitored via remote database connections use the user that is specified for the database connections. This user must have sufficient authorizations.

Locking of Actions
For each maintenance action that you have selected using the DBA Cockpit, a lock is set for the system that is being monitored. All locks are released when you exit the DBA Cockpit or when you change to another system.

Auditing of Maintenance Actions


When you make changes that affect database objects such as database configuration parameters or tablespaces, an audit log is written. You can display this audit log in the DBA Cockpit. For more information, see Diagnostics: Displaying the Audit Log [page 270].

September 2011

19

1 Introduction to the DBA Cockpit

1.3 SAP GUI-Based User Interface (Deprecated)


The SAP GUI-based user interface of the DBA Cockpit has been deprecated. This means that new capabilities of the DBA Cockpit that are available with Enhancement Package 2 for SAP NetWeaver 7.0 are not supported, for example: New functions of DB2 V9.7 such as index compression Screens that rely on the proper setup of the data collection framework (DCF) that provides history monitoring data of the database The following table provides an overview of all functions that are no longer supported or that have been replaced by new Web Dynpro-based functions: SAP GUI Performance and Deadlocks Performance Database Performance Tables Lock Waits Replaced by Web Dynpro Diagnostics Lock-Wait Events Snapshots Database if

History

Integrated in Performance DCF is installed Integrated in is installed Performance

History

Snapshots

Tables

if DCF

Replaced by specialized views under Indexes if DCF is installed

Space

Tables and

In the submenu, you can choose between the following views: Space Tables and Indexes Top Space Consumers REORG Candidates Compression Status Virtual Tables Space History Overview Available but deprecated

Space History and Tablespaces Space History and Indexes

Database

Replaced by

Space

Database

if DCF is installed Top Space

Tables

Replaced by Space Tables and Indexes Consumers if DCF is installed Available but deprecated

Configuration Settings

Monitoring To configure the DCF, choose Configuration Data Collection Framework Collector Configuration .

20

September 2011

1 Introduction to the DBA Cockpit

Configuration Changes Diagnostics

Parameter

Replaced by Configuration if DCF is installed n/a n/a

Configuration History

Deadlock Monitor BW Data

BW Administration Distribution Note

If you want to use the SAP GUI-based user interface, you can change the default user interface as follows: 1. Call transaction DBACOCKPIT. The SAP GUI-based user interface appears and in parallel, the Web browser-based user interface in a separate browser window. 2. In the SAP GUI, choose the Personal Settings menu button and select Use SAPGUI for DB2 LUW Systems. The changes take effect with the next call of transaction DBACOCKPIT. End of the note. For more information about the functions provided on the SAP GUI screens, see Database Administration Using the DBA Cockpit: IBM DB2 for Linux, UNIX, and Windows (For SAP Systems based on Enhancement Package 1 + 2 of SAP NetWeaver 7.0) at: http://service.sap.com/instguidesnw70 Operations Database-Specific Guides

September 2011

21

2 Configuration and Management of the System Landscape

2 Configuration and Management of the System Landscape


The following sections provide information about how to configure and manage your system landscape: Configuration of Systems for Remote Monitoring Enabling the Database for the Database Connection Framework Management of the System Landscape with the Central Calendar

2.1 Configuration of Systems for Remote Monitoring


To be able to use the DBA Cockpit to monitor remote systems, you have to configure those systems in the DBA Cockpit. If the DBA Cockpit is used as part of Solution Manager Diagnostics, the DBA Cockpit setup is part of the SAP Solution Manager setup. This means that when you integrate systems into the SAP Solution Manager landscape, the related databases are configured in the DBA Cockpit and no DBA Cockpit-specific setup is required anymore. Alternatively, you can configure your database system either using database information that is stored in the system landscape directory (SLD) for automatic generation and update of system entries or by manually creating database connections and system configuration entries. To access the System Configuration screen, choose System Configuration on the System Landscape tab page of the DBA Cockpit. A table of all monitored systems is displayed. In the first column, an icon indicates the current status of each system. Normally, when you start the DBA Cockpit, the local system is set as default system. To change this setting, select a system from the list and choose Default System. Note This setting only applies to the user that is currently logged on to the system. It is not a system-wide setting. End of the note. To monitor a system remotely, you use the following methods: Remote database connections (mandatory) This method uses additional connections. It is the main access method for monitoring and administration tasks and it is mandatory. You can specify remote connections for any database and maintain the connections using the DBA Cockpit. RFC connection (additional option for SAP ABAP systems only) For this method, you have to assign an RFC connection to your system. RFC connections are available for SAP ABAP systems only. You can use RFC connections as an optional access path for ABAP-related monitoring functions, for example, for the consistency check of the ABAP Dictionary. This means that the DBA

22

September 2011

2 Configuration and Management of the System Landscape

Cockpit uses the RFC connection in parallel to the database connection for the same system. Note You can only maintain RFC connections with transaction SM59, not with the DBA Cockpit. End of the note.

2.1.1 Configuring Systems for Remote Monitoring Manually


You use this procedure to configure systems that you want to monitor using remote database connections. A manual system configuration is only necessary if the monitored database has not been configured during the integration of a system using SAP Solution Manager. The configuration does not include the setup of the monitoring infrastructure, but you perform only a basic setup that is necessary to connect to the monitored database. For subsequent configuration steps, see Enabling the Database for the Data Collection Framework [page 32]. Note Depending on the database platform of the selected system, some options might not be available. In this case, you cannot enter any data in the corresponding fields. End of the note.

Prerequisites
The system(s) that you want to monitor must have a database release that is compatible with the database release of your local database. The user for the database connection must have sufficient database permissions. For more information, see Maintenance Actions in the DBA Cockpit [page 17].

Procedure
1. Call the DBA Cockpit. The System Configuration screen appears displaying a list of all available systems with a Configuration Status icon that indicates the current system status. Note When you start the DBA Cockpit for the first time, the local system is automatically added to the list of all available systems. At least one system entry is displayed. End of the note. 2. Choose the Add pushbutton. The wizard Integrate a System appears.

September 2011

23

2 Configuration and Management of the System Landscape

The following table lists the steps and recommended actions: Step Name Action Provides an overview of the configuration steps Introduction No action to be taken Specify the following: o Name of the system that you want to monitor Note This name is a unique ID and does not have to be the SAP system ID. You can choose any name except the SAP system ID of the local system that is reserved for the local system entry. End of the note. System Characteristics o o Description of the monitored system Connection type Choose between the following connection types: Remote Database Connection Remote Database Connection and RFC Destination Remote Database Connection via RFC Destination Specify the name of the RFC destination to be used RFC Destination (Optional step that is only necessary if, in the previous step, you have chosen a connection type that requires an RFC destination.) Note The specified RFC destination must already exist and be available. End of the note. You can test the destination by choosing the Test Connection pushbutton. If the connection is not working, you can only proceed if you select the Ignore Communication Errors checkbox.

24

September 2011

2 Configuration and Management of the System Landscape

Specify the following: o Name of the database connection This is a unique name that you can freely choose. Alternatively, you can search for an already existing connection name using the related search help. In this case, confirm the selected name using the Enter key to prefill the connection attributes. o o Database Connection o Database platform of the monitored database Connection maximum that limits the parallel use of this connection by the kernel Connection optimum that sets the optimum number of open connections Recommendation You should set this value to 0 to ensure that the kernel closes connections if they are no longer used. End of the recommendation. o o User name and password for the user that is used for monitoring List of connection parameters that are required to identify the database

Specify how you want to collect monitoring data: o If alerts are to be provided for the RZ20 alert monitor, select the Activate Alert Monitoring checkbox. Note If you are using the DBA Cockpit in SAP Solution Manager 7.1, this option should not be used anymore. Instead, the E2E alerting of SAP Solution Manager is used that requires no specific setup in the DBA Cockpit. End of the note. o o If the monitoring data is to be collected by the remote system, select the Data Collection by Remote System checkbox. If data for the Central Planning Calendar is to be provided, select the Show Scheduled Jobs in Central Planning Calendar checkbox. Deprecated option: If data about the performance or the size of database objects is to be collected, select the Collect Space and Performance History Data

Monitoring Settings

September 2011

25

2 Configuration and Management of the System Landscape

checkbox. Note This option has been deprecated and should not be used anymore. Instead, proceed as described in Enabling the Database for the Data Collection Framework [page 32]. End of the note. Depending on the selected database platform, only a subset of options might be available. Summarizes all actions to be performed Summary To save your entries, choose the Execute pushbutton. Summarizes all performed actions including error messages Execution Protocol To exit the wizard, choose the Finish pushbutton and return to the System Configuration screen.

3. Optional: If you want to change an existing configuration entry, select the system entry in the overview list and choose the Change pushbutton. In the dialog box Change System Configuration Entry, enter and save your changes. 4. Optional: If you want to delete a configuration entry, select the system entry in the overview list, choose the Delete pushbutton and confirm the deletion.

2.1.2 Configuring Systems for Remote Monitoring Using the System Landscape Directory (SLD)
The system landscape directory (SLD) contains data from all database systems that are available in your system landscape. You can use this data to set up the system configuration in the DBA Cockpit instead of setting it up manually or using SAP Solution Manager. When you set up the DBA Cockpit for the first time, you use this procedure to import the appropriate data from the SLD. During production operation, you use the procedure to synchronize the data between the SLD and the DBA Cockpit periodically. Note This function has been deprecated. We recommend that you only use the SAP Solution Manager for the setup and monitoring of your system landscape. End of the note.

26

September 2011

2 Configuration and Management of the System Landscape

Procedure
1. To import database connection data from the SLD, call the DBA Cockpit. 2. On the System Landscape tab page, choose SLD System Import. The SLD System Import screen appears. Depending on the system landscape, one or more of the following nodes are displayed: o New Database Systems in the SLD All database systems that are registered in the SLD and that so far have been unknown to the DBA Cockpit are displayed. o Changed Systems From Earlier SLD Imports All database systems for which the main data differs between the SLD and the DBA Cockpit are displayed. o Systems No Longer Registered in the SLD All systems that were originally imported from the SLD into the DBA Cockpit but that are no longer registered in the SLD are displayed. o Systems Identical in the SLD and in the DBA Cockpit All systems that are registered in the SLD and that are identical in the DBA Cockpit are displayed. o Unsupported Database Systems in the SLD All database systems that are registered in the SLD but not supported by the DBA Cockpit are displayed. Note Each database system is described as follows: <Name (system ID) of the database system> on <main database host> ( <database platform> ) End of the note. 3. To import database system data, choose the Change pushbutton. The actions allowed for each database system are displayed in the second column of the tree. 4. Select the actions that you want to execute for the selected database systems and choose the Import pushbutton. By default, only the import of new database systems is selected.

September 2011

27

2 Configuration and Management of the System Landscape

The selected actions are executed. A short message for each executed action is displayed in the content detail area. Note Connection data that is retrieved from the SLD might not be complete for one of the following reasons: o o Depending on the data provided by a system to the SLD, some connection data can be incomplete. User or password data is not available via SLD.

When you establish the connection to an imported system for the first time, the DBA Cockpit checks the completeness of the configured system. This means that you are prompted for user, password, and connection information, if necessary. If additional connection information is required, enter the required data as described in Configuring Database Connections [page 28]. End of the note.

2.1.3 Configuring Database Connections


This section describes how you set and maintain technical attributes for remote database connections on the Database Connections screen in the DBA Cockpit. The DBA Cockpit uses these connections for administration and monitoring or for application programs that use secondary connections to external databases. Usually, new connections are created during the system configuration on the System Configuration screen as described in Configuring Systems for Remote Monitoring Manually [page 23] and, therefore, do not have to be created on the Database Connections screen. You can also use the Database Connections screen to set up database connections that are used for non-monitoring components, for example, for the access to external data resources by BW.

Procedure
1. Call the DBA Cockpit and on the System Landscape tab page, choose Database Connections. The Database Connections screen appears displaying a list of all available database connection definitions grouped by database platform: Column Description Name of the database connection Remote Database Connection Note This is a unique name that you can freely choose. End of the note. DB Name Name of the database

28

September 2011

2 Configuration and Management of the System Landscape

Column DB Host DB Schema User Name Permanent Max. Connections Opt. Connections

Description Name of the database host Name of the database schema to be monitored Name of the connect user Specifies whether the connect user must be permanently available Maximum allowed number of open connections Optimal number of connections

By default, the database connections that are defined in the local system are displayed. 2. To add a database connection, choose the Add pushbutton. The Add Connection Entry dialog box appears. 3. In the Add Connection Entry dialog box, enter the following: o In the Connection Name field, specify the name of the connection. Note This name is a unique ID that you can choose freely except for names that are reserved by SAP for generated connections. These can be, for example, administrator connections or connections that are used by systems from the system landscape directory (SLD). End of the note. o o In the Database System field, select the name of the database platform from the dropdown list. In the Connection Maximum field, enter an appropriate value. This value limits the number of database connections that are currently held by the SAP system. The SAP system does not let you exceed this limit. In the Connection Optimum field, enter an appropriate value. This value is a more flexible limit that can be exceeded. If you want the connection to be mandatory for the SAP system, select the Permanent checkbox. This parameter defines the availability of the database connection. It is then handled in the same way as the local default connection, that is, if this database connection is not available for a work process, the work process of the SAP system cannot run. Caution You should set this parameter only if the connection is absolutely required to run your SAP system.

September 2011

29

2 Configuration and Management of the System Landscape

End of the caution. o In the User Name field, enter the name of the connect user. Make sure that you choose a user with the appropriate authorizations. For more information, see Maintenance Actions in the DBA Cockpit [page 17]. In the Password field, enter a password for the connect user and confirm it in the appropriate field. In the parameter table, specify the following additional database-specific parameter values: Attribute Database Name Name of the database Name or number of the service Service Name This value corresponds to the parameter SVCENAME of the database manager configuration (DBM) of the remote database. Name of the remote database server Name of the schema to be monitored Schema Name Note If you omit this field, the name of the SAP connect user is used as schema. End of the note. 4. To save your entries, choose the Add pushbutton. 5. To change a database connection, expand the respective database platform in the Remote Database Connection column, select a connection, and choose the Change pushbutton. The Change Connection Entry dialog box appears. 6. Enter your changes in the appropriate fields and choose Save. 7. To check if you have entered the correct user and password information as well as the correct technical connection data, you can test a database connection. To do so, select a connection and choose the Test pushbutton. The test result is displayed in the Connection Test Protocol in the content detail area. 8. To delete a connection, select a connection and choose the Delete pushbutton. Caution If the selected database connection is still used by a system that is registered in the DBA Cockpit, you cannot delete it. End of the caution. Description

o o

Database Host

30

September 2011

2 Configuration and Management of the System Landscape

2.1.4 Monitoring Database Connections


You can use the DB Connection Monitor screen to monitor all database connections from all application servers. To access the DB Connection Monitor screen, call the DBA Cockpit, and on the System Landscape tab page, choose DB Connection Monitor. The following information is displayed: Note By default, all disconnected database connections are hidden. End of the note. Column Server Work Process Name of the application server Number of the work process Internal number of each connection of a work process (each work process can have several connections) You can use this handle to analyze a specific connection. Connection Name Name of the connection Connection ID ID of the connection State of the connection Possible values are: ACTIVE Connection State INACTIVE CONNECTING DISCONNECTED Changing Operation Indicates if a changing operation was executed Indicates if COMMIT statements are blocked Block Commit (If a COMMIT is executed, a dump occurs.) Cursor with Hold Permanent Connection Indicates that the connection has a cursor with hold Indicates if the connection is permanent Description

Handle

September 2011

31

2 Configuration and Management of the System Landscape

Column Reconnect

Description Indicates if the connection automatically reconnects after it was closed

Force Reconnect Indicates if the connection is forced to reconnect after it was closed Timeout Maximum Optimum Date Time DB Host Program Timeout when the connection is closed Maximum allowed number of open connections Optimal number of connections Date when the connection was established Time when the connection was established Host name Program that opened the connection

For more information about a database connection, select the relevant entry from the overview table. The Database Connection Details area appears displaying details about the database connection, such as technical settings, user credentials, and parameter values.

2.2 Enabling the Database for the Data Collection Framework


After a system has been configured in the DBA Cockpit, the database to be monitored needs additional instrumentation to enable the time-based collection and evaluation of data related to performance, configuration, and space. To instrument this data collection framework (DCF), a separate schema is created in the monitored database that contains all relevant monitoring objects, such as: A set of tables that keep the history Tablespaces to store these monitoring tables A set of stored procedures to collect data on a regular basis These stored procedures are scheduled by the DB2 administrative task scheduler (ATS). In case of an SAP system, a work process-based workload management configuration is applied. Regardless whether the database has been configured for monitoring using SAP Solution Manager or using the DBA Cockpit, the first time you select a database system for monitoring in the DBA Cockpit, the existence of the DCF is checked.

32

September 2011

2 Configuration and Management of the System Landscape

If the DCF does not yet exist, it is automatically set up if the following applies: The minimum database release level of the monitored database is at least DB2 V9.1. The database is enabled for automatic storage management or the required tablespaces have already been created. If the DCF cannot automatically be set up because of missing tablespaces or insufficient privileges of the monitoring user, the DBA Cockpit initially displays the appropriate configuration screen where you can perform the required setup steps as described in Setting Up the Data Collection Framework (DCF) Manually [page 34]. All settings for the instrumentation, for example, recurrence patterns for the scheduled data collectors and the amount of data to be collected are determined by templates. SAP provides the following standard templates: SAP Default Most of the data collectors run hourly. The sliding window is set to two weeks except for the most important tables and indexes. SAP Detailed Most of the data collectors run quarter-hourly. The sliding window is set to two weeks except for the most important tables and indexes. By modifying these templates, you can influence the automatic setup of the DCF. For more information, see Maintaining Templates for the DCF [page 35]. Note If you set up the data collection framework, the monitoring history function that has been deprecated as of Enhancement Package 2 for SAP NetWeaver 7.0 is switched off, that is: The option Collect Space and Performance History Data in the system configuration entry is disabled so that the related SAP background jobs do not collect history data anymore for SAP releases prior to Enhancement Package 2 for SAP NetWeaver 7.0. If the REORGCHK for All Tables job is scheduled, it is removed from in the DBA Planning Calendar and the respective data is now collected by the DCF. The special compression function that formerly was provided by the REORGCHK for All Tables job, has been integrated in the Compression Status screen that is available under Space Tables and Indexes . End of the note.

September 2011

33

2 Configuration and Management of the System Landscape

2.2.1 Setting Up the Data Collection Framework (DCF) Manually


The DCF is set up individually for each database based on the database version, the usage type of the database, and the SAP coding. To set up the DCF manually, you can either use a template or activate and configure individual history data collectors. Recommendation We recommend that you use templates to ensure that data is collected homogeneously in your system landscape. Only in rare cases, it might be advisable that you configure individual history data collectors. End of the recommendation.

Procedure
1. Call the DBA Cockpit, and on the Database tab page, choose Collection Framework Collector Configuration . The Collector Configuration screen appears. 2. Choose the Implement Template pushbutton. The Implement Template dialog box appears. The default template is marked with an asterisk (*). By default, deprecated functions are preselected for disabling. If you want to keep any old settings, deselect the relevant checkboxes. Note The option to disable deprecated functions or to keep them is only available if there are deprecated functions that are currently active but recommended for disabling. End of the note. 3. To set up the template in the monitored database, choose the Implement pushbutton. Configuration Data

More Information
Configuration: Data Collection Framework [page 227]

34

September 2011

2 Configuration and Management of the System Landscape

2.2.2 Maintaining Templates for the DCF


The data collection framework is based on predefined templates. These templates ensure a homogeneous setup of the history data collectors in your system landscape. You can only maintain these templates on the Template Definition screen in the DBA Cockpit. On the Template Definition screen, you can perform the following actions: Create new templates Change single history data collectors in a template Set a default template Delete a template Note In the SAP Solution Manager setup wizard for managed systems for the database, the templates are available for use but cannot be maintained. End of the note. SAP provides two default templates as described in Enabling the Database for the Data Collection Framework [page 32]. You can access the Template Definition screen by calling the DBA Cockpit and choosing Configuration Data Collection Framework Template Definition on the Database tab page of the DBA Cockpit. From the Template dropdown list, choose the appropriate template for your setup. The following information is displayed: Column Description Name of the history data collector Data Collector Typically, the name refers to the data that is collected, for example, the data collector Tables stores table-related metrics in the history tables. The following data collector types are available: SAP Data Collection and Preparation (STP) These history data collectors have their own mechanism for delta calculation of the different snapshots. Type DB2 Event Monitor and Preparation (STP) A DB2 event monitor is used to store the data in tables. Cleanup of Message Logs (STP) The Framework data collector is not a typical data collector type, but a cleanup job for the messages generated by the above mentioned data collector types.

September 2011

35

2 Configuration and Management of the System Landscape

Column

Description

Release (min) Minimum database release required for the history data collector Release (max) Maximum database release supported by the history data collector Indicates the setup status: Green: The history data collector is set up as intended. Yellow: The history data collector is not set up properly. We recommend that you repair it. Red: The history data collector is not set up. Set up the history data collector according to the assigned template. Gray: The history data collector is not set up and the assigned template also marks this data collector to be deactivated. Collection Interval Schedule of the history data collector State of the DB2 event monitor: Green: The DB2 event monitor is set up as intended. Yellow: Event Monitor Active The DB2 event monitor is not set up properly. We recommend that you repair the history data collector. Red: The DB2 event monitor is not set up. Set up the data collector according to the assigned template. Gray: No DB2 event monitor is used by the data collector. Days Kept in History Number of days of the sliding history window The data in the history is deleted after this number of days.

Setup

36

September 2011

2 Configuration and Management of the System Landscape

Creating a New Data Collector Template


You can create a new data collector template either by copying an existing template or by generating a template that is based on the configuration of an individual system as follows: Copying an existing template: 1. On the Template Definition screen, choose a template from the Template dropdown list and choose the Save As New Template pushbutton. The Save As New Template dialog box appears. 2. Enter a unique name and a description of the new template. 3. Save the template. Creating a template based on a system configuration: 1. On the Database tab page of the DBA Cockpit, choose Data Collection Framework Collector Configuration Configuration .

2. On the Collector Configuration screen, choose the Save as New Template pushbutton. Note The Save As New Template pushbutton is only enabled if the respective system configuration fulfills the minimum template requirements of SAP that are defined by the SAP Default template. This means that every new template must determine a finer granularity or a longer retention time for the history data than the SAP Default template does. End of the note. 3. In the Save As New Template dialog box, enter a unique name and a description of the new template. 4. Save the template.

Changing a Single History Data Collector in a Template


The Setup status of the history data collector must be green. 1. Choose a non-SAP template from the Template dropdown list. 2. On the Configuration tab page in the content detail area, choose the Change Settings pushbutton. Note You cannot change an SAP template. Instead, you can create a custom template based on the SAP template and change this newly created template. End of the note. 3. In the content detail area, enter your changes in the respective fields. 4. Apply your changes.

September 2011

37

2 Configuration and Management of the System Landscape

Note If you want to discard your changes, choose the Reset Changes pushbutton. End of the note. In some areas, the DBA Cockpit joins data from different data collectors on the time dimension. We, therefore, recommend that you have the same configuration for the schedules for these groups of data collectors: General data collectors o o o o o Buffer Pools Containers Configuration Database Tablespaces

Database Objects o o Indexes Tables

Setting a Default Template


The default template is preselected in the template-based setup and in the SAP Solution Manager setup wizard for managed systems. To change a default template, choose a template from the Template dropdown list and choose the Set As Default pushbutton. Note The current default template is marked with an asterisk (*). If the default template is currently selected, the Set As Default pushbutton is disabled. End of the note.

Deleting a Template
You can delete a template by choosing it from the Template dropdown list and choosing the Delete pushbutton. A list of all systems is displayed that are assigned to this template. If there are entries in the list, the default template is assigned to these systems before the template is deleted. Note You cannot delete SAP templates or the current default template. If you want to delete the current default template, you first have to unmark it as the default by setting a different template as the new default.

38

September 2011

2 Configuration and Management of the System Landscape

End of the note.

2.3 Management of the System Landscape Using the Central Calendar


The Central Calendar is part of the DBA Cockpit in the SAP system. It gives you a single point from which to manage database administration (DBA) actions in an integrated SAP environment. The actions available differ according to the database platform but the method of use is the same. Examples of actions are backups, database system checks, and so on. Note The Central Calendar is only for viewing DBA actions by system. However, you can easily switch to the DBA Planning Calendar for any SAP system registered in the DBA Cockpit to plan that is, schedule, change, delete, or execute DBA actions. End of the note. The Central Calendar gives you a single point from which to manage: Databases of different types and versions on remote SAP systems Databases for different versions of the SAP system Databases of non-ABAP SAP systems

Features
You can manage in real time systems directly administered from the system where the DBA Cockpit is running as well as remote systems, including non-ABAP systems. You can quickly check the color-coded status for each system to see if actions have executed successfully. You can quickly check the number of actions and number of actions with the highest status severity for each system, as shown in the following example: Example The entry for February 2007 in the cell for Thursday February, 08 is: 3 FUD 2 On system FUD for Thursday 8th January 2007 (in the past), there were 3 actions planned, 2 of which had the highest status severity. For example, the highest status severity might be Warning, in which case the entry is displayed with a yellow background. End of the example.

September 2011

39

2 Configuration and Management of the System Landscape

Activities
1. On the system where you normally run the DBA Cockpit, you plan a regular job in the DBA Planning Calendar to update the results from remote systems using the action Central Calendar Log Collector. For example, you plan this job to run daily at 06:00. 2. You define the systems you want to monitor in the DBA Cockpit by setting the flag Collect Central Planning Calendar Data for each system. 3. You regularly check the results using the Central Calendar. 4. If you need to schedule, change, delete, or execute actions, you switch to the DBA Planning Calendar.

2.3.1 Using the Central Calendar


You can use the Central Calendar in the DBA Cockpit to view actions on all the databases of your SAP systems.

Prerequisites
You have defined the systems to be displayed in the Central Calendar by selecting the required system on the System Configuration screen on the System Landscape tab page of the DBA Cockpit and selecting the Collect Central Planning Calendar Data checkbox under Collector Options in the System Configuration Details area. For more information, see Configuring Systems for Remote Monitoring Using Remote Database Connections. In an ABAP system, make sure that you schedule the jobs for the remote database in the central monitoring system. Jobs that have been scheduled in the remote system are not displayed. In the DBA Planning Calendar of the DBA Cockpit where you call the Central Calendar, you have planned the action Central Calendar Log Collector to run regularly. This collects information from the defined remote systems for display in the Central Calendar. For more information, see Setting Up and Working with the DBA Planning Calendar [page 236].

Procedure
1. Start the Central Calendar by choosing Central Calendar on the System Landscape tab page of the DBA Cockpit. The Central Calendar is displayed. If you have already run or planned actions, you see entries by day, one for each system, which provide a summary of the scheduled jobs. The following is an example of entries for Thursday February, 08 affecting two systems, FUD and FIB: Example 3 4 FUD FIB 2 1

40

September 2011

2 Configuration and Management of the System Landscape

On system FUD for Thursday, February 8th, there were three actions planned, two of which had the highest status severity. For example, the highest status severity for FUD might be Finished with warning, in which case the entry for FUD is displayed with a yellow background. This means that two actions ended with a warning. On system FIB for the same day, there were four actions planned, one of which ended with the highest severity. For example, the highest severity for FIB might be Finished with error, in which case the entry for FIB is displayed with a red background. This means that one action ended with an error. The following table shows the color-coded statuses in the Central Calendar, which you can also see by choosing the Legend pushbutton: Color Light blue Dark blue Green Yellow Red Dark yellow Dark red End of the example. 2. For a summary of the actions for a day, click the relevant day header. A summary of the actions and the status for each system on the day you selected are displayed in the Details area, as in the following example: System Total FUD FIB 3 4 No longer available 1 3 Scheduled Running Finished Warning Error Overdue 2 1 Not yet available Planned Running Finished successfully Finished with warning Finished with error No longer available Scheduling failed Status

3. To obtain new statistics of the scheduled jobs for all systems, choose the Refresh in the Background pushbutton. 4. In the Schedule Refresh dialog box, you can choose between the following options: Option Run in Dialog Start Immediately in the Description Refresh runs in dialog mode, which can take a long time. Therefore, we usually do not recommend this option. Refresh runs immediately as a background job

September 2011

41

2 Configuration and Management of the System Landscape

Option Background Schedule on <date> at <time> 5. Recommendation

Description

Refresh runs in the background on the date and at the time that you specify

6. We recommend that you schedule the action Central Calendar Log Collector to run regularly as described above in Prerequisites. 7. End of the recommendation. 8. To refresh the display with the newly gathered statistics of the previous step, choose the Refresh pushbutton. 9. Optional step: In the Selection area, you can customize the calendar display as follows: o o Specify dates or time periods to be displayed Specify a factory calendar Holidays are displayed in the same background color as weekend days. This does not restrict the planning of actions in the DBA Planning Calendar.

42

September 2011

3 Special Tools in the Favorites List

3 Special Tools in the Favorites List


The Favorites list provides easy access to important tools and actions. By default, the Favorites list contains the following links that cannot be removed: EXPLAIN Access Plan SQL Command Line Index Advisor Schedule an Action You can extend the Favorites list, that is, add and organize favorites by choosing Personalize Add Favorite or Personalize Organize Favorite in the common header area.

3.1 The EXPLAIN Function


As of SAP Enhancement Package 1 for SAP NetWeaver 7.0, you can use the EXPLAIN function either on the Web browser-based user interface or on the SAP GUI-based user interface of the DBA Cockpit.

3.1.1 The EXPLAIN Function (Web Browser-Based Version)


You can use the Web browser-based EXPLAIN to review the access plans of all SELECT, INSERT, UPDATE, or DELETE statements. You can access the Web browser-based version of the EXPLAIN function as follows: In the navigation frame of the SAP GUI-based user interface of the DBA Cockpit, choose Diagnostics EXPLAIN (New Version) . A Web browser opens and displays the screen EXPLAIN Access Plan. Enter an SQL statement and choose the EXPLAIN pushbutton. In the Favorites list of the Web browser-based user interface, choose Explain Access Plan. In the database-specific area of the Web browser-based user interface, choose Performance Snapshots Applications . Double-click an application and choose the Statement Text tab page. If a statement is displayed, choose the EXPLAIN pushbutton to display the access plan. For more information, see Application Details: Statement Text [page 335]. In the database-specific area of the Web browser-based user interface, choose Performance Snapshots SQL Cache . Select a statement from the list and choose the EXPLAIN pushbutton. For more information, see Snapshots: SQL Cache [page 102].

September 2011

43

3 Special Tools in the Favorites List

Note The statements might contain optional comments such as --OPTLEVEL( <optlevel> ) -QUERY_DEGREE(< query_degree> --LOCATION( <report> , <position> ). If no comments are specified, the statements are explained using the default <optlevel> and the default <query_degree> for the work process. End of the note. If a statement was explained successfully, information about the SQL statement text is provided on the following tab pages: Tab Page Original Statement Optimized Statement Access Plan Description Displays the original SQL statement

Displays the SQL statement that was rewritten by the DB2 optimizer Displays the access plan that was generated by the DB2 optimizer Displays the output of the EXPLAIN snapshot

EXPLAIN Snapshot

Note The EXPLAIN Snapshot tab page is only available if the monitored database is DB2 V9.5 for Linux, UNIX, and Windows or higher. End of the note.

Using the Access Plan


The access plan shows all database operations that are performed when the statement is executed. It is displayed as a graphical tree, and each node in the tree represents an operator of the access plan. You can do the following: Display or hide details of an operator by choosing the Open Node or Close Node icon on the respective node Expand or collapse subtrees by choosing the Show Child Node icon or the Hide Child Node icon respectively View operation details by double-clicking an operator in the graphical tree Global details about an operator are displayed on the following tab pages: o General Displays global details about the access plan o Operator <Name of operator> Displays details for the selected operator

44

September 2011

3 Special Tools in the Favorites List

Catalog Information (Optional) Displays details for the respective catalog object of the selected operator

Predicates (Optional) Displays filter predicates for the selected operator

Search for operators in a complex statement by choosing the Find pushbutton Open an extra navigation window for complex access plans by choosing the Navigate pushbutton Print the graphic by choosing the Print pushbutton Configure the graphic before you print it by choosing theStandard Graph or Detailed Graph pushbutton Display or hide all operators by choosing Collapse or Expand Display global details about the access plan by choosing theToggle pushbutton Display information about the JNet version used (can be required by SAP Support) by choosing the About pushbutton Note For each index used in the access plan, the number of key columns that were really used within the access plan is displayed. In the appropriate tool tip, the used index field names are also displayed. Volatile tables and indexes of volatile tables are marked with an extra volatile label. To change and re-explain the SQL statement, choose Edit Statement. End of the note.

Changing the DB2 Optimizer Configuration


If you want to change the DB2 optimizer parameters, choose the Optimizer pushbutton. With this function, you can temporarily change the OPTIMIZER LEVEL, the QUERY DEGREE, and the VOLATILE flag for all tables referred to in the query. In addition, DB2 experts are able to specify optimization guidelines.

User Interface Settings


If you want to change the user interface of the Web browser-based user interface, choose the Settings pushbutton.

September 2011

45

3 Special Tools in the Favorites List

3.1.2 The EXPLAIN Function (SAP GUI-Based Version)


You can use this function to explain all SELECT, INSERT, UPDATE, or DELETE statements. The statements might contain optional comments such as --OPTLEVEL( <optlevel> ) -QUERY_DEGREE(< query_degree> --LOCATION( <report> , <position> ). If no comments are specified, the statements are explained using the default <optlevel> and default <query_degree> for the work process.

Accessing the EXPLAIN


You can call the EXPLAIN function in the following ways: Call the DBA Cockpit and choose Diagnostics EXPLAIN in the navigation frame of the DBA Cockpit. On the Diagnostics: EXPLAIN screen, enter an SQL statement manually and choose Explain. Call the DBA Cockpit and choose Performance of the DBA Cockpit. Call the DBA Cockpit and choose Performance of the DBA Cockpit. Call the DBA Cockpit and choose Diagnostics navigation frame of the DBA Cockpit. Applications in the navigation frame SQL Cache in the navigation frame Cumulative SQL Trace in the

Call transaction ST05 and choose Enter SQL statement. Enter an SQL statement manually and choose Explain. If a statement cannot be explained, the ERROR: Check SQL Statement screen appears providing a detailed error message and the possibility to modify the statement. To continue, choose Explain Again. Call transaction ST05 and choose Trace list. Select one statement and choose Explain.

Displaying the Access Plan of a Statement


If a statement was explained successfully, the Display Execution Plan for SQL Statement screen appears, providing information on the SQL statement text, the OPTLEVEL and QUERY_DEGREE that was used to explain this statement, and the access plan. The access plan generated by the DB2 optimizer is displayed as a tree structure. It consists of all database operations that will be performed when the statement is executed. The estimated execution time is displayed in timerons (arbitrary IBM time unit). All operators are numbered, starting with zero. Operators can have the following extensions: Extension [O]/[I] (<Partition>) Description Shows whether the operator acts as an outer/inner input branch for a subsequent join operation Shows on which partition this operation was performed This is only displayed if you are using a multi-partition database. Non-volatile tables and indexes of non-volatile tables are displayed in blue. Volatile tables and indexes of volatile tables are displayed in orange. For each index used in the access plan, the number of key columns, that is, index fields that were really used within the access plan, are displayed.

46

September 2011

3 Special Tools in the Favorites List

For further analysis of the displayed information, you can choose from various options in the application tool bar. For more information, see EXPLAIN Options [Page 47].

More Information
For additional information about the EXPLAIN function, see SAP Note 400938. For more general information, see the IBM documentation: Administration Guide: Chapter 26, SQL Explain Facility.

3.1.2.1 EXPLAIN Options


On the Display Execution Plan for SQL Statement screen, the following options are available: Option Details Description If no operator in the access plan is highlighted when choosing this option, a dialog box is displayed providing detailed information on the statement and each operator. This output is similar to the one of the DB2 command line tool db2exfmt. For more information, see the IBM documentation Administration Guide, Appendix I. If operator no. 0 is highlighted, only the original statement and optimized statement are displayed in a separate dialog box. If any other operator is highlighted, the system displays detailed information on the selected operator only. Optimizer The access plan may vary depending on the optimizer parameters specified. When you choose this button, the Change Query Optimization dialog box appears where you can change the parameters OPTIMIZER LEVEL, QUERY DEGREE and the flag VOLATILE for the tables used in the access plan. To explain the statement with new parameters, choose the Explain Again pushbutton. With this option, you can display system catalog information on tables and indexes that are shown in the access plan. The following information is displayed: For a table: Selected information from table SYSCAT.TABLES is displayed. Additionally, all indexes of the table are displayed with their index columns. For an index: Selected information from table SYSCAT.INDEXES for this index is displayed. Additionally, selected information from table SYSCAT.COLUMNS is displayed for all index columns. Depending on whether you have selected a table or an index, the following pushbuttons are available: Table Displays selected information from table SYSCAT.TABLES

DB Catalog

September 2011

47

3 Special Tools in the Favorites List

Additionally, all indexes of the table are displayed with their index columns. Columns Displays selected information from table SYSCAT.COLUMNS for all table columns Indexes Displays information from table SYSCAT.INDEXES for all indexes of the table as well as information from table SYSCAT.COLUMNS for all index columns Update Statistics Updates the catalog statistics for the table If the catalog statistics were updated successfully, the field <stats-time> is displayed in green. Dictionary With this option, you can display the ABAP Dictionary structure (definition) of a table by selecting the table in the access plan. If you do not select a table in the access plan, the ABAP Dictionary structure (definition) of the first dictionary object of the SQL statement is displayed. With this option, you can display the structure of views, even though views never appear in the access plan.

This function is not available for systems monitored using a remote database connection. Test Execution This option is only available, if a: SELECT statement is explained using transaction ST05 Trace list, the parameter values for all parameter markers of the statement are provided and the operation is other than PREPARE SELECT statement without parameter markers is explained When you use the EXPLAIN function, the entered SQL statement is only prepared and the access plan of the optimizer is chosen because of the system catalog statistics. On the basis of this information the optimizer estimates the costs for the execution of this statement. However, the estimated costs may not correspond to the real execution time. Reasons for this might be bad statistics, a bad database layout or problems of the optimizer itself. The Test Execution option measures the real execution time and provides other snapshot data, such as the number of buffer pool accesses and sorts for the selected statement. When the statement is executed, the parameter markers are replaced by the actual parameter values. A dialog box appears where you can change these values to investigate the dependence of the execution time from these values.

48

September 2011

3 Special Tools in the Favorites List

The result of several test executions of the same statement can vary because, for example, the buffer pool may already contain data that is necessary for the execution.

This function is not available for systems monitored using a remote database connection. Tree Info The following additional information is displayed or hidden: num_rows Estimated number of rows (result set) tot_cost Estimated total cost for this statement i/o_cost Estimated I/O cost of the statement This information is also included in the output information when you choose Details. Edit When choosing this option, the system switches to an editor window in which you can modify the selected SQL statement and explain it again. This option is only available when the statement contains a LOCATION comment, for example, when you call EXPLAIN using transaction ST05 Trace list. The location of the statement in the ABAP source code is displayed in a separate window.

Source

This function is only available for the local system or ABAP systems for which an additional RFC destination has been assigned.

The Collect function is no longer available. To collect EXPLAIN data, use the db2support command line tool.

September 2011

49

3 Special Tools in the Favorites List

3.2 SQL Command Line


This screen provides a virtual DB2 command line processor. You can access the SQL Command Line screen by calling the DBA Cockpit and choosing SQL Command Line in the Favorites list of the DBA Cockpit. The SQL Command Line screen appears in a separate Web browser. If you enter any SQL command, the output is returned by the DB2 command line processor. You can also execute CLP commands that are supported by the ADMIN_CMD stored procedure. The data is displayed in the same way as the corresponding CLP commands.

3.3 The Index Advisor


To improve the performance of queries, you can retrieve recommendations about useful indexes using the index advisor. In addition, you are able to design new virtual indexes that can be validated before they are actually created. You can access the index advisor using one of the following user interfaces: Web browser-based interface In your Favorites list, choose Index Advisor. The application starts in a separate Web browser. SAP GUI-based user interface In the navigation frame of the DBA Cockpit, choose Diagnostics . The Index Advisor starts in a separate Web browser. Index Advisor

Activities
You use the index advisor to perform one of the following actions: To evaluate the SQL statements in the dynamic SQL cache by receiving recommendations for potential new indexes that might improve the overall system performance Based on the current content of the dynamic SQL cache, the DB2 Design Advisor determines and recommends new indexes that might improve the overall system performance. For more information, see Retrieving Index Recommendations for the Dynamic SQL Cache [page 51]. To determine and recommend new virtual indexes for a single SQL statement On the basis of a given SQL statement, the DB2 Design Advisor determines and recommends new indexes that might improve the performance of the query. For more information, see Retrieving Index Recommendations for a Single SQL Statement [page 53].

50

September 2011

3 Special Tools in the Favorites List

To create user-defined virtual indexes If you are not satisfied with the recommendations of the DB2 Design Advisor, you create a virtual index specifically tailored to your requirements. For more information, see Defining Virtual User-Defined Indexes [page 56]. To include the indexes in the EXPLAIN function when explaining a query You can check, for example, if the virtually defined indexes would improve the performance of a query. For more information, see Validating Indexes Using the EXPLAIN Function [page 58].

3.3.1 Retrieving Index Recommendations for the Dynamic SQL Cache


Note This application is only available on the Web browser-based user interface. End of the note. 1. On the Index Advisor screen, choose the SQL Cache radio button in the Advisor Mode area. 2. Choose the Recommend Indexes pushbutton. A background job starts. The DB2 Design Advisor analyses the current content of the dynamic SQL cache and the background job returns the results as soon as the DB2 Design Advisor has finished its analysis. The user interface remains in read-only mode while the analysis is still running. To check for results, you can either choose the Update pushbutton or wait until it is automatically checked for results every 60 seconds. The results are displayed in the following table: Column Index Name Name of the index o Existing (not-used) Index exists in the system catalog, but for the investigated SQL query it is not identified as usable by the DB2 optimizer. o Type Recommended Index is recommended by the DB2 Design Advisor. Recommended indexes that do not exist are candidates for new indexes to be created. Note Indexes are displayed with the following background colors: Green Description

September 2011

51

3 Special Tools in the Favorites List

Column

Description Recommended index that already exists and that the DB2 optimizer would use White Existing index that is, however, not appropriate for the respective SQL statement Red Recommended index that does not yet exist End of the note. o Yes Index exists in the database.

Exists o No Index is a virtual index. Table Name Table on which the index is defined Schema Name of the index schema Specifies a unique rule: o Uniqueness o o NLEAF NLEVELS Unique Duplicates Allowed Primary Key

Number of leaf pages Number of index levels o Yes Index supports reverse scans.

Rev. Scans o No Index does not support reverse scans. Columns INCLUDEs Column Names Number of columns in the key plus the number of included columns if there have been any defined Number of included columns List of column names

52

September 2011

3 Special Tools in the Favorites List

3. To retrieve more information about which SQL statement would benefit from the recommended indexes, select an index from the list. The details are displayed in the following table in the content detail area: Column SQL Statement Frequency Cost Saving Cost Before Cost After Description Name of the SQL statement that is in the dynamic package cache and that would benefit from the index Number of times the statement has been executed since it has entered the dynamic SQL cache Estimated cost savings in percent after the index was created Estimated SQL cost in timerons before the index was created Estimated SQL cost in timerons after the index was created

You can find the complete output of the DB2 design on the Advisor Output tab page. The complete output also includes the estimated space requirements of each recommended index. Note If you do not want to display unused indexes, you can set a filter on the table accordingly. End of the note.

3.3.2 Retrieving Index Recommendations for a Single SQL Statement


1. On the Index Advisor screen, enter the SQL statement that you want to investigate in the SQL Statement editor field. Note In the Web browser-based user interface, you first have to choose the Single Statement radio button. Otherwise, the editor field where you can enter the SQL statement does not become available. End of the note. 2. Choose the Recommend Indexes pushbutton. The DB2 Design Advisor evaluates existing indexes on the affected tables. If the DB2 Design Advisor cannot find an appropriate index in the system catalog, the tool recommends one or more indexes that might improve the performance of the query.

September 2011

53

3 Special Tools in the Favorites List

The results are displayed in the following table: Column Index Name Name of the index o Existing (not-used) Index exists in the system catalog, but for the investigated SQL query it is not identified as usable by the DB2 optimizer. o User-Defined Index has been virtually defined by the user to determine whether such an index could be used to improve the query performance. Those indexes do not exist in the system catalog. o Recommended Index is recommended by the DB2 Design Advisor. Recommended indexes that do not exist are candidates for new indexes to be created. Type Note Indexes are displayed with the following background colors: Green Recommended index that already exists and that the DB2 optimizer would use White Existing index that is, however, not appropriate for the respective SQL statement Red Recommended index that does not yet exist End of the note. o Exists o No Index is a virtual index. Table Name Table on which the index is defined Schema Name of the index schema Yes Index exists in the database. Description

Uniqueness Specifies a unique rule:

54

September 2011

3 Special Tools in the Favorites List

Column o o o NLEAF NLEVELS Primary Key Unique

Description

Duplicates Allowed

Number of leaf pages Number of index levels o Yes Index supports reverse scans.

Rev. Scans o No Index does not support reverse scans. Columns INCLUDEs Column Names Note If you do not want to display indexes that are not used, you can set a filter on the table accordingly. End of the note. Number of columns in the key plus the number of included columns if there have been any defined Number of included columns List of column names

September 2011

55

3 Special Tools in the Favorites List

3.3.3 Defining Virtual User-Defined Indexes


Caution If you are using the Web Browser-based user interface, you can perform the following steps only if the Single Statement radio button is selected in the Advisor Mode area of the Index Advisor screen. End of the caution. If the index recommendations provided by the DB2 Design Advisor do not meet your requirements, you can also define virtual user-defined indexes. In addition, you can validate their use by calling the EXPLAIN function.

Prerequisites
You have already retrieved index recommendations for a single SQL statement [page 53].

Procedure
In the Index Advisor screen, choose Add Virtual Index. Depending on your user interface, perform the following steps:

SAP GUI-Based User Interface


1. In the Define Virtual Index dialog box, enter the schema and the table on which you want to define the virtual index. 2. Choose the Load Table Columns pushbutton. The column names of the appropriate table are displayed in the Table Columns field. 3. To define index columns, either choose the Add Column to Index or the Remove Column From Index pushbutton. 4. If you want the virtual index to be unique, select the Unique checkbox. Note By default, all new virtual indexes are created with the Allow Reverse Scans option on database level. However, in the ABAP Dictionary, you cannot define this option for new virtual indexes. End of the note. 5. To continue, choose the Add pushbutton. The new user-defined virtual index is added to the list of indexes.

56

September 2011

3 Special Tools in the Favorites List

Web Browser-Based User Interface


1. In the Diagnostics: Index Advisor dialog box, enter the schema and the table on which you want to define the virtual index. 2. If you want the virtual index to be unique, select the Unique checkbox. Note By default, all new virtual indexes are created with the Allow Reverse Scans option on database level. However, in the ABAP Dictionary, you cannot define this option for new virtual indexes. End of the note. 3. Choose the Index Columns pushbutton. The column names of the appropriate table are displayed in the Table Columns field. 4. To define index columns, either choose the Add Column to Index or the Remove Column from Index pushbutton. 5. To continue, choose the Add Virtual Index pushbutton. The new user-defined virtual index is added to the list of indexes. Note User-defined indexes are always displayed with a red background color because they do not really exist like the recommended indexes. If you want to remove all user-defined indexes, choose the Remove User-Defined Indexes pushbutton. End of the note.

Result
You can now use the EXPLAIN function to validate existing, recommended, and newly created user-defined indexes as described in the following section.

September 2011

57

3 Special Tools in the Favorites List

3.3.4 Validating Indexes Using the EXPLAIN Function


On the Index Advisor screen, choose EXPLAIN and one of the following options from the dropdown list: Only existing indexes This option corresponds to the normal EXPLAIN function that is known from the SQL cache. Only indexes that are known from the system catalog are used to build the access plan. Existing and recommended indexes Indexes that are known from the system catalog and indexes that are recommended by DB2 are used to build the access plan. Existing, recommended, and user-defined indexes Indexes that are known from the system catalog and all virtual indexes (recommended and user-defined) are used to build the access plan.

Result
A new dialog window or Web browser appears displaying the access plan that the DB2 optimizer considers to be the most efficient one.

3.3.5 Creating Indexes in the ABAP Dictionary


Note This function is not available for systems that are monitored using a remote database connection. End of the note. You use the following procedure to create an index in the ABAP Dictionary that has been virtually defined before but does not yet exist. Recommendation Additional indexes require additional space and need to be maintained when data is updated or inserted in a table. We recommend that you only create additional indexes if they really can improve the performance of queries that put a heavy load on your database. End of the recommendation.

Procedure
1. On the Index Advisor screen, choose an index (user-defined or recommended) that does not yet exist. 2. Choose the Create Index in ABAP Dictionary pushbutton (that is located next to the Index Name column). The Create Index in ABAP Dictionary dialog box appears.

58

September 2011

3 Special Tools in the Favorites List

3. Enter a description for the index and choose Create. The index is created in the ABAP Dictionary. After the index has successfully been created, you can decide if you want to schedule a RUNSTATS for the affected table. Note If the index to be created is extending an existing unique index (including primary keys) with one or more INCLUDE columns, you have to replace the existing index with a new index instead of creating a new one. In this case, the Replace Existing Unique Index dialog box appears instead of the Create Index in ABAP Dictionary dialog box. If you replace the existing index, the system replaces the index only on database level. This means that no changes are applied to the ABAP Dictionary. The replacement is automatically scheduled as an SQL script in the DBA Planning Calendar. End of the note.

September 2011

59

4 Performance

4 Performance
The following sections provide information about the main task areas that are available under Performance on the Database tab page of the DBA Cockpit: Performance Warehouse Time Spent Analysis Workload Statistics Top SQL Statement Analysis Snapshots Critical Activities Utilities History

4.1 Performance: Performance Warehouse


You can analyze performance data of your database system using the Performance Warehouse. To access the Performance Warehouse, call the DBA Cockpit and choose Performance Performance Warehouse . The following content areas are available in the Performance Warehouse: Reporting By default, the Reporting content area is displayed. Configuration

Prerequisites
An SAP Solution Manager system with Solution Manager Diagnostics (SMD) enabled is required.

Integration
The Performance Warehouse is part of the DBA Cockpit.

Features
In the Performance Warehouse, all relevant performance indicators that are collected by the DBA Cockpit are stored in an SAP NetWeaver Business Warehouse system. This SAP NetWeaver BW system is used by the Solution Manager Diagnostics (SMD) back-end of an SAP Solution Manager system. SMD already uses this SAP NetWeaver BW to store workload data of SAP applications. To configure the extraction of data into the SMD BI, you use the SMD Setup Wizard. Based on this architecture, the DBA Cockpit uses SAP NetWeaver BW technology to provide reports for performance analysis, which you can customize according to your needs. All collected data has a time dimension, so you can analyze the database performance for any point in time or over a specified time frame.

60

September 2011

4 Performance

Almost all reports are displayed as a chart to visualize the key performance indicators (KPIs). In addition, there is also a detailed table view. To navigate within these reports, you can use the SAP NetWeaver BW drilldown feature. Violations to performance thresholds are highlighted based on predefined BW exceptions to make you immediately aware of performance issues. By default, the Performance Warehouse is delivered with predefined content that you can use to create your own reports according to your needs.

More Information
Performance Warehouse: Reporting Performance Warehouse: Configuration

4.1.1 Performance Warehouse: Reporting


You use the data provided on the Reporting screen to analyze database performance problems in the present or the past. To access the Reporting screen of the Performance Warehouse, call the DBA Cockpit and choose Performance Performance Warehouse Reporting on the Database tab page of the DBA Cockpit.

Specifying the Time Frame


To display detailed reports, you first have to specify the time frame for which you want to analyze data by defining the following: Granularity You can choose between Minute, Hour, Day, or Month. Depending on your selection, the values for your time frame might change. Time Frame If you choose Custom Selection from the dropdown list, you can manually enter the starting and ending time for your analysis. To activate your custom selection, choose Apply Filter. For any other selection from the dropdown list, the reports are automatically refreshed. The reports are categorized and for each category there is one tab page. On every tab page, you find a button row for the reports. Every pushbutton in the button row represents a specific view on the database performance, for example, I/O, Prefetcher, Sort Heap, and so on.

Displaying a Report
To display a report, choose the appropriate view pushbutton on the respective tab page. Note The availability of the tab pages and of the pushbuttons on each tab page can vary depending on the selected system. Some reports are only available if special database features are enabled. End of the note.

September 2011

61

4 Performance

The reports consist of two sections: In the upper section, a chart is displayed to visualize the key performance indicators. The chart provides a subset of the key columns from the detail table view. Note The chart display is optional and not available for all views. End of the note. In the lower section, a detailed table view is available. You can drill down your reports by either using the context menu of a column header in the Detail: <Category View> screen area or by specifying the respective value using the pushbuttons in the Detail: Navigation screen area. Here, you can also add and remove columns or key figures, or you can set filters on columns. In addition, there are predefined exceptions (for example, Chart: Exceptions or Details: Exceptions) for almost all reports on key performance indicators. The used thresholds are based on Early Watch Alerts and each violation to these thresholds is displayed in red. Note If you want to reset a report to its initial state, choose Reset Report in the central system area. End of the note.

4.1.2 Performance Warehouse: Configuration


You configure all configuration parameters that are related to the performance warehouse on the Configuration screen. For example, you can configure the framework, the templates used for the reports and the report categories. The DBA Cockpit uses BI Business Explorer (BEx) Web templates to analyze the performance data that is stored in the Solution Manager Diagnostics (SMD) BI. You can create your own BI BEx Web templates based on this data and integrate new BI BEx Web templates into the performance warehouse. You can access the Configuration screen of the performance warehouse by calling the DBA Cockpit and choosing Performance -> Performance Warehouse Configuration . On the screen Performance Warehouse: Configuration, the following tab pages are available: Configuration Web Reports Report Categories

62

September 2011

4 Performance

Configuration
Here, you can view or modify the configuration parameters of the performance warehouse for the monitored system. To modify some of these parameters, use the Edit, Save, and Cancel pushbuttons in the toolbar. Depending on your database platform, the displayed selection of values can vary. The following parameters are displayed for all database platforms: Parameter BI Server Reporting Time Zone Note The Default checkbox is selected if the default value for your complete landscape is the same as the one specified for your system. End of the note. Description BI server where the database performance data is located The performance data time-stamps are converted to one global time zone for all reports in SMD BI.

Web Reports
Here, you can configure the display on the Reporting screen. That is, you can view and modify the integrated BI BEx Web templates in the tree table. To modify some of these parameters, use the Edit, Add, and Delete pushbuttons in the toolbar. The main report categories appear and for each report category, you can view or modify the views by expanding the appropriate report category. These views appear as pushbuttons on the respective category tab page on the Reporting screen. To change the sequence within a category, use the Up or Down pushbuttons. To display details about a view, simply select it in the table. The following parameters are displayed in the Details for Web Reports area below the table view: Parameter Description Specifies the name of the report Report This text appears on the view pushbutton on a category tab page. Detailed description for the report Description This text appears as a tooltip for the pushbutton of the key indicator on a category tab page. Specifies the report category Category Each category is represented on a separate tab page. Web Report (Default) Technical name of the BI BEx Web templates

September 2011

63

4 Performance

Parameter

Description

Web Report (Day) Technical name of the BI BEx Web templates for granularity Day Web Report (Month) Technical name of the BI BEx Web templates for granularity Month Specifies the data provider of the BI BEx Web templates with a time dimension The drilldown of the time dimension is changed according to the selected granularity. If selected, the report is available for performance analysis. If selected, the report is executed as soon as the tab page is selected. Name of database platform Minimum database release for this report Maximum database release for this report

Data Providers (Time)

Active Default Database Release (min) Release (max) Note

Depending on your database platform, there might be more checkboxes available for database-specific features. If you select these checkboxes, the report is only displayed if the specific database features have been set up in the monitored database system. End of the note.

Report Categories
Here, you can view and modify the categories for BI BEx Web templates of the reports that are displayed the Reporting screen. To modify some of these parameters, use the Edit, Add, and Delete pushbuttons in the toolbar. To change the sequence of the categories on the Reporting screen, use the Up or Down pushbuttons. The following parameters are displayed: Parameter Category Description Name of the category Detailed description for the category Description

64

September 2011

4 Performance

4.2 Performance: Time Spent Analysis


Note The Time Spent Analysis screen is only available if the monitored database is at least DB2 V9.7. End of the note. You can use the Time Spent Analysis screen as the starting point for performance tuning and to identify time-based problems of your database. The Time Spent Analysis screen provides an aggregated and timeline-based view of the current or past performance situation of your database. The advantage of time spent monitoring is that you do not only have to rely on standard database key performance indicators (such as the buffer pool hit-ratio) but you can also identify how much time is really spent on different kinds of database operations. You can use time spent monitoring to answer questions such as the following: How do changes in system performance relate to changes in the total time spent in various DB2 components or wait situations? Where is most of the time spent in DB2 so that these areas can be tuned? What are the most active service classes and members on the database system, and are there any outliers? To access the Time Spent Analysis screen, call the DBA Cockpit and choose Time Spent Analysis on the Database tab page of the DBA Cockpit. The Time Spent Analysis screen is divided into the following areas: Selection area Chart view Time Spent in DB2 by <drill-down criteria> Performance

Specifying Filter and Drill-Down Criteria


In the Selection area, you can specify filter and drill-down criteria for the data to be displayed as follows: Field Description From the dropdown list, you can choose the source of the data to be analyzed: Periodic Data Collection If you choose this option, the data that has already been collected by the data collector WLM Statistics is used for the time spent analysis. Source For more information, see Data Collection Framework: Collector Configuration [page 227]. Note The granularity of the data analysis can only be as high as specified in the collection interval.

September 2011

65

4 Performance

Field End of the note. Ad-hoc Data

Description

If you choose this option, real-time monitoring data is collected. This means that specific workload situations can be analyzed in real-time. To set a time interval for the data collection and the charts to be refreshed, choose an interval from the Refresh Interval dropdown list. To start the ad-hoc data collection, choose the Resume pushbutton. If you want to change the drill-down or filter criteria, you must first stop the current Ad hoc data collection by choosing the Pause pushbutton. Time Frame You specify the time interval and time frame for which you want data to be analyzed. Aggregate If you choose the Aggregate option from the dropdown list, a pie chart is displayed according to your selected filter and drill-down criteria. Type of Display Timeline If you choose the Timeline option from the dropdown list, the monitoring data is displayed in a histogram according to your filter and drill-down criteria. You can condense the granularity of the time interval from As Collected to Hour, Day, Week, or Month. Note You can only filter by members if you are using a distributed database system. Members End of the note. From the dropdown list, you can choose the database member on which you want to apply the specific workload filter. You can choose all or single members. If you want to combine multiple members into a group (for example, by physical host), you can use the Advanced Selection option. From the dropdown list, you can choose the service classes that have been set up on the system. You can choose all or single service classes. If you want to combine multiple service classes into a group, choose Advanced Selection from the dropdown list.

Service Class(es)

66

September 2011

4 Performance

From the dropdown list, you can choose between the following time-related WLM metrics: All All known time-related metrics are included. All (Wait Times) All wait time metrics are selected (W) All (Processing Times) All processing times without wait times are selected (P). Single metrics, for example, (P) Commit Processing Time or (W) Buffer Pool Read Time For more information, see Monitoring metrics for DB2 workload manager in the IBM Information Center. Advanced Selection When you choose this option, all metrics including their parent metrics are displayed. You can now select those metrics that are relevant for your analysis. For example, you select all REORG and RUNSTATS processing times to drill down to specific members or member groups. If you choose the Choose Level of Detail link, you can specify one of the following options in the Metrics Hierarchy dialog box: Total Request Time Only Aggregates all metrics Wait vs. Processing vs. Unknown Times Aggregates metric groups Detailed Wait and Processing Time Includes only detailed wait and processing times Full Details Includes all time metrics (default) Note The metrics are mutually exclusive and are independent of each other. Since all metric metadata is retrieved dynamically from the database, the availability of specific metrics as filter criteria depends on the database release. End of the note.

Metric(s)

September 2011

67

4 Performance

You can drill down into the display by choosing one of the following options from the dropdown list: Members All results are distributed across the different members based on the specified filter criteria. Note You can only drill down by members if you are using a distributed database system. End of the note. Metrics All results are displayed according to the different time-based monitoring metric occurrences and their relative values as a percentage of the total request time. Service Classes Based on the specified filter criteria, all results are distributed across the service classes according to their occurrence and their relative percentage to the total request time. To avoid the chart becoming overloaded and unclear, the Reduce Display to Most Significant checkbox is by default selected. All metrics, members, and service classes with insignificantly small values are cumulated to give the value of Other Known Times. Note Make sure that drill-down and filter criteria are not the same, that is, do not use, for example, non-aggregated single metrics combined with the option to drill down by metrics. End of the note.

Drill-Down

The Chart View


After applying your filter and drill-down criteria in the Selection area, the relevant time spent analysis chart is generated. Depending on the specified display type, either a pie chart or timeline histogram is displayed: Pie chart The pie chart is the initial view of any time spent analysis. All occurrences of metrics or service classes are displayed as well as their relative values as a percentage of the total time consumption of the monitored system. This view shows the aggregated results of the drill-down dimension for the specified time frame. The results are displayed clockwise in descending order.

68

September 2011

4 Performance

Timeline histogram The timeline-based chart lets you analyze changes in workload performance for a given time frame. This chart type displays the cumulated occurrences of selected time-based metrics, members, or service classes into a histogram that consists of bars that are aligned to the timeline. The histogram bars are divided according to the time granularity you have specified in the Selection area.

Displaying Details and Analyzing the Charts


The analysis of a single pie chart or histogram item can vary due to the drill-down criteria you have specified (that is, metric vs. member or service class). To analyze a single item of a chart, click the item or caption. The relevant details appear in the <metric> Summary area displaying all values and occurrences for the selected time frame or time interval as follows: Percentage of the total time related to the occurrence in the specified time interval or time frame Processing times, nominal and worst values per service class or member Total occurrences for the total time frame or the selected time interval Line graphs of the absolute and average values In the See Also area, you can use links such as the following to directly navigate into areas of the DBA Cockpit that might help you analyze the problem: Configuration Changes Workload Statistics Threshold Violations Previous filter and drill-down criteria are kept if possible.

Customizing the Charts


You can change the chart type from Stacked Columns to Stacked Area or Lines by choosing the Chart Type menu button. To specify whether you want the data to be displayed in absolute or percentage values, you can use the Values menu button. If you choose the Percentage option, the values are displayed in relation to the total request time per time frame or per time interval. By choosing the Chart Size menu button, you can specify the width and height of the chart to be displayed. Optionally, you can open a detailed table view by choosing the Toggle Table Display pushbutton.

September 2011

69

4 Performance

Example Scenarios Example 1


To analyze and identify I/O-related workload on the database, perform the following steps: 1. Set the Metric(s) filter to Advanced Selection and select Direct Read Time, Direct Write Time, BP Read Time, and BP Write Time. 2. As Type of Display, choose Timeline. 3. As Drill-Down option, choose Service Classes. 4. After applying your selection, you can identify time consumption peaks in the displayed charts. To identify the responsible workloads for those peak values, pay special attention to the nominal total time per service class versus the worst service class in the Summary area.

Example 2
To identify the reason for a general system slowdown, perform the following steps: 1. As Type of Display, choose Timeline, and as Drill-Down option, choose Metrics. 2. In the Members and Service Class(es) fields, choose All and apply your selection. 3. Identify the most significant time metrics in the displayed chart. 4. In the detailed Summary area of those metrics, check for outlier members or service classes to restrict the scope to a smaller group of members or service classes. 5. For a more detailed analysis of the system slowdown, keep your selection of members and service classes and navigate into other areas of the DBA Cockpit such as the following: o Performance Snapshots SQL Cache

Search for statements with high values for the identified metrics. o Diagnostics Lock-Wait Events

Analyze lock-wait situations or a switch in data collection. o Performance Workload Statistics

Analyze statistical metrics for the identified members or service classes. o Configuration Workload Management Workloads and Service Classes

Check the priority settings of the involved workloads.

More Information
Monitoring metrics for DB2 workload manager in the IBM Information Center at: https://publib.boulder.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=/com.ibm.db2.luw.admi n.wlm.doc/doc/c0055265.html

70

September 2011

4 Performance

4.3 Performance: Workload Statistics


You can access information about workload statistics by calling the DBA Cockpit and choosing Performance Workload Statistics on the Database tab page of the DBA Cockpit. Note This screen is only available if the currently monitored database version is at least DB2 V9.5. End of the note. On the Workload Statistics screen, basic statistics are displayed that describe the overall behavior of the database system. This information helps you to: Understand the type of a system slowdown. For example, most of the queries are running slower versus only certain queries are running slower. Monitor service level agreements (SLAs) Search for time frames, members, or service classes in which long-running queries are executed on the database system Define meaningful workload management thresholds using the high-water mark metrics In the Selection area, you can specify the appropriate time frame for which you want data to be displayed. Note In a distributed database system, you can also filter by members and service classes. End of the note. After having made your selection using the Apply Selection pushbutton, the Activity Lifetimes and Statistics tab pages are displayed.

Activity Lifetimes
The histograms that you can choose from the Histogram Type dropdown list give you a better understanding of your database workload. The following histogram types are available: Activity Execution Time Histogram Displays the history of the histogram for the execution times of all activities that were executed in the selected service classes and members for the selected time frame The execution time corresponds to the time an activity has spent executing on the coordinator partition. Execution time does not include the time spent during initialization, queuing, or between cursor operations.

September 2011

71

4 Performance

Activity Lifetime Histogram Displays the history of the histogram for the lifetimes of all activities that were executed in the selected service classes and members for the selected time frame The lifetime corresponds to the total elapse time of an activity, as measured on the coordinator partition. Lifetime does include the time spent during initialization, queuing, or between cursor operations. Activity Queue Time Histogram Displays the history of the histogram for the queue times of all activities that were executed in the selected service classes and members for the selected time frame The queue time corresponds to the time an activity has spend in a workload management (WLM) queue. The average execution, life, or queue time for all activities is displayed in a dotted line. The total number of activities that have completed, were rejected, or aborted by WLM in the selected time frame is displayed in an additional chart below the histogram chart. For more information about the histogram types and all other monitoring counters provided here, see the IBM DB2 Information Center for your database release at: http://www-01.ibm.com/support/docview.wss?rs=71&uid=swg27009474

Statistics
The Statistics tab page provides you with a range of high-watermark and average metrics that are separated by service class, member, and time. By default, the following information is displayed: Column Time from Time to Member Service Superclass Service Subclass Coord. Act. Lifetime Top Coord. Act. Lifetime Avg. UOW Total Time Top Description Begin of statistics interval timestamp End of statistics interval timestamp Member that has captured the statistics Name of the service superclass for which the statistics were captured Name of the service subclass for which the statistics were captured High-water mark in milliseconds for coordinator activity lifetime

Arithmetic mean of lifetime in milliseconds for coordinator activities High-water mark in milliseconds for unit of work lifetime

Act. Temp. Tablespace High-water mark in KB for the temporary tablespace usage of a Top single DML activity

72

September 2011

4 Performance

Column Agg. Temp. Tablespace Top Activity CPU Time Top

Description High-water mark in KB for the aggregate temporary tablespace usage across all DML activities High-water mark for processor time used by activities at all nesting levels, in milliseconds High-water mark for the number of rows read by activities on all nesting levels High-water mark for the number of rows returned by activities on all nesting levels

Rows Read Top

Rows Returned Top

For more Information about all available statistics, see the IBM DB2 Information Center for your database release at: http://www-01.ibm.com/support/docview.wss?rs=71&uid=swg27009474

4.4 Performance: Top SQL Statement Analysis


Note This screen is only available if the following applies: The currently monitored database is DB2 V9.7 or higher. The database configuration parameter MON_ACT_METRICS is set to a value other than NONE. End of the note. You can access the Top SQL Statement Analysis screen by calling the DBA Cockpit and choosing Performance Top SQL Statement Analysis on the Database tab page of the DBA Cockpit. The Top SQL Statement Analysis screen displays information about SQL statements that are executed very often or that are expensive with regard to specific metrics. This information helps you identify those SQL statements that consume a large number of resources. You can also determine whether fine-tuning of those statements is necessary to improve the performance of the database. Note The data for this screen is captured by the Package Cache data collector of the DCF. This data collector periodically dumps the most expensive SQL statements and their metrics into the history tables. To reduce the amount of data stored in the history tables, the data collector performs a top n analysis and only stores the data of those statements that are in the top n based on a variety of important metrics. The data provided on this screen, therefore, does not represent a 100% view of the SQL statements that are executed on the database server. End of the note.

September 2011

73

4 Performance

In the Selection area, you specify the appropriate time frame. The result is an aggregated view of the metrics for the SQL statements captured in the specified time frame. To limit the result set, you can specify ranking or filter criteria in the Selection area by either choosing the Top SQL Statements by or Custom radio button. If you choose the Top SQL Statements by option, you have to choose a ranking criterion from the relevant dropdown list. If you choose the Custom radio button, you can specify filter criteria in the relevant fields. In the Selection area, you can also define the maximum number of returned SQL statements. The default limit is 100 SQL statements. By default, static packages are not displayed as the SAP system uses dynamic SQL only. If you want to analyze static packages, you have to select the Display Static Packages checkbox. If you choose the Apply Selection pushbutton, the result set is determined according to your selection criteria. The following information is displayed: Column Statement Text Text of the SQL statement The first metric column is used for ranking as chosen in the Selection area from the Top SQL Statements by drop-down list. By default, Coord. Statement Exec. Time is used. No. of Coord. Executions Number of executions by coordinator agent Description

<ranking metric>

Avg. Coord. Average execution time in milliseconds for statement by coordinator agent Stmt. Exec. Time Total CPU Time Total CPU time in milliseconds Ratio of rows read from the base table compared to rows processed, which can be either rows returned to the application (SELECT statements) or rows written (UPDATE, INSERT, DELETE statements) A value of 1 indicates optimal access to the requested data. High values indicate statements with inefficient access. BP Gets / Rows Processed Average number of pages read from the buffer pool per rows processed, which can be either rows returned to the application (SELECT statements) or rows written (UPDATE, INSERT, DELETE statements)

Rows Read / Rows Processed

74

September 2011

4 Performance

Displaying Details About SQL Statements


To display detailed information about an SQL statement, select a line from the result list. The SQL Statement Details area appears displaying the following tab pages: SQL Statement Metrics Summary Metrics Details Access Plans Versions

SQL Statement
On the SQL Statement tab page, the complete SQL statement text is displayed. To show the current access plan of the statement, you can choose the EXPLAIN pushbutton. For more information, see The EXPLAIN Function [page 43]. To display the ABAP source code from where the SQL statement was executed, you can choose the Show Source pushbutton. Note The Show Source pushbutton is only available if the following applies: The SAP system on which the currently monitored database is running is an ABAP system. The SAP system has the minimum Support Package level as described in SAP Note 1493490. End of the note. In contrast to the analysis of the SQL cache, the compilation environment is not available at this level because you see an aggregation of metrics over a time frame that could have multiple compilations of the SQL statement. For more information about the SQL cache, see Snapshots: SQL Cache (DB2 V9.7 or higher only) [page 102].

Metrics Summary
The Metrics Summary tab page provides the chart view Time Spent in SQL Statement, which is an aggregated view of the time frame defined in the Selection area. In addition, detailed information about the following is displayed: Statement metadata Miscellaneous metrics Sorts Locking Logger Buffer pool Direct I/O

September 2011

75

4 Performance

Metrics Details
The Metrics Details tab page provides the selection of specific time slices. The detailed information displayed is a view of the specific time slice: Statement metadata Miscellaneous metrics Sorts Locking Logger Buffer pool Direct I/O

Access Plan Versions


The Access Plan Versions tab page provides an overview of the different access plans generated for the SQL statement in the history. The first number in the brackets represents the number of access plan versions in the selected time frame. The second number in the brackets is the number of access plan versions in the complete history. Note On this tab page, different compiled access plans to different points in time are displayed. The access plan version is a virtual version number that you use to distinguish the versions in the complete collected history. If an SQL statement is flushed from the package cache and is recompiled at a later point in time, a new access plan version is considered even if DB2 has generated exactly the same access plan. You can use the estimated query cost as an indicator for similar access plans. End of the note.

Displaying Details About Access Plan Versions


To display detailed information about an access plan, select a line from the list on the Access Plan Versions tab page. The Access Plan Details area appears displaying the following tab pages: SQL Statement Metrics Summary Metrics Details

76

September 2011

4 Performance

SQL Statement
On the SQL Statement tab page, the SQL statement text and the compilation environment are displayed. To show the access plan of the statement, you can choose the Historic EXPLAIN pushbutton. Historic here means that it shows the access plan captured when the access plan was generated. For more information, see The EXPLAIN Function. Note The Historic EXPLAIN is only available if the corresponding option Collect Section EXPLAIN is enabled for the DCF data collector Package Cache. In the SAP Default or SAP Detailed templates this option is not enabled. End of the note. The Compilation Environment area displays information, for example, about the following: Isolation Query optimization SQL rules Refresh age Resolution time stamp

Metrics Summary
The Metrics Summary tab page provides the chart view Time Spent in SQL Statement. It is an aggregated view over the timeframe defined in the selection area and the access plan version selected. In addition, detailed information about the following is displayed: Statement metadata Miscellaneous metrics Sorts Locking Logger Buffer pool Direct I/O

September 2011

77

4 Performance

Metrics Details
The Metrics Details tab page provides the selection of specific time slices for the access plan version. The detailed information displayed is a view of the specific time slice: Statement metadata Miscellaneous metrics Sorts Locking Logger Buffer pool Direct I/O

4.5 Performance: Snapshots


You can access data on performance snapshots by calling the DBA Cockpit and choosing Performance Snapshots <snapshot option> on the Database tab page of the DBA Cockpit. The following snapshot options are available: Database Schemas Buffer Pools Tablespaces Containers Tables Applications SQL Cache System Note The layout of these snapshot screens varies depending on the database version. End of the note.

Features
In the Snapshots task area, monitoring data in both unfiltered and raw format is provided by the various snapshots. Snapshot data is provided on different levels (for example, database, buffer pools, or SQL statements) and is collected by the database beginning from startup of the database instance until the current time. That is, data is accumulated over a long time

78

September 2011

4 Performance

period and, therefore, cannot reflect short-term decreases in performance or increasing or changing workloads over a certain time period. Furthermore, for the interpretation of snapshot data, it is necessary to refer to related configuration parameters. Configuration parameters, however, do not relate to a certain time frame either but only describe the current configuration of the database. Especially if your database is enabled for self-tuning memory management (STMM), there is no way of correlating bad performance data with current storage parameters. To overcome these problems, you can observe monitoring data over a certain time period by doing one of the following: You can explicitly set a starting point for measurements using the Reset and Since Reset pushbuttons that are available for most snapshot options. As a result, a set of monitoring data is displayed that is related to the time frame defined by the reset operation. In parallel, you can check related configuration parameters for changes by choosing Configuration Configuration History on the Database tab page of the DBA Cockpit. If the relevant snapshot option supports the evaluation of snapshot data that is periodically collected by the data collection framework (DCF), you can specify any time interval for analysis as long as the relevant data is kept in the DCF history. Since the displayed configuration data is also retrieved from the DCF, there is a consistent, time-related view of both the snapshot and the configuration. This applies to the following snapshot options: o o o o o o o Database Buffer Pools Tablespaces Containers Tables SQL Cache System

September 2011

79

4 Performance

4.5.1 Snapshots: Database


You can access the database snapshot by calling the DBA Cockpit and choosing Performance Snapshots Database on the Database tab page of the DBA Cockpit. Depending on the setup of your DBA Cockpit, one of the following snapshots is displayed on the Database screen: Enhanced database snapshot with support of the data collection framework (DCF) Database snapshot without DCF support For more information about the DCF, see Enabling the Database for the Data Collection Framework [page 32].

Enhanced Database Snapshot with DCF Support


To analyze system performance, it is not sufficient to review the key figures provided by the database from startup until the current time. This data has been cumulated over a long time period and, therefore, cannot reflect a short-term degradation of performance or an increasing or changing workload. In addition, the interpretation of snapshot data mostly depends on configuration parameters that do not relate to a certain time frame either but describe only the current configuration of the database. Especially, if your database is using self-tuning memory management (STMM), you cannot correlate bad performance data with current storage parameters. In contrast to the Database snapshot option without DCF support, the database snapshot with DCF support not only lets you view current global database snapshot data but also monitor data that is periodically collected by the DCF. Note To monitor data on the Database screen, you have to make sure that the DCF is set up correctly. If the DCF is not available or wrongly set up, an appropriate warning is displayed including a link to the Collector Configuration screen where you can perform the required steps. For more information, see Data Collection Framework: Collector Configuration [page 227]. End of the note.

Features
The Database screen provides the following: A selection area where you specify filter criteria for the monitoring data (only available in a distributed database) An overview table displaying the retrieved monitoring data with the most important key figures that have been aggregated over the selected time period. A detail view of selected monitoring data of the result list An option to break down all history data that was collected for the selected monitoring data during the specified time frame.

80

September 2011

4 Performance

Process
To analyze database snapshot data, you proceed as follows: 1. You identify the time period where you experienced performance problems, such as, long-running background jobs, threshold violations detected by workload management, and bad user response time. 2. In the Selection area, you specify the appropriate time frame. Note If you are using a distributed database system and you want to retrieve a general snapshot, you set the member selection to All and you do not drill down by members. To retrieve a more detailed snapshot in a distributed database system, you can further drill down the selection by members. If a single member or a subset of members shows deviations compared to other members, you can also restrict the member selection. End of the note. 3. To refresh the monitoring data, you choose the Apply Selection pushbutton. The following information is displayed for each partition: o o o o o o o Number and total size of buffer pools Number of data and index logical reads Number of data and index physical reads Average physical read and write time that is required to read from and write data into the buffer pool Executed SQL statements Package cache size Package cache quality

4. To display detailed information, you select a line in the overview table. For more information, see Displaying Detailed Database Snapshot Data [page 82]. 5. To display detailed history data, you select a line in the overview table and choose the History pushbutton. The data is displayed in the History Details content detail area. 6. To isolate the time frame during which the performance problem occurred, you use the data in the overview table in the History Details content area.

September 2011

81

4 Performance

Database Snapshot Without DCF Support


This Database screen provides a selection of current performance data that is related to each partition. You can use the information to identify performance-critical partitions before starting a more detailed analysis of your database. For each partition of your database system, information about the following performance indicators is displayed: Number and total size of buffer pools Number of data and index logical reads Number of data and index physical reads Average physical read and write time that is required to read from and write data into the buffer pool Executed SQL statements Package cache size Package cache quality Note If you choose a line in the overview table of the Database screen, detailed database snapshot data is retrieved and displayed in the content detail area below the overview table. End of the note.

4.5.1.1 Displaying Detailed Database Snapshot Data


1. On the Database screen, choose a line in the overview table of the Database screen. Depending on the setup, data has been collected as follows: o With DCF support, the displayed monitoring values refer to the time frame that was specified in the Selection area. The configuration values show the configuration that was valid during the specified time frame. All values are retrieved from the history that is stored by the DCF. Without DCF support, data has been collected since the database was started. The configuration values show the current configuration.

2. In the content detail area of the Database screen, choose the appropriate tab page to display an overview of the following critical database performance indicators: o o o o o o Buffer Pool [page 295] Cache [page 297] Asynchronous I/O [page 298] Direct I/O [page 299] Real-Time Statistics [page 300] Locks and Deadlocks [page 300]

82

September 2011

4 Performance

o o o o

Logging [page 302] Calls [page 304] Sorts [page 306] XML Storage [page 307]

The data displayed on these tab pages is described in more detail in the following sections.

4.5.2 Snapshots: Schemas


The Schemas screen provides a selection of performance data that is related to these components if more than one SAP component is installed within the same database. You can use the information displayed to identify performance-critical components and the workload distribution among the components. For each component (and partition if you are using a multi partition database), the following information is displayed: Column User Partition SAP Component Data Logical Reads Data Logical Reads (%) Index Logical Reads Index Logical Reads (%) Description Name of connect user to identify the component Number of the partition (only displayed in a multi-partition database) Indicates whether the connect user is related to an SAP component or another user that is just connected to the database Number of read accesses to data in the buffer pool Percentage of logical data read accesses for the component (and partition if you are using a multi-partition database) Number of read accesses to index data in the buffer pool Percentage of index logical data read accesses for the component (and partition if you are using a multi partition database) Number of read accesses to data on disk (I/O) Data Physical Reads The value includes the number of physical reads that were performed synchronously (by the database manager agents) and asynchronously (by the I/O servers). Percentage of physical data read accesses for the component (and partition if you are using a multi partition database) Number of read accesses to index data on disk (I/O) Index Physical Reads Since index data is only read by the database manager agents, this value includes the number of synchronously read index pages.

Data Physical Reads (%)

September 2011

83

4 Performance

Column Index Physical Reads (%)

Description Percentage of index physical read accesses for the component (and partition if you are using a multi partition database)

4.5.3 Snapshots: Buffer Pools


You can access the buffer pools snapshot by calling the DBA Cockpit and choosing Performance Snapshots Buffer Pools on the Database tab page of the DBA Cockpit. Depending on the setup of your DBA Cockpit, one of the following snapshots is displayed on the Buffer Pools screen: Enhanced buffer pool snapshot with support of the data collection framework (DCF) Buffer pool snapshot without DCF support For more information about the DCF, see Enabling the Database for the Data Collection Framework [page 32].

Enhanced Buffer Pool Snapshot with DCF Support


The Buffer Pools screen does not only display current global buffer pool snapshot data but also monitoring data that is periodically collected by the DCF. Note To monitor data on the Buffer pools screen, you have to make sure that the DCF is set up correctly. If the DCF is not available or wrongly set up, an appropriate warning is displayed including a link to the Collector Configuration screen where you can perform the required steps. End of the note. For more information, see Data Collection Framework: Collector Configuration [page 227].

Features
The enhanced Buffer Pool screen provides the following: A selection area where you specify filter criteria for the monitoring data (only available in a distributed database) An overview table displaying the retrieved monitoring data with the most important key figures that have been aggregated over the selected time period. A detail view of selected monitoring data of the result list An option to break down all history data that was collected for the selected monitoring data during the specified time frame.

84

September 2011

4 Performance

Process
To analyze buffer pool snapshot data, you proceed as follows: 1. You identify the time period where you experienced performance problems, for example, long running background jobs, threshold violations detected by workload management, and bad user response time 2. In the Selection area, you specify the appropriate time frame. Note If you are using a distributed database system and you want to retrieve a general snapshot, you set the member selection to All and you do not drill down by members. To retrieve a more detailed snapshot in a distributed database system, you can further drill down the selection by members. If a single member or a subset of members shows deviations compared to other members, you can also restrict the member selection. End of the note. 3. To refresh buffer pool snapshot data, you choose the Apply Selection pushbutton. An overview table provides information about important key figures of the buffer pool activity of your database, for example: o o o o o o o Buffer pool size Members Percentage at which the data is read from the buffer pool, rather than directly from the hard disk Whether the buffer pool is enabled for STMM Number of data and index logical reads Number of data and index physical reads Number of logical and physical read requests that required I/O to get data pages into the temporary tablespace

4. To display detailed information about a buffer pool, you select a line in the overview table. For more information, see Displaying Detailed Buffer Pool Snapshot Data [page 86]. 5. To display detailed history data, you select a line in the overview table and choose the History pushbutton. 6. To isolate the time frame during which the performance problem occurred, you use the data in the overview table in the Buffer Pool History content area.

September 2011

85

4 Performance

Buffer Pool Snapshot Without DCF Support


The Buffer Pool screen provides an overview of the following important key indicators of the buffer pool activity of your database and enables you to compare these key indicators: Buffer Pool Name Buffer Quality (%) Buffer Pool Size (KB) Automatic Size (Yes or No) Data Logical Reads Data Physical Reads Index Logical Reads Index Physical Reads Temporary Data Logical Reads Temporary Data Physical Reads Temporary Index Logical Reads Temporary Index Physical Reads

4.5.3.1 Displaying Detailed Buffer Pool Snapshot Data


1. On the Buffer Pools screen, choose a line in the overview table. Depending on the setup, data has been collected as follows: o With DCF support, the displayed monitoring values refer to the time frame that was specified in the Selection area. The configuration values show the configuration that was valid during the specified time frame. All values are retrieved from the history that is stored by the DCF. Without DCF support, data has been collected since the database was started. The configuration values show the current configuration.

2. In the content detail area of the Buffer Pools screen, choose the appropriate tab page to display an overview of the following critical database performance indicators: o o o o Buffer Pool [page 308] Asynchronous I/O [page 310] Direct I/O [page 311] XML Storage [page 312]

The data displayed on these tab pages is described in more detail in the following sections.

86

September 2011

4 Performance

4.5.4 Snapshots: Tablespaces


You can access the tablespace snapshot by calling the DBA Cockpit and choosing Performance Snapshots Tablespaces on the Database tab page of the DBA Cockpit. The Tablespaces screen displays important information for each tablespace in your database. Depending on the setup of your DBA Cockpit, one of the following snapshots is displayed on the Tablespaces screen: Enhanced tablespace snapshot with support of the data collection framework (DCF) Tablespace snapshot without DCF support For more information, see Enabling the Database for the Data Collection Framework [page 32].

Enhanced Tablespace Snapshot With DCF Support


The Tablespaces screen does not only display current global tablespace snapshot data but also monitoring data that is periodically collected by the DCF. Note To monitor data on the Tablespaces screen, you have to make sure that the DCF is set up correctly. If the DCF is not available or wrongly set up, an appropriate warning is displayed including a link to the Collector Configuration screen where you can perform the required steps. For more information, see Data Collection Framework: Collector Configuration [page 227]. End of the note.

Features
The Tablespaces screen provides the following: A selection area where you specify filter criteria for the monitoring data (only available in a distributed database) An overview table displaying the retrieved monitoring data with the most important key figures that have been aggregated over the selected time period. A detail view of selected monitoring data of the result list An option to break down all history data that was collected for the selected monitoring data during the specified time frame.

Process Flow
To analyze tablespace snapshot data, you proceed as follows: 1. You identify the time period where you experienced performance problems, for example, long running batch jobs, threshold violations detected by workload management, and bad user response time 2. In the Selection area, you specify the appropriate time frame.

September 2011

87

4 Performance

Note If you are using a distributed database system and you want to retrieve a general snapshot, you set the member selection to All and you do not drill down by members. To retrieve a more detailed snapshot in a distributed database system, you can further drill down the selection by members. If a single member or a subset of members shows deviations compared to other members, you can also restrict the member selection. End of the note. 3. To refresh tablespace snapshot data, you choose the Apply Selection pushbutton. An overview table provides information about important key figures of the tablespace activity, for example: o o o o o o o Tablespace size Members Buffer quality Average physical read and write times The number of data and index logical reads The number of data and index physical reads Name of the buffer pool the tablespace is assigned to

4. To display detailed data about a tablespace, you select a line in the overview table. For more information, see Displaying Detailed Tablespace Snapshot Data [page 89]. 5. To display detailed history data, you select a line in the overview table and choose the History pushbutton. 6. To isolate the time frame during which the performance problem occurred, you use the data in the overview table in the Tablespace History content area.

Tablespace Snapshot Without DCF Support


The Tablespaces screen without DCF support provides an overview of the following tablespace activities of your database: Tablespace Name Member (distributed systems only) Buffer Quality (%) Avg. Physical Read Times (ms) Avg. Physical Write Time (ms) Data Logical Reads Data Physical Reads

88

September 2011

4 Performance

Index Logical Reads Index Physical Reads Buffer Pool Name

4.5.4.1 Displaying Detailed Tablespace Snapshot Data


1. On the Tablespaces screen, choose a line in the overview table. Depending on the setup, data has been collected as follows: o With DCF support, the displayed monitoring values refer to the time frame that was specified in the Selection area. The configuration values show the configuration that was valid during the specified time frame. All values are retrieved from the history that is stored by the DCF. Without DCF support, data has been collected since the database was started. The configuration values show the current configuration.

2. In the content detail area of the Tablespaces screen, choose the appropriate tab page to get an overview of the following critical database performance indicators: o o o o Buffer Pool [page 313] Asynchronous I/O [page 315] Direct I/O [page 316] XML Storage [page 316]

Buffer Pool and Asynchronous I/O provide information about buffer pool access. Direct I/O and XML Storage provide information about direct accesses, that is, I/O activity that does not use the buffer pool (for example, access to LONG VARCHAR columns or backup).

4.5.5 Snapshots: Containers (Only DB2 V9.7 or Higher)


Note This snapshot option is only available if the following applies: The currently monitored database is DB2 V9.7 or higher. The database configuration parameter MON_OBJ_METRICS is set to a value other than NONE. The data collection framework (DCF) is set up correctly. If the DCF is not available or not correctly set up, a warning is displayed including a link to the Collector Configuration screen where you can perform the necessary steps. For more information, see Data Collection Framework: Collector Configuration [page 227]. End of the note.

September 2011

89

4 Performance

You can use the Containers snapshot screen to gain an overview of the containers in your database. To access the container snapshot, call the DBA Cockpit and choose Performance Snapshots Containers on the Database tab page of the DBA Cockpit. The Containers screen provides the following: A Selection area where you specify filter criteria for the collected data In the Sort Tables by field, you can choose if the containers are sorted by direct reads or by accessibility. An overview table displaying the retrieved history data according to your selection criteria In the overview table on the Containers screen, the following information is displayed: Column Tablespace Name Container Name Name of the tablespace Name of the container Indicates whether the container is accessible Possible values are: Accessibility 1 : Container is accessible. 0 : Container is not accessible. Stripe Set Direct Writes Stripe set of the container Number of write operations that do not use the buffer pool for the container Number of read operations that do not use the buffer pool for the container Elapsed time for direct reads in milliseconds Description

Direct Reads Direct Read Time (ms) Direct Write Time (ms) Est. Time per Write (ms) Pages Read

Elapsed time for direct writes in milliseconds Estimated time per write operation (direct writes and direct write time) in milliseconds Number of pages read from the container

90

September 2011

4 Performance

4.5.6 Snapshots: Tables


You can access the table snapshot by calling the DBA Cockpit and choosing Snapshots Tables on the Database tab page of the DBA Cockpit. Performance

Depending on the setup of your DBA Cockpit, one of the following snapshots is displayed on the Tables screen: Enhanced table snapshot with support of the data collection framework (DCF) Table snapshot without DCF support For more information about the DCF, see Enabling the Database for the Data Collection Framework [page 32]. The Tables screen provides information that you can use to analyze tables under the following aspects: 1. Which tables are accessed the most and require extra tuning? 2. Which tables have frequent update operations and are, therefore, potential candidates for new statistics? 3. Which tables are candidates for reorganization due to space fragmentation?

Enhanced Table Snapshot with DCF Support


The Tables screen does not only display current global table snapshot data but also monitoring data that is periodically collected by the DCF. Note To monitor data on the Tables screen, you have to make sure that the DCF is set up correctly. If the DCF is not available or wrongly set up, an appropriate warning is displayed including a link to the Collector Configuration screen where you can perform the required steps. For more information, see Data Collection Framework: Collector Configuration [page 227]. End of the note.

Features
The Tables screen provides the following areas: A selection area where you specify filter criteria for the monitoring data (only available in a distributed database system) A result list of the retrieved monitoring data providing the most important key figures that have been aggregated over the selected time period An option to break down all history data that was collected for the selected monitoring data during the specified time frame

September 2011

91

4 Performance

Process
To analyze table snapshot data, you proceed as follows: 1. You identify the time period where you experienced performance problems for example, long running background jobs, threshold violations detected by workload management, and bad user response time 2. In the Selection area, you specify the appropriate time frame. Note If you are using a distributed database system and you want to retrieve a general snapshot, you set the member selection to All and you do not drill down by members. To retrieve a more detailed snapshot in a distributed database system, you can further drill down the selection by members. If a single member or a subset of members shows deviations compared to other members, you can also restrict the member selection. End of the note. 3. You restrict the result set in the overview table, for example, by limiting the maximum number of rows, by using wildcards, or by specifying lower limits for I/O counters. Example By using the appropriate wildcard in the Table Name input field, you can view special BW tables with a specific naming convention. End of the example. 4. To refresh table snapshot data, you choose the Apply Selection pushbutton. 5. To analyze a single table in more detail, you select a line in the overview table and choose the Detailed Table Analysis pushbutton. You are redirected to the Single Table Analysis screen where detailed table analysis data is displayed. 6. To display detailed history data, you select a line in the overview table and choose the History pushbutton. The data is displayed in the History Details content area. 7. To isolate the time frame during which the performance problem occurred, you use the data in the overview table in the History Details content detail area.

92

September 2011

4 Performance

Table Snapshot Without DCF Support


The following information is displayed: Column Table Schema Table Name Partition Table File ID Table Type Rows Written Name of the schema Description

Name of the table Number of partition (only displayed in a multi-partition database) File ID (FID) of the table Type of table for which information is displayed, for example, user, system, or temp Number of rows changed (inserted, deleted, or updated) in the table

Rows Read Number of rows read from the table Number of accesses (reads and writes) to overflowed rows of the table Overflowed rows indicate that data fragmentation has occurred. If this number is high, you might be able to improve table performance by reorganizing the table using the REORG utility, which cleans up this fragmentation. Overflow Access Note Pay particular attention to this column. If the value in this column is very high, consider reorganizing the table. End of the note. Number of page reorganizations executed for the table Page REORGs Too many page reorganizations can result in less than optimal insert performance. You can use the REORG TABLE utility to reorganize a table and eliminate fragmentation.

Note If you select a line, you are redirected to the Single Table Analysis screen where detailed table analysis data is displayed. End of the note.

More Information
Analyzing and Maintaining a Single Table [page 154]

September 2011

93

4 Performance

4.5.7 Snapshots: Applications (Only DB2 V9.7 or Higher)


Note This snapshot option is only available if the following applies: The currently monitored database is DB2 V9.7 or higher The database configuration parameter MON_REQ_METRICS is set to a value other than NONE whereas the database manager configuration parameter DFT_MON_UOW is set to ON. End of the note. The Applications screen provides information about applications that are currently connected to the database. The metrics and information displayed for each application only reflect the most recent unit of work of the selected application but not the metrics since the selected application has connected to the database. You can use the information provided on the Applications screen to: Monitor the number and details of active and inactive applications that are connected to the database. Monitor, capture, or cancel long-running activities Analyze lock wait situations by monitoring the progress of the application that is holding the lock

Process
To analyze application snapshot data, you proceed as follows: 1. If the currently monitored database comprises more than one member, you first specify in the Selection area whether you want to retrieve information from applications that are connected to any member or only to certain members by setting the appropriate filter criteria. Note At the beginning of a unit of work (UOW), each application is assigned to a workload and therefore, also to a service class. This assignment is reevaluated at the beginning of the next UOW. If you want to monitor applications that are assigned to a specific service class, for example, the ABAP dialog service class, set a filter accordingly in the Selection area. End of the note. In addition, you specify if you want to display information about DB2 autonomic processes (for example, STMM or Event Monitor) by selecting the Show DB2 Autonomics and Utilities checkbox.

94

September 2011

4 Performance

To refresh the monitoring data, choose the Apply Selection pushbutton. The following information is displayed: Column Description A system-wide unique ID for the application in a distributed database system This ID is the same on every member where the application can span subagents. ID of the coordinating member of the application

Application Handle

Coord. Member

Application State State of the application Application Name UOW Runtime Entity Client PID Client Workstation Name of application running at the client as known to the database manager or DB2 Connect Total runtime of the current unit of work (UOW) in milliseconds Type of the entity (db2agent, db2fmp, or name of the system entity) Process ID of the client application that made the connection to the database Client workstation as specified in the TPMON special register Client user ID as specified in the TPMON special register. Client User ID In an SAP ABAP system, the client user ID corresponds to the SAP user name. Client application as specified in the TPMON special register In an SAP ABAP system, the client application is specified as follows: o Client Application o o ptype BTC for SAP batch work processes ptype SPO for SAP spool work processes ptype UPD or ptype UPD2 for SAP update work processes the SAP transaction code for SAP dialog work processes

o Service Superclass Service Subclass

Name of the service superclass to which the coordinating agent is currently assigned Name of the service subclass to which the coordinating agent is currently assigned

September 2011

95

4 Performance

2. To set a filter on the retrieved snapshot data, you specify the following in the Summary area: Note The numbers displayed behind the selectable characteristics indicate the number of applications, agents, or activities that are currently in the respective state. End of the note. Characteristic State of an application The following states are possible: o Active The application is currently executing activities on the database. o Application States o Inactive (having an uncommitted activity) The application is currently not executing activities on the database. However, the application has done so in the past and these past activities have not yet been committed. Inactive (no uncommitted activity) The application is currently not executing any activities on the database and has committed all activities that were executed in the past. o Inactive (no agent assigned) No coordinator is assigned to the application. Activity types that are currently being executed on the database The following values are possible: o o o Activity Types o o o Note Only activity types that are currently processed are displayed. End of the note. LOAD READ DML WRITE DML DDL CALL OTHER Description

96

September 2011

4 Performance

Characteristic

Description States of the activities that are currently being executed on the database Possible values include, for example, the following states: o o o Cancel Pending Executing Idle Initializing Queued Terminating

Activity States

o o o Note

Only activity types that are currently processed are displayed. End of the note. Events that have recently been processed by agents that are assigned to any of the application handles Possible values include, for example, the following activity states: o o Events Recently Processed o o o Note Only activity types that are currently processed are displayed. End of the note. 3. To trace, capture, or cancel an activity, you select an application handle in the overview table of the Application screen and choose the respective pushbutton as described in Tracing, Capturing or Canceling an Activity later in this section. 4. To display a detailed view of a specific application, you choose an application handle from the result list. For more information, see Displaying Details about Application Handles later in this section. Process Request Process Routine Wait Request Acquire Lock Wait WLM Queue

September 2011

97

4 Performance

Tracing, Capturing, or Canceling an Activity


If you discover an activity that is running a long time on the Applications screen, you can do one of the following: Analyze the progress of the unit of work by selecting the application handle in the overview table of the Application screen and choosing the Trace Activity pushbutton. The Application Activity Trace starts in a separate Web browser providing detailed information about the selected application handle. By default, the screen is refreshed every 5 seconds. You can choose different refreshing intervals by pausing the trace, specifying a different time interval, and resuming the trace. After the screen has been refreshed, all agents that are currently assigned to the respective application handle are displayed in the Assigned Agents table. Especially in a distributed database, or if the activity uses intra-parallelism, you can detect whether the progress of an activity is slowed down by a certain subagent. To identify the reason for this slowdown, check the event-related and request-related information in the Assigned Agents table. The Unit of Work Progress table grows as the trace continues to collect information about activities of the respective application handle. Note o o o The Unit of Work Progress table is sorted by time in descending order. This means that new data is inserted at the top of the table. You can configure metrics of interest to be displayed by choosing the Open Dialog Settings pushbutton. In a distributed database environment or if the activity uses intra-parallelism, you can filter data by member.

End of the note. To review the status of all assigned agents at a certain point in time, you have to pause the trace. After selecting the respecting point in time in the Unit of Work Progress table, details about the assigned agents of that point in time is again displayed in Assigned Agents table. The trace is automatically paused as soon as the application disconnects from the database system or as soon as this window is closed. Capture detailed information about the currently executed activity of an application as follows: 1. Select the application and choose the Capture Activity pushbutton. 2. In the DBA Cockpit, choose Violations . Performance Critical Activities Threshold

On the Threshold Violations screen, activities that have been captured manually are displayed with the value MANUAL in the Predicate column.

98

September 2011

4 Performance

Note To find manually captured activities more easily, use the filter function of the list viewer. End of the note. Cancel an activity by selecting the application and choosing the Cancel Activity pushbutton. If the activity is successfully canceled, the SQL error SQL4725N with status SQLSTATE 57014 is returned to the canceled application.

Displaying Details About Application Handles


To display detailed information about an application handle, select a line from the result list. In the content detail area, the following tab pages are displayed: Unit of Work Current Activities Assigned Agents

Unit of Work
On the Unit of Work tab page, you can find details about the unit of work (UOW) that the application is currently executing on the database system. The pie chart indicates where this UOW has spent most of its time since it was started by the respective application. Note If the selected UOW has just started and therefore no metrics have yet been rolled up into the UOW, the following message is displayed instead of the pie chart: No data is available End of the note. You can find more details in the chart area below, for example, detailed aggregate metrics about all activities that were or are just running as part of this unit of work as well as details on the UOW itself and its WLM context.

Current Activities
The Current Activities tab page displays the activities that are currently processed as part of the current UOW. In most cases, only a single activity (identified by an activity ID) is displayed. Only in certain cases for example, if the application has opened a cursor that uses the WITH_HOLD attribute might more than one activity be displayed. If you are using a distributed database or if the activity uses intra-parallelism, you can review the status of each activity on individual members by selecting the relevant row in the table. The details shown below also include the SQL statement text of the activity.

September 2011

99

4 Performance

Assigned Agents
The Assigned Agents tab page displays details about all database agents that are currently assigned to the selected application. In a distributed database or if the activity uses intraparallelism, you can check the status of each individual agent that is currently assigned to the selected application.

4.5.8 Snapshots: Applications (Only DB2 V9.5 or Lower)


Note This snapshot option is only available if the following applies: The currently monitored database is DB2 V9.5 or lower. The currently monitored database is DB2 V9.7 or higher and the database configuration parameter MON_REQ_METRICS is set to NONE whereas the database manager configuration parameter DFT_MON_UOW is set to ON. End of the note. The Application screen displays the performance data for every application that is currently connected to the database. You can use the following information to determine the activity of applications, for example, to evaluate which applications are placing the highest load on the database: Partition (only DPF systems) User Appl. Handle Agent PID Appl. Name Appl. PID Appl. Host Name Application Status Buffer Quality (%) Agent Priority Prefetch Priority

100

September 2011

4 Performance

Capturing or Canceling an Activity


Note This feature is available only if the currently monitored database version is at least DB2 V9.5. End of the note. If you discover an activity that is running for a very long time on the Application screen, you can do one of the following: Capture detailed information about the execution of an activity as follows: 1. Select the activity and choose the Capture pushbutton. 2. In the DBA Cockpit, choose Violations . Performance Critical Activities Threshold

On the Threshold Violations screen, activities that have been captured manually are displayed with the value MANUAL in the Predicate column. Note To find manually captured activities more easily, use the filter function of the list viewer. End of the note. Cancel an activity by selecting it and choosing the Cancel pushbutton. If the activity is successfully canceled, the SQL error SQL4725N with status SQLSTATE 57014 is returned to the canceled application.

Displaying Details About Applications


You can display detailed information by choosing a line in the overview table of the Application screen. In the content detail area, the following tab pages are displayed: Application Agents Note This tab page is only available if you are using the SAP GUI-based user interface. It contains information that you can also find on the Assigned Agents and on the Agents Memory tab pages on the Web browser-based user interface. End of the note. Assigned Agents Note This tab page is only available if you are using the Web browser-based user interface. End of the note.

September 2011

101

4 Performance

Agents Memory Note This tab page is only available if you are using the Web browser-based user interface. End of the note. Buffer Pool Direct I/O XML Storage Locks and Deadlocks Calls Sorts Cache Unit of Work Statement Statement Text SQL Workspace

4.5.9 Snapshots: SQL Cache (Only DB2 V9.7 or Higher)


Note This snapshot option is only available if the following applies: The currently monitored database is DB2 V9.7 or higher. The database configuration parameter MON_ACT_METRICS is set to a value other than NONE. End of the note. The SQL Cache screen displays information about SQL statements that are executed very often and stored in the SQL cache of your system. This information helps you identify those SQL statements that consume a large number of resources. You can also determine whether fine-tuning of those statements is necessary to improve the performance of the database. Depending on your system, the snapshot can give you a wide range of information, which might lead to a very large result set. To limit the result set, you can specify ranking or filter criteria in the Selection area by either choosing the Top SQL Statements by or Custom radio button. If you choose the Top SQL Statements by radio button, you have to choose a ranking criterion from the relevant dropdown list. If you choose the Custom radio button, you can specify filter criteria in the relevant fields.

102

September 2011

4 Performance

In the Selection area, you can also define the maximum number of returned SQL statements. The default limit is 100 SQL statements. By default, static packages are not displayed as the SAP system uses dynamic SQL only. If you want to analyze static packages, you have to select the Display Static Packages checkbox. If you choose the Apply Selection pushbutton, the result set is determined according to your selection criteria. The following information is displayed: Column Statement Text Text of the SQL statement Description

The first metric column is used for ranking as chosen in the Selection area <ranking metric> from the Top SQL Statements by dropdown list. By default, Coord. Statement Exec. Time is used. No. of Coord. Executions Number of executions by coordinator agent

Avg. Coord. Average execution time in milliseconds for statement by coordinator agent Stmt. Exec. Time Total CPU Time Total CPU time in milliseconds Ratio of rows read from the base table compared to rows processed, which can be either rows returned to the application (SELECT statements) or rows written (UPDATE, INSERT, DELETE statements) A value of 1 indicates optimal access to the requested data. High values indicate statements with inefficient access. BP Gets / Rows Processed Average number of pages read from the buffer pool per rows processed, which can be either rows returned to the application (SELECT statements) or rows written (UPDATE, INSERT, DELETE statements)

Rows Read / Rows Processed

Displaying Details About SQL Statements


To display detailed information about an SQL statement, select a line from the result list. The SQL Statement Details area appears displaying the following tab pages: SQL Statement Statement Metrics

SQL Statement
On the SQL Statement tab page, the SQL statement text and the compilation environment are displayed. To show the access plan of the statement, you can choose the EXPLAIN pushbutton. For more information, see The EXPLAIN Function [page 43]. To display the ABAP source code from where the SQL statement was executed, you can choose the Show Source pushbutton.

September 2011

103

4 Performance

Note The Show Source pushbutton is only available if the following applies: The SAP system on which the currently monitored database is running is an ABAP system. The SAP system has the minimum Support Package level as described in SAP Note 1493490. End of the note. The Compilation Environment area displays information, for example, about the following: Isolation Query optimization SQL rules Refresh age Resolution time stamp

Statement Metrics
The Statement Metrics tab page provides the chart view Time Spent in SQL Statement. In addition, detailed information about the following is displayed: Statement metadata Miscellaneous metrics Sorts Locking Logger Buffer pool Direct I/O

104

September 2011

4 Performance

4.5.10 Snapshots: SQL Cache (Only DB2 V9.5 or Lower)


Note This snapshot option is only available if one of the following applies: The currently monitored database is DB2 V9.5 or lower. The currently monitored database is DB2 V9.7 or higher and the database configuration parameterMON_ACT_METRICS is set to NONE whereas the database manager configuration parameter DFT_MON_STMT is set to ON. End of the note. The SQL Cache screen displays information about SQL statements that are executed very often and stored in the SQL cache of your system. This information helps you identify those SQL statements that consume a large number of resources. You can also determine whether fine-tuning of those statements is necessary to improve the performance of the database. Depending on your system, the snapshot can give you a wide range of information, which might lead to a very large result set. After the snapshot has been taken and before the results are displayed, you can specify filter criteria in the Selection area to limit the result set: Field Executions Total Execution Time Avg. Execution Time Rows Read Rows Written SQL Text Description Number of times a statement has been executed Total execution time in milliseconds for a statement

Average execution time in milliseconds for a statement Number of rows read for a statement Number of rows written by a statement Search using either the wild card "*" or using a text string, for example, INSERT, to limit the number of statements displayed Ratio of rows read from the base table compared to rows processed, which can be either rows returned to the application (SELECT statements) or rows written (UPDATE, INSERT, DELETE statements)

A value of 1 indicates an optimal access to the requested data. High Rows Read / values indicate statements with an inefficient access. Rows Processed Note This metric is only evaluated if your database is DB2 V9.5 Fix Pack 1 or higher.

September 2011

105

4 Performance

Field End of the note.

Description

If you choose the Apply Selection pushbutton, the result set is determined by filtering the snapshot results according to your selection criteria and the following information is displayed in the Summary area: Column Execution Time Rows Read Rows Written Note The data displayed in the Summary area refers to the entire SQL cache and not only to the currently selected result set. End of the note. The result set is displayed in a table as follows: Column SQL Text Description Text of a dynamic SQL statement that was in the SQL cache at the time of the snapshot Number of times a statement was executed This value helps you to identify which statements are executed very often. A high number of executions does not necessarily mean that a statement is using an excessive amount of resources. You should also check the number of rows read and rows written. If you find relatively high values here, choose EXPLAIN to check whether indexes are not being used efficiently or whether indexes are missing. Total execution time in milliseconds for a statement You can use this value together with Executions to identify the statements that would benefit from further analysis. Total Execution Time (milliseconds) divided by Total Cache Sum Execution Time (milliseconds) Description Total execution time in milliseconds for an SQL statement Total number of rows read Total number of rows written

Executions

Total Execution Time (ms) Total Execution Time ( %) Average Execution Time (ms)

Total Execution Time (in milliseconds) divided by Executions

106

September 2011

4 Performance

Buffer Quality Buffer quality for this statement in percent (%) Ratio of rows read from the base table compared to rows processed, which can be either rows returned to the application (SELECT statements) or rows written (UPDATE, INSERT, DELETE statements) Rows Read / Rows Processed A value of 1 indicates an optimal access to the requested data. High values indicate statements with an inefficient access. Note This metric is only available if your database is DB2 V9.5 for Linux, UNIX, and Windows Fix Pack 1 or higher. End of the note. Average number of pages read from the buffer pool per rows processed, which can be either rows returned to the application (SELECT statements) or rows written (UPDATE, INSERT, DELETE statements) BP Gets / Rows Processed Note This metric is only available if your database is DB2 V9.5 for Linux, UNIX, and Windows Fix Pack 1 or higher. End of the note. BP Gets / Executions Average number of pages read from the buffer pool per execution of the statement Number of rows read Rows Read You can use this value to identify statements that would benefit from additional indexes. Use EXPLAIN to analyze the statement. The given value does not necessarily correspond to the number of rows of the result set of the SQL statement. The Rows Read value shows the number of rows that needs to be read to obtain the result set. Number of rows that were changed (inserted, deleted, or modified) in a table Rows Written High values might indicate that you should update statistics using RUNSTATS. Number of sorts that were necessary to execute the statement SQL Sorts You can use this value to determine whether new indexes are needed. Use EXPLAIN to check whether and which indexes were used when the selected statement was executed.

September 2011

107

4 Performance

Sort Overflows Total Sort Time (ms) Note

Number of sort overflows Total sort time in milliseconds

If no hits are found, the result set is empty, and nothing is displayed. End of the note. The following functions are available for further actions: EXPLAIN To display a detailed performance analysis, you can display the access plan for the SQL statement by choosing the EXPLAIN pushbutton. For more information, see The EXPLAIN Function [page 43]. Index Advisor To improve the performance of a query, you can retrieve recommendations about useful indexes using the Index Advisor pushbutton. In addition, you can design new virtual indexes that can be validated before they are actually created. For more information, see The Index Advisor [page 50]. Source To display the ABAP source code from where the SQL statement was executed, you can choose the Show Source pushbutton. Note The Show Source pushbutton is only available if the following applies: o o The SAP system on which the currently monitored database is running is an ABAP system. The SAP system has the minimum Support Package level as described in SAP Note 1493490.

End of the note.

Displaying Details About SQL Statements


To display detailed information about an SQL statement, select a line from the result list. In the content detail area, the following tab pages are displayed: Common Resource Consumption I/O Statement Text

108

September 2011

4 Performance

Common
On the Common tab page, you can find details about the statements and rows. These details include, for example, information about the following: Package cache ID Insert time stamp Partition Authorization ID Buffer pool quality Executions Compilations Rows deleted, inserted, and read

Resource Consumption
The Resource Consumption tab page displays details about the total resource consumption, the proportional resource consumption, and the sorts. These details include, for example, information about the following: Execution time User CPU time System CPU time Worst and best preparation time Rows read and written Average time per row read and per row written Sort overflows Total sort time

I/O
The I/O tab page displays details about the buffer pool, temporary data, and XML storage, that is, about the number of logical and physical reads.

Statement Text
The Statement Text tab page displays the complete text of the SQL statement.

September 2011

109

4 Performance

4.5.11 Snapshots: System


The System screen provides you with an overview of all resources that are available for each member of the currently monitored database system. You can access information about system resources by calling the DBA Cockpit and choosing Performance System on the Database tab page of the DBA Cockpit. On the System screen, the following information is displayed: Column Host Name OS Members CPU Usage (%) Name of the host Operating system of the host Members located on this host Current overall CPU usage of the host in percent Note CPU Load Short This information is only available on UNIX operating system platforms. End of the note. Short-period CPU load, for example, load samples over the last 5 minutes Note CPU Load Medium This information is only available on UNIX operating system platforms. End of the note. Medium-period CPU load, for example, load samples over the last 10 minutes Note This information is only available on UNIX operating system platforms. CPU Load Long End of the note. Long-period CPU load, for example, load samples over the last 15 minutes CPUs Online Memory Total (MB) Memory Free (MB) Number of CPUs online Total size of physical memory in MB Description

Amount of free physical memory in MB

110

September 2011

4 Performance

4.6 Performance: Critical Activities


You can access data about critical activities by calling the DBA Cockpit and choosing Performance Critical Activities <activity option> on the Database tab page of the DBA Cockpit. Note This screen is only available if the currently monitored database version is at least DB2 V9.5. End of the note. The information provided in the Critical Activity task area allows you to define thresholds on resources to capture information or even cancel database activities that are showing abnormal behavior. Thresholds are either controlled proactively before the activity begins based on the projected impact, or reactively while the activity is running and consuming resources. For more information about thresholds, see Control of work with thresholds in the IBM DB2 V9.7 Information Center at: http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.db2.luw.admin.wlm.doc/d oc/c0053451.html

Features
The following critical activities are available: Threshold Violations You can use the information on this screen to review violations of defined thresholds. Threshold Configuration You can use the information on this screen to maintain thresholds on the database system.

September 2011

111

4 Performance

4.6.1 Critical Activities: Threshold Violations


On the Threshold Violations screen, you can analyze threshold violations that occurred on the database. You can display threshold violations that were captured during a certain time frame, by specifying a time frame in the Selection area, and choosing the Apply Selection pushbutton. The following information is displayed: Column Description

Violation Time Time when the threshold violation occurred Member Database member where the violation occurred Predicate that was violated Note Predicate Activities with the value MANUAL were captured manually on the Applications screen. For more information, see Snapshots: Applications (Only DB2 V9.7 or Higher) [page 94] or Snapshots: Applications (Only DB2 V9.5 or Lower) [page 100]. End of the note. Violated Value Value that was exceeded and that violated the threshold predicate Service Superclass Service Subclass Name of the service superclass in which the violation occurred

Name of the service subclass in which the violation occurred

By default, the history of a threshold violation is kept for two weeks. To delete all recorded threshold violations, choose the Reset Violation History pushbutton. For more information about how to change the size of the violation history, see Data Collection Framework: Collector Configuration [page 227].

Displaying Details About Threshold Violations


To display details about a threshold violation, select a line in the overview table. Details about a selected threshold violation are displayed in the content detail area on the following tab pages: General Displays details about the activity that violated the threshold as well as the execution statistics for that particular activity SQL Statement(s) Displays details about the SQL statement that was executed as part of the activity

112

September 2011

4 Performance

For nested statement calls - for example, during the execution of stored procedures more than one SQL statement can be available. You can retrieve additional information about the bind values and additional details about a single SQL statement as follows: o Retrieve a newly generated access plan by choosing an SQL statement from the list and then the EXPLAIN pushbutton. The new access plan is displayed in a separate window. o Retrieve the access plan as it existed in the SQL cache when the threshold violation occurred by choosing the Section EXPLAIN pushbutton The current access plan is displayed in a separate window. Note DB2 V9.5 only To be able to retrieve the access plan using the Section EXPLAIN pushbutton, you have to set the DB2 registry variable DB2_DUMP_SECTION_ENV to ON. For more information, see SAP Note 1227225. End of the note.

4.6.2 Critical Activities: Threshold Configuration


On the Threshold Configuration screen, all defined thresholds for the database system are displayed. You can perform the following actions: Enable or disable a threshold by selecting a line from the list and choosing the Enable / Disable Threshold pushbutton. Create a threshold by choosing the Create Threshold pushbutton. A wizard appears that guides you through the procedure. Note The predicates that are available in the wizard are limited to those that are considered to be a use case in an SAP environment. DB2, however, allows you to define thresholds on more predicates than are available when using the wizard in the DBA Cockpit. Be aware that inappropriate predicate values can cause a system slowdown due to increased I/O. Thresholds that are violated too often force the even monitor to collect and write details of each threshold violation to the respective event monitor tables. To get meaningful predicate values when you define thresholds, use the statistics that are available in the Performance: Workload Statistics [page 71] screen. End of the note.

September 2011

113

4 Performance

Drop a threshold by selecting a line from the list and choosing the Drop Threshold pushbutton. Note If the WLM event monitors have not yet been created on the database, you can do so on the Collector Configuration screen under Configuration Data Collection Framework in the DBA Cockpit. For more information, see Configuration: Data Collection Framework [page 227]. End of the note.

4.7 Performance: Utilities


You can access data on utilities by calling the DBA Cockpit and choosing Performance Utilities <Utilities option> on the Database tab page of the DBA Cockpit. The following options are available: Database Utilities On the Database Utilities screen, you can check if database performance is currently influenced by utilities, such as RUNSTATS or REORG. Utility History The Utility History screen provides an overview of all database utility operations that were performed during a specific time frame. Using the data provided, you can analyze if utility operations were influencing the database performance in the past. Note The Utility History screen is only available if the DCF has been set up correctly. If the DCF is not available or wrongly set up, an appropriate warning is displayed including a link to the Collector Configuration screen where you can perform the required steps. For more information, see Data Collection Framework: Collector Configuration [page 227]. End of the note. Inplace Table Reorganization The Inplace Table Reorganization screen provides an overview of all inplace table reorganizations. Inplace table reorganizations let you access tables while they are being reorganized.

114

September 2011

4 Performance

4.7.1 Utilities: Database Utilities


On the Database Utilities screen, you can check if database performance is currently influenced by utilities, such as RUNSTATS or REORG. Depending on the utility, performance can decrease due to one of the following: Reduced IO performance because a utility performs much physical I/O Locking situations on database resources, such as tables that are locked by an offline REORG The following information is displayed for all running utilities: Column Partition Description Number of the partition on which the utility is running Type of utility that is running, such as: ASYNC_INDEX_CLEANUP BACKUP CRASH_RECOVERY LOAD REBALANCE Type REDISTRIBUTE REORG RESTART_RECREATE_INDEX RESTORE ROLLFORWARD_RECOVERY RUNSTATS Description Describes the utility and what it is working on, for example, whether a table is being processed by a RUNSTATS

Start Time Date and time when utility started

September 2011

115

4 Performance

Defines how to interpret the progress list that is shown in the content detail area after you have selected a line in the overview table The following values are possible are: Concurrent Due to concurrent processing, any element in the progress list can be updated at any time. Processing Mode Serial Interpret the elements in the list as a set of serial phases This means that completed work must equal the total work for element n before the completed work of element n+1 is first updated. This attribute is used to describe the progress of a task that consists of a set of serial phases where a phase must fully complete before the next phase begins. <space> The utility is running as one single phase without parallelism Sequence Number Specifies the current phase the utility is working on Indicates how the utility was started The following values are possible: AUTO Invoker The utility was automatically started by DB2. USER The utility was started manually. Specifies the relative importance of a throttled utility Priority The higher the priority, the more you might experience an impact on overall database performance.

116

September 2011

4 Performance

Shows the current execution state of the utility ERROR The utility is stopped due to an unexpected error situation. State EXECUTE The utility is executing. WAIT The utility is waiting, for example, due to blocked resources or synchronous I/O requests.

Displaying Details about Utilities


If a utility is in concurrent or serial processing mode, you can choose the utility in the overview table. The Utility Details area appears providing information about all phases of the selected utility. The Utility Data subarea provides a summary of important indicators of the overview table, such as Utility ID, Invoker, and so on. The Running Phases table provides the following information: Column Partition Start Time Sequence Number Description Progress (%) Completed Total Description Number of the partition where the utility phase is running Date and time when the utility phase started Specifies the number of the utility phase Description about the action performed in this phase Work progress in percent (which is the percentage of completed units compared to the total number of units) Number of units that have been processed Total number of units that need to be processed by the utility phase

September 2011

117

4 Performance

Metrics of the work units The following values are possible: NOT_SUPPORT BYTES Work Metrics EXTENTS INDEXES PAGES ROWS TABLES State Shows the current execution state of the utility phase

4.7.2 Utilities: Utility History


The Utility History screen provides an overview of logged database utility operations for a specific time frame that were recorded in the database history file (DB_HISTORY). Using the data provided on this screen, you can analyze operation that were performed on your database system for a specific time period. Note The Utility History screen is only available if the DCF has been set up correctly. If the DCF is not available or wrongly set up, an appropriate warning is displayed including a link to the Collector Configuration screen where you can perform the required steps. For more information, see Data Collection Framework: Collector Configuration [page 227]. End of the note. To retrieve the required data, specify a time frame in the Selection area and apply your selection. The following information is displayed: Column Start Time Starting time of a logged event End Time Ending time of a logged event Identifier of the logged operation Operation For more information, see Table 2. OPERATION and OPERATIONTYPE values in section DB_HISTORY administrative view - Retrieve history file information in the IBM DB2 V9.7 Information Center. Description

118

September 2011

4 Performance

Column

Description Action identifier for a logged operation that depends on the operation run

Operation Type

For more information, see Table 2. OPERATION and OPERATIONTYPE values in section DB_HISTORY administrative view - Retrieve history file information in the IBM DB2 V9.7 Information Center. Identifier for the type of the target object The following values are possible: D

Object Type

Stands for full database P Stands for tablespace T Stands for table

Schema Object Event Info Event ID

Schema of the target object Name of the target object Additional event information for the operation Number that uniquely identifies an entry in the history file

Displaying Details About Logged Events


To display detail information about a logged event, select a line in the overview table. In the Utility History Details area, additional event attributes are indicated as a formatted record string.This detail area also provides further internal records, such as the event duration or utility ID (if available). You can display additional fields by customizing your layout using the Open Settings Dialog pushbutton.

More Information
For more information about logged events in the database history file, see section DB_HISTORY administrative view - Retrieve history file information in the IBM DB2 V9.7 Information Center at: http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=/com.ibm.db2.luw.sql.rt n.doc/doc/r0022351.html

September 2011

119

4 Performance

4.7.3 Utilities: Inplace Table Reorganization


The Inplace Table Reorganization screen provides an overview of inplace table reorganizations that are currently running or that have been interrupted. Inplace table reorganization allows you to access tables while they are being reorganized. Note In contrast to the Database Utilities screen, the Inplace Table Reorganization screen provides a more detailed view of reorganizations. In addition, not only currently active reorganizations are displayed but also the DB2 history file for finished reorganizations is retrieved. End of the note. The information is displayed in the following table: Column Table Schema Table Name Partition Description Table schema of the table that is currently being reorganized Name of the table that is currently being reorganized Number of the partition (only displayed in a multi-partition database) Status of the inplace table reorganization Possible values are: Running REORG Status Paused Suspended Completed Progress % Start Date Start Time Progress of the reorganization Start date of the inplace table reorganization Start time of the inplace table reorganization Access mode for other users while the table reorganization is running The following access modes are possible: Access Mode READ WRITE NO ACCESS Tablespace Name of the tablespace where the reorganization is performed

120

September 2011

4 Performance

Note If no active inplace table reorganization was found, the system displays the following message: No Inplace Table Reorganizations are running. Only the REORG activities since the database start are displayed. REORGs that were active before the database start are not displayed. End of the note. Depending on your requirements, you can customize the view on the Inplace Table Reorganizations screen using the following functions: Pushbutton Active Only Only inplace table reorganizations with the status Started or Paused are displayed. Choose View All All inplace table reorganizations are displayed including those with status Completed or Suspended. Since DB Start Only inplace table reorganization that have been started after the last restart of the database manager are displayed. Choose Data Source Incl. History File This option additionally reads the DB2 history file. Thus, the data of inplace table reorganizations that were started before the last restart of the database manager is also retrieved. Function

Activities
You can perform the following actions for an inplace reorganization: Pause Select a running inplace reorganization and choose Pause. Resume Select a paused inplace table reorganization and choose Resume. Suspend Select any inplace table reorganization and choose Suspend. As a result of any of these actions, the list of active inplace table reorganizations is refreshed.

September 2011

121

4 Performance

4.8 History: Database


Caution For DB2 V9.5 and DB2 V9.7, this screen has been deprecated and replaced by the enhanced database snapshot [page 80]. End of the caution. History data is only available if you selected Collect History Data when configuring your database for remote monitoring. For more information, see Configuration of Systems for Remote Monitoring [page 22]. The system provides a day-by-day trend analysis of database activity. You can check the workload of the days and display the workload peak of a single day. You can access the History: Database screen by calling the DBA Cockpit and choosing Performance History Database in the navigation frame of SAP GUI-based user interface of the DBA Cockpit. An overview of all days monitored is displayed: Column Partition Date Description Monitored partition (only displayed if you are using a multi-partition database) Day when monitoring was performed

Average physical read time Avg. Phys. Read If you have chosen Total Day, this is the average of all measured average Time (ms) read times. If you have chosen Peak, this is the worst measured read time. Average physical write time Avg. Phys. Write If you have chosen Total Day, this is the average of all measured average Time (ms) write times. If you have chosen Peak, this is the worst measured write time. Data Logical Reads Number of read accesses to data in the buffer pool Number of read accesses to data on disk (I/O) Data Physical Reads The value includes the number of physical reads that were performed synchronously (by the database manager agents) and asynchronously (by the I/O servers). Number of write accesses to data on disk (I/O) Data Physical Writes The value includes the number of physical writes that were performed synchronously (by the database manager agents) and asynchronously (by the I/O cleaners).

122

September 2011

4 Performance

Column Index Logical Reads

Description Number of read accesses to index data in the buffer pool Number of read accesses to index data on disk (I/O)

Index Physical Reads

Since index data is read only by the database manager agents, this value includes the number of synchronously read index pages. Number of write accesses to index data on disk (I/O)

Index Physical Writes

The value includes the number of physical writes that were performed synchronously (by the database manager agents) and asynchronously (by the I/O cleaners). Total number of COMMIT statements that have been attempted Total number of ROLLBACK statements that have been attempted

COMMIT Statements

ROLLBACK Statements

Automatic ROLLBACKs caused by error situations or deadlocks are not included. Total number of times that applications or connections waited for locks Total elapsed time in milliseconds waited for a lock Total number of deadlocks that have occurred Number of times that locks have been escalated from several row locks to a table lock Number of times that locks have been escalated from several row locks to one exclusive table lock, or the number of times an exclusive lock on a row caused the table lock to become an exclusive lock

Lock Waits Lock Wait Time (ms) Deadlocks Lock Escalations

Exclusive Lock Escalations

If you choose Total Day in the Workload field in the Selection area, the total workload of the relevant day is displayed. The value displayed is calculated using formula maximum value minimum value. Database restarts are taken into consideration. If you choose Peak in the Workload field in the Selection area, the maximum of all measured values is displayed. You can display details for a specific day by clicking a field or selecting a row. A detail area appears with the following tab pages: Snapshot The measured values of the selected day are displayed.

September 2011

123

4 Performance

Interval The delta values of the measurements, which are provided under Snapshot, are displayed. If you select a particular day, snapshots of the database activity are displayed in a two-hour cycle. Note If the database is restarted during one day, the interval displayed after the restart does not equal the delta of two measurements because the counter was reset during the restart. In this case, the absolute value of the last measurement is displayed. End of the note.

4.9 History: Tables


Caution For DB2 V9.5 and DB2 V9.7, this screen has been deprecated and replaced by the enhanced table snapshot [page 91]. End of the caution. History data is only available if you have selected Collect History Data when configuring your database for remote monitoring. For more information, see Configuration of Systems for Remote Monitoring [page 22]. The system provides a day-by-day trend analysis of table activity. You can access the History: Tables screen by calling the DBA Cockpit and choosing Performance History Tables in the navigation frame of the SAP GUI-based user interface of the DBA Cockpit. An overview of the monitored days is displayed: Column Table Schema Table Name Partition Rows Written Rows Read Description Name of the schema to which the table belongs Name of the table Partition number Number of rows written Number of rows read

124

September 2011

4 Performance

Number of read accesses to tables that resulted in overflow pages, that is, to records that were swapped from their original page. Overflow Accesses Note If there is a high number of overflow accesses in comparison to total read accesses, the table is a candidate for reorganization. End of the note. Page REORGs Note If you want to display history data that is cumulated by day, week, or month, choose the relevant option from the dropdown list in the Statistics field in the Selection area. End of the note. Number of internal page reorganizations during INSERT operations

September 2011

125

5 Space

5 Space
The following sections provide information about the main task areas that are available under Space on the Database tab page of the DBA Cockpit: Overview Automatic Storage Database Tablespaces Containers File Systems Tables and Indexes Single Table Analysis

5.1 Space: Overview


Note This function is only available if you have selected Collect Space and Performance History Data when you configured your database for remote monitoring. For more information, see Configuring Systems for Remote Monitoring Manually [page 23]. End of the note. You can access general information about space for your database by calling the DBA Cockpit and choosing Space Overview on the Database tab page of the DBA Cockpit. On the Overview screen, the following tab pages are available: Databases and Tablespaces Tables and Indexes

Databases and Tablespaces


Field Tablespaces Last Analysis Total Number Total Size Free Space Date and time of the last analysis Total number of tablespaces in the database Total size of all tablespaces in KB Free space in all tablespaces in KB Description

126

September 2011

5 Space

Field Used Space Minimum Free Space in a Tablespace Maximum Used Space in a Tablespace Database Partitions

Description Used space of all tablespaces as a percentage Free space of the tablespace with the lowest amount of free space in KB Used space of the tablespace with the highest fill level as a percentage

Number of database partitions Total Number The value displayed is only higher than 1 if you are using a multi-partition database.

Tables and Indexes


Field Last Analysis Total Number of Tables Total Size of Tables Total Number of Indexes Total Size of Indexes Oldest REORG Check Description Date and time of the last analysis Total number of tables defined in the database Total amount of used space of all tables defined in the database Total number of indexes defined in the database Total amount of used space of all indexes defined in the database Date and time of the oldest execution of the job REORGCHK for All Tables Date and time of the latest execution of the job REORGCHK for All Tables

Latest REORG Check

The job to collect the database and tablespace history and the job to collect the history of tables and indexes are triggered by the standard performance collector job SAP_COLLECTOR_FOR_PERFMONITOR. You can display the schedule of these two jobs in the DBA Planning Calendar by choosing Jobs DBA Planning Calendar on the Database tab page of the DBA Cockpit. From the Category dropdown list, you choose DB Collectors. The default setting is All Actions. Caution Calculating table values with outdated statistics can result in inaccurate values. To calculate update statistics including the calculation of table sizes, use the DBA Planning Calendar [page 234]. End of the caution.

September 2011

127

5 Space

5.2 Space: Automatic Storage


Note For database releases up to and including DB2 V9.5, this function is only available if you enabled your database for automatic storage management during the SAP system installation. End of the note. You can access information about automatic storage file systems of the database by calling the DBA Cockpit and choosing Space Automatic Storage on the Database tab page of the DBA Cockpit. The Automatic Storage screen appears displaying all the storage paths that are available for the storage management of the database. For each storage path, the following information is displayed: Column Partition Storage Path FS ID FS Free Size (GB) FS Total Size (GB) Description Number of database partition Full path name ID of the related file system Free size in GB that is available in the file system Total size in GB that is available in the file system State of the path The following values are possible: State Not in Use In Use DROP Pending

Maintaining the List of Storage Paths


If you want to add or delete a storage path, choose the Change pushbutton. The list layout changes and only the information about Partition and Storage Path is displayed. You can do one of the following: Add one or more storage path(s) as follows: 1. Choose the Add pushbutton. For each storage path to be added, enter the complete name and press Enter. 2. Choose the Execute pushbutton.

128

September 2011

5 Space

Delete a storage path as follows: 1. Select a storage path and choose the Delete pushbutton. 2. Choose the Execute pushbutton. Note Up to and including DB2 V9.5, you can only delete rows that you had previously added. End of the note. In the Generated SQL Statement area, all the generated SQL statements to be executed are displayed. This area is automatically filled and refreshed as soon as you apply changes to the storage path list. To switch back to display mode, choose the Display pushbutton. Note As of DB2 V9.7, you can enable a database, which was originally created without automatic storage, for automatic storage management by adding storage paths on the Automatic Storage screen. This means that after having created the storage path(s), you can convert nonautomatic storage tablespaces to automatic storage tablespaces as described in Space: Tablespaces [page 131]. End of the note.

5.3 Space: Database


You can access information about space consumption of your database by calling the DBA Cockpit and choosing Space Database on the Database tab page of the DBA Cockpit. Monitoring the space that is consumed by the database does not only require that you check the current space consumption but also that you consider the progress of the space growth to answer questions such as the following: Is data continuously growing and is it predictable that the database runs out of space? Did archiving operations or reorganizations successfully reduce the space consumption? Can I identify any short-term growth that is related to specific activities of an application, such as client copy or mass inserts of data to BW? Note To monitor data on the Database screen, you have to make sure that the data collector framework (DCF) is set up correctly. If the DCF is not available or wrongly set up, a warning is displayed including a link to the Collector Configuration screen where you can perform the required steps. For more information, see Data Collection Framework: Collector Configuration [page 227]. End of the note.

September 2011

129

5 Space

Features
The Database screen provides the following: A selection area where you specify filter criteria for the monitoring data An overview table displaying the retrieved monitoring data and providing the space consumption at the end of the selected time period An option to break down all history data that was collected for the selected monitoring data during the specified time frame

Process
To analyze the data provided on this screen, you proceed as follows: 1. You identify the time period where you expect major changes in space consumption. 2. In the Selection area, you specify the appropriate time frame. 3. In case of a multi partitioned system, you can do one of the following: o o To retrieve a general snapshot, you set the partition selection to All and you do not drill down by partitions or tablespaces. To retrieve a more detailed snapshot, you drill down the selection by partition or by tablespace. Note If you want to drill drown by tablespace, you can restrict the result set by limiting it to special tablespaces. End of the note. 4. To refresh the monitoring data, you choose the Apply Selection pushbutton. 5. To display detailed history data, you select a line in the overview table. The data is displayed in the History Details content area. 6. To isolate the time frame during which the problem occurred and to analyze the space growth in more detail, you use the data displayed in the History Details content area.

130

September 2011

5 Space

5.4 Space: Tablespaces


You can access information about space for tablespaces by calling the DBA Cockpit and choosing Space Tablespaces on the Database tab page of the DBA Cockpit. During the installation of your SAP system, you specified one of the following options for the maintenance of tablespaces: Automatic Storage DB2 automatically allocates and extends tablespace containers in the file system. DMS/SMS Tablespaces You manually allocate containers for tablespaces. The extension of the corresponding containers can be performed either manually or automatically. Depending on your choice, the corresponding tab page is available on the Tablespaces screen.

Automatic Storage Tablespaces


If your database is enabled for automatic storage management, the following information is displayed about all tablespaces that are part of automatic storage management: Column Tablespace Name Partition Contents TS State KB Total Page Size No. Containers KB Free High-Water Mark (KB) Percent Used Name of the tablespace Number of the database partition (only displayed in a multi partition database) Contents of tablespace, for example, any data or temporary data Status of tablespace, for example, Normal or Load Pending Total space in KB used by the tablespace Size of a page in bytes Number of containers Total amount of free space Indicates the maximum value of used pages reached Used space in relation to available space Description

Pending Free Pages Number of free pages that are pending

September 2011

131

5 Space

DMS/SMS Tablespaces
Regardless whether you have chosen automatic storage management tablespaces or manual maintenance of DMS/SMS tablespaces during the SAP system installation, the following information is displayed for all DMS/SMS tablespaces that are maintained manually: Column Tablespace Name Partition TS Type Contents TS State KB Total Page Size No. Containers KB Free Name of the tablespace Number of the partition (only displayed in a multi partition database) Type of tablespace, for example, DMS or SMS Contents of tablespace, for example, any data or temporary data Status of tablespace, for example, Normal or Load Pending Total space in KB used by the tablespace Size of a page in bytes Number of containers Total amount of free space Description

High-Water Mark (KB) Indicates the maximum value of used pages reached Percent Used AUTORESIZE Pending Free Pages Used space in relation to the available space Indicates if the tablespace is enabled for automatic resizing Number of free pages that are pending

Displaying Technical Details of a Tablespace


Note The following information applies to automatic storage management and DMS/SMS tablespaces. End of the note. To display detail information about the tables or indexes of a tablespace, choose a line in the overview table. In the Tablespace Details area of the Tablespaces screen, the following tab pages are displayed: Technical Settings Storage Parameters Containers

132

September 2011

5 Space

In addition, the following information is displayed for each selected tablespace: Field Tablespace Maintenance Name Name of the tablespace Name of the partition group where the selected tablespace is defined A partition group defines a set of partitions. Space Total space in KB Total This information is not displayed when creating tablespaces. Fill level of the selected tablespace as a percentage Used This information is not displayed when creating tablespaces. Free space in KB Free This information is not displayed when creating tablespaces. Description

Database Partition Group

Technical Settings
The following information is displayed on the Technical Settings tab page: Field Description Describes the type of data that is stored in the tablespace, for example, regular data, large objects, temporary user objects, or temporary system objects Displays the page and extent size in KB, and the number of pages to be prefetched Displays if the space of the tablespace containers is managed by, for example, the database (DMS), the file system (SMS), or automatic storage management Space Management by Note If the AUTORESIZE Enabled checkbox is selected, tablespace containers are automatically extended using the file systems where the containers are located. If you are using automatic storage tablespaces, the AUTORESIZE Enabled checkbox is selected by default and cannot be deselected.

Contents

Size of I/O Units

September 2011

133

5 Space

Field

Description If the Reclaimable Storage Enabled checkbox is selected, the tablespace is enabled for reclaimable storage. This means that unused extents can be released to the system for reuse. Tablespaces that have been created with DB2 V9.7 or higher do have this property. End of the note. Displays information about disk performance, such as: Overhead Displays I/O controller overhead and disk seek and latency time in milliseconds. This value is used to determine the cost of I/O during query optimization. Transfer Rate Time to read one page into memory in milliseconds. This value is used to determine the cost of I/O during query optimization. File System Caching

Disk Performance

The value displayed indicates the use of file system caching as follows: o YES File system caching has been explicitly enabled using the FILE SYSTEM CACHING clause of the CREATE or ALTER TABLESPACE statement. o NO File system caching has been explicitly disabled using the FILE SYSTEM CACHING clause of the CREATE or ALTER TABLESPACE statement. o OS No explicit file system caching clause has been specified. Therefore, the default of the file system is used.

Recovery

Dropped tables in the specified tablespace may be recovered using the RECOVER TABLE ON option of the ROLLFORWARD command. By default, the buffer pools are displayed that match the page size of the tablespace. If required, you can add a new buffer pool. For more information, see Maintaining Buffer Pools [page 199].

Buffer Pool

For more information about technical settings, see the IBM documentation SQL Reference.

134

September 2011

5 Space

Storage Parameters
For tablespaces that are completely managed by automatic storage management or that have at least AUTORESIZE enabled, the following values are displayed on the Storage Parameters tab page: Field Settings Initial Size Size Current Size Last Resize Displays the current size Date and time of last automatic resize operation Date and time when the automatic resize operation failed Note Last Resize Terminated with SQL Error This field only appears if the last automatic resize operation failed. End of the note. The SQL error is displayed in the lower half of the Tablespaces screen. Initial space allocated when a tablespace is created Description

Containers
This tab page provides information about the containers of the selected tablespace.

Displaying the Content of a Tablespace


To display detail information about the tables or indexes of a tablespace, select a line in the overview table and choose the Contents pushbutton. The following information is displayed in the Tables of a Tablespace content detail area: Column Tablespace Name Schema Name Type Name of the tablespace Name of the schema Name of the table or index Type of object, for example, index, primary index, or table Description

September 2011

135

5 Space

Maintaining Tablespaces
You can maintain tablespaces, for example, Change, Add, or Delete tablespaces. For more information, see Maintaining Tablespaces.

5.4.1 Maintaining Tablespaces


Using the tablespace list on the Tablespace screen, you can maintain tablespaces as follows: Change tablespace and container settings Add new tablespaces Delete tablespaces As of DB2 V9.1, you can convert a regular tablespace to tablespace of type LARGE As of DB2 V9.7, you can start and stop the reduction of the high-water mark as well as rebalance the tablespace.

Changing a Tablespace
1. On the Tablespace screen, select a tablespace and choose the Change pushbutton. The Change Tablespace dialog box appears where you can change the following settings: Field Technical Settings Prefetch Size Number of pages to be prefetched I/O controller overhead and disk seek and latency time in milliseconds Overhead You can use this value to determine the cost of I/O during query optimization. Time to read one page in milliseconds Transfer Rate You can use this value to determine the cost of I/O during query optimization. Name of the allocated buffer pool Note Buffer Pool You can enter only buffer pools that match the page size of the tablespace. End of the note. Description

136

September 2011

5 Space

You can activate or deactivate file system caching. Note File System Caching As long as neither the FILE SYSTEM CACHING nor the NO FILE SYSTEM CACHING clause has been specified, the default caching options of the underlying file system type are used. The first use of any of these options explicitly sets this value. You cannot fall back to the default behavior. End of the note. Dropped Tables Storage Parameters AUTORESIZE Enabled Enable this option if you want to allow DB2 to automatically enlarge tablespace containers using the file system where the containers are located. You can enter one of the following values: o NONE There is no maximum size limit. In this case, you allow DB2 to extend containers until they occupy all file systems where the containers are located o Maximum Size An absolute value in KB This value defines an upper threshold that shall not be exceeded by automatic extensions Note This field is valid only if the AUTORESIZE Enabled option is selected. End of the note. Size in KB or in percent by which the tablespace is extended if it has become full You can specify an absolute value in KB or a relative percentage. Increase Size Note This field is valid only if the AUTORESIZE Enabled option is selected. End of the note. Selecting this checkbox enables to you recover dropped tables using the RECOVER TABLE ON option of the ROLLFORWARD command.

September 2011

137

5 Space

If a tablespace is not managed by automatic storage management, you can add or delete containers as follows: o To add containers, choose the Add Container pushbutton. The system automatically suggests a default path where the container is located. However, you can modify that path by manually editing the line. Caution Adding or changing containers might result in rebalancing, which has a heavy impact on system performance. Containers (Optionally available) End of the caution. At least one container must be available for each partition. If you are using a multi partition database, you need to add containers for all partitions of the corresponding partition group. If you have to change container sizes, we recommend that you enter an appropriate value in the Resize all containers to field to ensure a balanced distribution of data on the different containers. Caution Different container sizes might result in bad performance of the database. End of the caution. o To delete containers, select one or more lines in the table and choose Delete.

2. To confirm your entries, choose the Execute pushbutton.

Adding a Tablespace
1. On the Tablespace screen, choose the Add pushbutton. 2. In the Add Tablespace dialog box, specify a name and a partition group. Recommendation We recommend that you use uppercase letters for the tablespace name. Using lowercase letters or special characters makes accessing the selected tablespace with the DB2 command line processor less comfortable. End of the recommendation. 3. Enter the technical settings. By default, the system displays SAP's recommendations. 4. Add containers. If you are using a multi partition database, you must add containers for all partitions of the corresponding database partition group.

138

September 2011

5 Space

Caution This step does not apply to tablespaces managed by automatic storage management. End of the caution. 5. To confirm your entries, choose the Execute pushbutton.

Deleting a Tablespace
On the Tablespace screen, select a tablespace and choose the Delete pushbutton. Caution You cannot delete tablespaces that are still used by the SAP system, that is, if they are related to some data class. You must delete the data class before deleting the tablespace. End of the caution.

Converting a Regular Tablespace to LARGE


By default, DB2 V9.1 uses large object tablespaces. If you upgraded your database from DB2 UDB Version 8 to DB2 V9.1, you can convert your regular tablespaces to large object tablespaces. To do so, select a tablespace in the overview table of the Tablespace screen and choose the Convert to Large pushbutton. After having confirmed the conversion, the conversion job is scheduled as a background job in the DBA Planning Calendar.

Reducing the High-Water Mark (HWM) of a Tablespace


After major table reorganizations or deleting and archiving operations, free space in a tablespace is not necessarily released directly to the file system. To release free space, you can lower the high-water mark as follows: 1. On the Tablespace screen, select a line in the overview table and choose the Reduce HWM pushbutton. 2. In the Reduce High-Water Mark dialog box, you can do one of the following: o o To have DB2 automatically determine the minimum size that can be reached, choose the Reduce Until Minimum radio button. To manually specify the size of the free space of a tablespace to be released, choose the Reduce radio button. By default, the unit of reduction is KB. You can, however, switch to MB, GB or to %. 3. Choose the Execute pushbutton. The reduction process starts asynchronously in the background. To monitor the progress of reduction, you can check the TS State column in the overview table. If the column shows the value High-water mark reduction in progress, select the column to see a detail view of the reduction progress.

September 2011

139

5 Space

Stopping the High-Water Mark Reduction


To stop an ongoing high-water mark reduction, select the appropriate tablespace in the overview table of the Tablespace screen and choose the Stop HWM pushbutton.

Rebalancing a Tablespace
Regular and large tablespaces that are managed by automatic storage management have to be rebalanced if the following applies: You created new containers on recently added storage paths. A container and its content has to be distributed to the remaining containers. If a database was converted to automatic storage by adding storage paths, the tablespaces still reside in the old containers and do not yet have containers in the automatic storage database. For the first two cases, the rebalancing process is automatically started. If a database was converted to automatic storage, however, you have to manually start the rebalancing process by selecting a tablespace in the overview table and choosing the Rebalance pushbutton. After the rebalancing process has been started, data is moved from the containers of the dropped storage paths to the containers on new storage paths. The rebalancing process runs asynchronously in the background and does not affect the availability of data. To monitor the rebalancing process, check the TS State column in the overview table. If this column shows any of the values Reverse Rebalance, Forward Rebalance or DMS rebalancer is active, select the TS State column to see a detail view of the rebalancing progress. For each partition, the following data is displayed: Column Partition Tablespace Name Partition number Name of the tablespace The rebalancer mode can be one the following No Rebalance The rebalancer process has finished on this partition. Reverse Rebalance Mode Data movement starts at the high-water mark extent and moves in reverse order through the tablespace, ending with the first extent in the tablespace. Forward Rebalance Data movement starts with the first extent in the tablespace and ends with the high-water mark extent. Description

140

September 2011

5 Space

Extents Processed Extents Remaining Last Extent Moved Priority Restart Time Start Time Progress (%)

Number of tablespace extents that have already been moved to the new location Number of tablespace extents that still need to be moved

Number of the last extent that was moved Priority with which the rebalancing process is running in the database Time when the rebalancing process was restarted after it had been paused or stopped Time when the rebalancing process was first started Displays the progress of the reduction process in percent

More Information
Configuration: Data Classes [page 224]

5.5 Space: Containers


You can access information on containers by calling the DBA Cockpit and choosing Containers on the Database tab page frame of the DBA Cockpit. The following information is displayed on the Containers screen: Column Tablespace Name Partition Stripe Set Container Name Type KB Total Pages Total Accessible FS ID FS Free Size (KB) Name of the tablespace Number of the partition (only displayed in a multi-partition database) Number of the strip set the container belongs to Name of the container in which the tablespace is located Type of the container, for example, disk or file Total size of the container in KB Total amount of pages Indicates whether the container is accessible (YES) or not (NO) File system ID Free space in the file system in KB Description Space

September 2011

141

5 Space

To display detail information about a container, choose a line in the overview table. For more information, see Space: Tablespaces [page 131].

Maintaining Containers
You can maintain tablespace containers by selecting a line in the table on the Container screen and choosing the Change, Add, or Delete pushbutton. For more information about how to maintain container settings, see Maintaining Tablespaces [page 136].

5.6 Space: File Systems


Note This function is not available for systems that are monitored using a remote database connection. End of the note. You can access information about file systems by calling the DBA Cockpit and choosing Space File Systems on the Database tab page of the DBA Cockpit. The information displayed on the File Systems screen helps you to determine how much free space is available in your file systems to extend tablespaces. For DB2 UDB Version 8.2 up to and including DB2 V9.1 Fix Pack 5, the following information is displayed: Column Partition Description Number of the partition (only displayed if you are using a multi- partition database) Name of the file system Both local and NFS file systems are displayed. Total size of the file system in KB Total amount used of the file system in KB Used percentage of total size of the file system Total amount free of the file system in KB Free percentage of total size of the file system in KB Number of inodes used Inodes Used Inodes are needed to save files in the file system. For each directory of files, a minimum of one inode is used.

File System Name KB Total KB Used Percentage Used KB Free Percentage Free

142

September 2011

5 Space

Inodes Used (%)

Percentage of inodes used

As of DB2 V9.1 Fix Pack 6, the following information is displayed: Column Partition Mount Point KB Total KB Used Percentage Used KB Free Description Number of the partition (only displayed if you are using a multi partition database) Location in the OS directory structure where the file system appears Total size of the file system in KB Total amount used of the file system in KB Used percentage of total size of the file system Total amount free of the file system in KB

Percentage Free Free percentage of total size of the file system in KB File System Type Device Name Block Size File system type Name of the device Block size of the file system

September 2011

143

5 Space

5.7 Space: Tables and Indexes


You can access data about tables and indexes by calling the DBA Cockpit and choosing Space Tables and Indexes <Option> on the Database tab page of the DBA Cockpit. To analyze space with regard to tables and indexes, you have to ask yourself the following questions: Which are the largest table and indexes in the system? Which tables and indexes do I need to reorganize regarding space reclaim and performance degradation? How can I save space using DB2 or SAP-specific compression features? To answer these questions, you have to collect the appropriate data about tables first. Typically, there are several thousands of tables in an SAP system environment. For performance reasons, you cannot analyze data that is retrieved on demand. Therefore, data is continuously collected by background jobs of the data collection framework (DCF), which allows a fast evaluation of not only current data but also of history data. Note If the DCF is not set up properly, data cannot be evaluated. End of the note.

Features
The following subset of task areas is available: Top Space Consumers You can use the information on this screen to identify the top space consumers in your database for a specified time period. REORG Candidates You can use the information on this screen to identify tables that have been recommended for a reorganization. Compression Status You can use the information on this screen to check the compression status of a table or if a table is a suitable candidate for compression. Virtual tables You can use the information on this screen to check whether or not a table can be virtualized or materialized to save space. Indexes You can use the information on this screen to obtain an overview of all indexes in your database.

144

September 2011

5 Space

5.7.1 Tables and Indexes: Top Space Consumers


On the Top Space Consumers screen, you can access information about the largest tables of your database. Note The Top Space Consumers screen requires the data collection framework (DCF) to be set up correctly. If the DCF is not available or wrongly set up, an appropriate warning is displayed including a link to the Collector Configuration screen where you can perform the required steps. For more information, see Data Collection Framework: Collector Configuration [page 227]. End of the note.

Features
The Top Space Consumers screen provides the following: A selection area where you specify filter criteria for the collected data An overview table displaying the retrieved history data This overview table also includes a subset of space-relevant data reflecting the last set of values that was collected during the selected time period. An option to break down all history data that was collected for the selected monitoring data during the specified time frame.

Process
To be able to analyze the space situation in your database, you proceed as follows: 1. You identify the time period where you expected a major impact on space consumption of your tables, for example: o o o Time periods with archiving and REORG activities Mass-processing of application data Installation of new application functions

2. In the Selection area, you specify the appropriate time frame. Note If you are using a multi partition database system and you want to retrieve a general snapshot, you set the partition selection to All and you do not filter by partition. To retrieve a more detailed snapshot, you can drill down the selection by partitions. If a single partition or a subset of partitions shows deviations compared to other members, you can also restrict the partition selection. Deviations are usually an indication for a bad partitioning key. End of the note. 3. To refresh the result set, you choose the Apply Selection pushbutton.

September 2011

145

5 Space

4. To display detail information about the growth of a table over time, you select the appropriate entry in the overview table. The data is displayed in the History Details area. 5. To display further details of the selected table, you select a line in the overview table and choose the Detailed Table Analysis pushbutton. You are directed to the Space Single Table Analysis screen. For more information about the data provided on the Single Table Analysis screen and how to evaluate it, see Analyzing and Maintaining a Single Table [page 154].

5.7.2 Tables and Indexes: REORG Candidates


On the REORG Candidates screen, you can access information about tables that the REORGCHK tool recommends to be reorganized. Note By default, all tables with REORG recommendations are displayed. You can, however,filter the data to be displayed by specifying the schema name and the table name. End of the note. The following information is displayed on the REORG Candidates screen: Column Schema Name Table Name Name of the table schema Name of the table Total table size Total Table Size This value is the summary of all DATA, LONG, LOB, and XML pages over all database partitions Total size of all indexes over all database partitions Description

Log. Index Size

REORG Table Indicates if a table reorganization is required. REORG Index Indicates if only an index reorganization is required. Check Date Check Time Date of last REORGCHK Time of last REORGCHK

146

September 2011

5 Space

5.7.3 Tables and Indexes: Compression Status


The Compression Status screen provides information about tables that are already compressed, or that are candidates for compression. The following tab pages are available on the Compression Status screen: Compressed Tables Displays all tables that are already compressed Compression Candidates Displays all tables where space could be saved by using compression Note As of DB2 V9.7, index compression is available and supported by the DBA Cockpit. End of the note.

Compressed Tables
On this tab page, all tables meeting at least one of the following requirements are displayed: The table is enabled for data compression and contains compressed records. The indexes of a table are enabled for index compression and are compressed. Column Table Schema Table Name Data Compression Index Compression Name of the table schema Name of the table If the table is enabled for data compression, this checkbox is selected. If the index of the selected table is enabled for index compression, this checkbox is selected. Total savings of space Savings (MB) This includes all savings regardless, whether they are caused by data or index compression Total size of the table Total Size The value displayed is the sum of DATA, LONG, LOB, XML, and index pages over all database partitions, Percentage of savings Description

Savings (%)

Last Check Date Last check date

September 2011

147

5 Space

Column Last Check Time Last check time

Description

Compression Candidates
On this tab page, tables that meet at least one of the following requirements are displayed: A table has already been compressed but more space could be saved by recompressing it based on a better compression dictionary. A table has been enabled for data compression but still contains compressed records that are not yet compressed. A table whose indexes are not yet enabled for index compression A table whose indexes are compressed but more space could be saved by recompressing the table Column Table Schema Table Name Name of the table schema Name of the table Description

Data Compression If row compression is enabled, this option is selected. Index Compression If index compression is enabled, this option is selected. Total savings of space that can be achieved This includes all savings regardless, whether they are caused by data or Estimated Savings index compression. (MB) If the table has already been compressed, then the value displayed does not represent the new total savings but the additional savings. Total Size Total size of table if the compression would be performed

Estimated Savings Percentage of estimated (additional) savings (%) Last Check Date Last Check Time Last check date Last check time

148

September 2011

5 Space

Displaying Details About the Compression Status of a Table


You can display details about the compression status of a table by choosing a line in the overview table. Note The compression results are based on checks that have been performed before in the background. These checks evaluate statistics data that was gathered by the RUNSTATS utility. In case of missing or incomplete statistics data, the calculated check results can be inaccurate. In this case, an appropriate message is displayed. To display more details, choose Show more details. You are redirected to the Single Table Analysis screen where you can do further analysis. For more information, see Analyzing and Maintaining a Single Table [page 154]. End of the note. The following information is displayed in the Compression Status Details detail area: Field Summary Schema Name Table Name Total Size Total Table Size Total Index Size Data Compression Index Compression Current Savings Total Total amount of savings in KB for this table (including indexes) Name of database schema Name of the table Total size in KB of the table (including indexes) Total size in KB of the table Total size in KB of the index If this checkbox is selected, data in this table is compressed If this checkbox is selected, the index of this table is compressed Description

Total Compression Ratio Total compression ratio in percent for this table Data Total amount of savings in KB for the data of this table

Data Compression Ratio Total compression ratio in percent for the data of this table Index Total amount of savings for all indexes of this table

September 2011

149

5 Space

Index Compression Ratio Estimated Savings Total Total Compression Ratio Data Data Compression Ratio Index Index Compression Ratio Additional Savings after Compression Check Date Check Time

Total compression ratio in percent for all indexes of this table

Total amount of estimated savings in KB of this table (including indexes) Estimated total compression ratio in percent Amount of estimated savings of data in KB Estimated data compression ratio in percent Amount of estimated savings in KB for all indexes Estimated index compression ration Total amount of savings in KB if the table would be compressed again Date when table was last checked Time when table was last checked

Scheduling a Compression Job


To implement the estimated space savings, the affected tables need to be reorganized as follows: 1. On the Compression Candidates tab page, select all tables that you want to compress and choose the Compress pushbutton. 2. In the Schedule Job dialog box, you specify when you want the compression job to run: o o To run the job immediately, choose the Start Immediately in the Background radio button. To schedule the job at a certain day and time, choose the Schedule radio button and specify an appropriate date and time.

3. To schedule the compression job, choose OK. The appropriate REORG jobs are scheduled in the DBA Planning Calendar where you can view the progress of the compression job. Note Depending on the required actions to perform the compression, there can be separate REORG jobs for table and for indexes. End of the note.

150

September 2011

5 Space

Refreshing the Compression Status


Since compression information is not collected by the data collection framework (DCF) on a regular basis because of performance reasons, you must run compression checks manually as follows: 1. On the Compression Status screen, choose the Start Compression Check pushbutton. 2. In the Schedule Compression Check dialog box, you specify when you want the compression check job to run: o o To run the job immediately, choose the Start Immediately in the Background radio button. To schedule the job at a certain day and time, choose the Schedule radio button and specify an appropriate date and time.

3. To schedule the compression job, choose OK. A job is scheduled in the DB2 administrative task scheduler (ATS). You can view view the progress of the compression check job either under Jobs Scheduled DB Tasks or in the DBA Planning Calendar where you choose DB Collectors from the Category dropdown list.

5.7.4 Tables and Indexes: Virtual Tables


An SAP system contains thousands of empty tables consuming a lot of space in the DB2 tablespaces. These empty tables also generate an additional load on database administration tasks and autonomic features, for example, automatic RUNSTATS and automatic REORG. Each empty table uses: One EMP extent One data extent Two extents for the index object One page for each index Two extents for LONG field object Four extents for LOB object An empty table with a primary key requires 5 to 11 extents, which translates into 160 KB to 352 KB on a tablespace with a page size of 16 KB and with an extent size of 2. To save this unnecessary allocated space, you can replace these empty tables with views, which are called virtual tables in this context. On the first WRITE operation on such a virtual table, this virtual table is automatically replaced with a table by the SAP system. On the Virtual Tables screen, the following tab pages are available: Virtual Tables Contains a list of all virtual tables that exist in your SAP system. To materialize a single or multiple tables, select one or more tables and choose the Materialize pushbutton.

September 2011

151

5 Space

Candidates for Virtualization Displays a list of tables that are candidates for being dropped and re-created as virtual tables. If you choose the Convert Empty Tables pushbutton, a background job is scheduled that checks each table for the following: o o o o Whether it is empty Whether it is not volatile Whether it does not have a partitioning key Whether it does not use MDC tables

Tables that meet these conditions are dropped and re-created as virtual tables. Note The use of virtual tables is transparent to the ABAP Dictionary. End of the note. Caution Before you drop tables and re-create them as virtual tables, make sure that you have read SAP Note 1151343. End of the caution.

5.7.5 Tables and Indexes: Indexes


On the Indexes screen, you can access information about all indexes in your database. Note To use the Indexes screen, the data collection framework (DCF) must be set up correctly. If the DCF is not available or not set up correctly, a warning is displayed including a link to the Collector Configuration screen where you can perform the necessary steps. For more information, see Data Collection Framework: Collector Configuration [page 227]. End of the note. The Indexes screen provides the following: A Selection area where you specify a time frame and filter criteria for the collected data In the Sort Tables by field, you can choose if the indexes are sorted by size or by last used date. An overview table displaying the retrieved history data according to your selection criteria

152

September 2011

5 Space

In the overview table, the following information is displayed: Column Index Schema Index Name Table Schema Table Name Number of Leaves Cardinality Est. Phys. Index Size (KB) Est. Log. Index Size (KB) Last Used Description Name of the index schema Name of the index Name of the table schema Name of the table Number of leaves in the index Cardinality of the index Estimated physical index size in KB Estimated logical index size in KB Date when the index was last used

September 2011

153

5 Space

5.8 Analyzing and Maintaining a Single Table


By analyzing and maintaining single tables, you can optimize tables and indexes to: Save disk space by releasing unused space or by activating the DB2 compression features Improve access to a table by keeping statistics up-to-date or by reorganizing fragmented tables or indexes You can access detailed information about a single table and maintain table statistics by calling the DBA Cockpit and choosing Space Single Table Analysis on the Database tab page of the DBA Cockpit.

Features
The Single Table Analysis screen provides the following areas: A selection area, where you specify the schema and name of the table to be analyzed A summary area that provides an extract of important key figures and status information of the specified table Tab pages with detail information that is relevant for tables or indexes In the summary area, the following information is displayed: Field Size Total table size Total Table Size This is the summary of all DATA, LONG, LOB, and XML pages over all database partitions Total size of all indexes over all database partitions Number of indexes defined on the selected table Description

Total Index Size Number of Indexes Administrative Actions

154

September 2011

5 Space

Status of the statistics The following values are possible: Statistics available RUNSTATS Status No Statistics available VOLATILE Table Without Statistics Unwanted Statistics for VOLATILE Table REORG Status Indicates whether and how a REORG should be performed Indicates whether and how the table is compressed Note A table or index is assumed to be compressed if the following applies: Compression Status In the system catalog, the table or index is enabled for compression. The data or index pages have been compressed by performing an appropriate reorganization. End of the note. Savings by Compression Note The following fields are only relevant if the compression status is accordingly. That is, if the Compression Status tab page displays that a table or at least its index is compressed. End of the note. Current percentage of all savings for row and index compression compared to the total size of all DATA, LONG,LOB, XML, and index objects

Current Compression Ratio

September 2011

155

5 Space

Current total savings of space Current Savings This value includes all savings regardless whether they were caused by data or index compression. Compression ratio that would be reached after compression Estimated Compression Ratio Note This value is only displayed if a compression check has already been performed. End of the note. Estimated Savings Additional Savings after Compression Savings that would be reached after a compression Additional savings after compression for tables that have already been compressed

The following tab pages are available on the Tables and Indexes Details screen providing detail information about tables or indexes: System Catalog Table Structure Indexes This tab page contains an overview list of all indexes and provides integrated tab pages with detail information about, for example, system catalog, structure and status of the index, as well as information about the compression status and REORGCHK. Table Status Compression Status REORGCHK

Activities
To optimize tables and indexes, you can use the following pushbuttons on the Single Table Analysis screen: RUNSTATS Schedules a RUNSTATS job for a single table using the DBA Planning Calendar. For more information, see Updating Statistics [page 249].

156

September 2011

5 Space

Note To decide if statistics are out-of-date, you can check the statistics time. Alternatively, you can count the number of entries in the table by choosing the Count pushbutton to compare the real number of records with the Cardinality field on the System Catalog tab page. End of the note. REORG Schedules a REORG job for the table using the DBA Planning Calendar. For more information, see Reorganizing Tables [page 252]. Compression Check Schedules a job that checks whether a table would benefit from compression Caution The Compression Check job is expensive and can considerably decrease the system performance. We, therefore, recommend that you schedule this job at a time with a low system workload and not in dialog mode. End of the caution. Compression On/Off Switches the compression status of a table or index. Note The term compression is used here as a synonym for both data and index compression. End of the note. The Compression Options dialog box appears displaying the current compression status of the table, that is, if compression is enabled or disabled, and if a compression dictionary exists. Depending on the status, you can choose between the appropriate actions, such as: Action Enable Compression Description Switches the compression attributes for the table and its indexes on

Enable Compression and Switches the compression attributes on and schedules a REORG Run REORG job that compresses the table data and its indexes Run REORG to Remove Schedules a REORG job with the RESET DICTIONARY option for a Dictionary table for which the compression attribute was switched off Disable Compression Switches the compression attributes off

September 2011

157

5 Space

Disable Compression Switches the compression attributes off and schedules an REORG that and Run REORG uncompresses table and index data Schedules a REORG job that rebuilds a dictionary on which compression is based for an already compressed table Run REORG to Rebuild Dictionary This is recommended if a new compression check indicates a better compression ratio or if the compression attributes were switched on but the table had not yet been reorganized.

Schedules a REORG job for a table where the compression attributes Run REORG to Build were switched on but the table and indexes have not yet been Dictionary compressed. Note Before you enable compression, we recommend that you check the possible savings by starting a compression check using the Compression Check pushbutton. End of the note. VOLATILE On/Off Changes the VOLATILE attribute of a table Note If you set the VOLATILE attribute, the table is no longer processed by automatic RUNSTATS. End of the note.

158

September 2011

5 Space

5.8.1 Single Table Analysis: System Catalog


The System Catalog tab page provides the following information that is available from the system catalog entry of the selected table: Field Space Management Data Tablespace Index Tablespace Free Space Reserved Technical Attributes Indicates whether the table is flagged as VOLATILE in the system catalog If the table is flagged as VOLATILE, statistics are not gathered by DB2s automatic RUNSTATS. In addition, statistics data (if available) is not used by the DB2 optimizer. VOLATILE Note Newly created tables and tables that were dropped or re-created during an upgrade or a table conversion are always marked as VOLATILE as long as valid statistics available are not yet available. End of the note. Caution Pooled, Clustered, or Import Table The information displayed only applies to SAP ABAP systems only. End of the caution. Indicates whether the table is defined as a pooled table, a cluster or, an import or export table in the ABAP Dictionary Indicates whether the table has distributed statistics Distribution Statistics If this value is selected, further details about column distribution values are available on the tab page Table Structure. Name of the tablespace where the data pages of the table are stored Name of the tablespace where the index pages of the table are stored Percentage of each page to be reserved for future inserts A value of -1 indicates that the DB2 default value is used. Description

September 2011

159

5 Space

Statistics Data Last RUNSTATS Cardinality Date and time of the RUNSTATS Number of data records in the table Number of rows that have been counted by a SELECT(*) statement Counted Rows This information is only displayed if you choose the Count pushbutton. Deviation of the number of rows provided by RUNSTATS in the system catalog from the number of rows provided by a SELECT COUNT(*) statement This information is only displayed if you choose the Count pushbutton. Number of records that have overflowed Overflow Records Records overflow when a data record is updated and the new data record is larger than the old one, or when a column is added to a table. The percentage of overflow records is used as a decision criteria for REORG (see F1 formula on the REORGCHK tab page) Number of pages containing data Total number of pages in the table If a RUNSTATS was executed using the PROFILE option, this profile is displayed. The profile is the same as the RUNSTATS command that was executed with the SET PROFILE option. Note RUNSTATS Profile If a profiles exists, it is used by automatic RUNSTATS and therefore the resulting statistics can deviate from the default setting for statistics. In addition, if you manually execute a RUNSTATS, you have to make sure that you update statistics by using the profile or by explicitly choosing another type of statistics. End of the note. Compression Value Compression Row Compression Indicates whether value compression is enabled for the table Indicates whether the table is enabled for row compression

Deviation

No. of Pages With Data: Total Number of Pages

160

September 2011

5 Space

Average Length of Compressed Rows Average Compression Ratio by Row

Average length of compressed records in bytes

Average compression ratio by row

Average Length of Compressed and Average length of all rows (compressed and uncompressed) in Uncompressed Rows From bytes Total Number of Rows Percentage of Compressed Compressed rows as a percentage of the total number of rows in Rows From the Total the table Number of Rows Percentage of pages saved by compression Approximate Percentage of Pages Saved Note Only data pages are taken into account. End of the note.

5.8.2 Single Table Analysis: Table Structure


The Table Structure tab page provides the following information: Column DB Column No. DB Column Name DB Type DB Length Description Number of the column in the database Name of the column in the database Data type of the column in the database Length of the column in the database

The following information is only displayed for the local system and if the table is defined as a transparent table in the ABAP Dictionary: Column SAP Column Name SAP Key SAP Type Description

Name of the column defined in the ABAP Dictionary

Column is part of the primary key defined in the ABAP Dictionary. Data type of the column defined in the ABAP Dictionary

SAP Length Length of the column defined in the ABAP Dictionary

September 2011

161

5 Space

Column

Description

If the statistics for the table have been gathered using the WITH DISTRIBUTION option, the following information is displayed: Column Name Name of the column to which the statistics apply If the Type column contains the value F, the value n in this column identifies the nth most frequent value. If the Type column contains the value Q, n in this column identifies the nth quantile value. Data value as a character literal If the Type column contains the value F, this is the number of occurrences of the Value column. If the Type column contains the value Q, this is the number of rows whose value is less than or equal to the value in the Value column. If the Type column contains the value Q, this is the number of distinct values that are less than or equal to the value in the Value column. Specifies how to interpret the displayed values The following values are possible: F Type Indicates the frequency value Q Quantile value

Seq. No

Value Value Count No. of Distinct Values

162

September 2011

5 Space

5.8.3 Single Table Analysis: Indexes


The Indexes tab page provides a list of all indexes that are defined on the table summarizing the following information: Field Index Schema Index Name Name of the index schema Name of the index Rules for index uniqueness The following values are possible: D Permits duplicates Unique Rule U Indicates index uniqueness P Implements the primary key Type of index The following values are possible: BLOK Block index CLUS Clustering index that controls the physical placement of newly inserted rows Index Type DIM Dimension block index REG Regular index XPTH XML path index XRGN XML region index Description

September 2011

163

5 Space

Field XVIL

Description

Index over XML column (logical) XVIP Index over XML column (physical) Statistics Time Date and time of last RUNSTATS

Together with the summary information, there are detail tab pages displaying all information that is related to the currently selected index. By default, the data of the first index is displayed. To view the details of another index, select a table from the list. Note If there is only one index, the summary list does not appear. End of the note.

5.8.3.1 Indexes: System Catalog


The integrated System Catalog detail tab page on the Index tab page provides the following information about the selected index(es): Field Index Name Schema Name of the index Schema of the index, which is usually the user who created the index Type of index Type For more information, see Single Tables Analysis: Indexes [page 163]. Unique Rule Rules for index uniqueness Date when the index was last used by any DML statement or when it was used to enforce referential integrity constraints Last Used Note If the index is used on an HADR standby database, this column is not updated. The default value is 0001-01-01. This value is updated asynchronously. End of the note. Description

164

September 2011

5 Space

Technical Attributes Percentage of free space reserved in the index pages Free Space Reserved This free space is taken into account by the LOAD and REORG utilities of DB2. Note Compression This field is only available as of DB2 V9.7. End of the note. Indicates whether the index is enabled for compression Reverse Scans Supported Statistics Data Last RUNSTATS Date and time of last RUNSTATS Indicates whether the index supports reverse scans

Number of Leaves Number of index leaves Number of Levels Number of index levels Sequential Pages Number of index leaves that are physically located on the hard disk and that are sorted by index without large intervals between them Relative density of the sequential pages as a proportion of the total number of index pages 100% is the optimum value. Degree of index fragmentation Cluster Ratio A value of 100% means no fragmentation and this is the optimal value. Finer measurement of the degree of clustering Cluster Factor If statistics are not collected or if the index is defined on a nickname, a value of -1 is displayed. Cardinality of the index Cardinality This value might be different from the cardinality of the table for indexes that do not have a one-to-one relationship between the table rows and the index entries. Number of different values in the first column of the index

Density

First Key Cardinality

September 2011

165

5 Space

First 2 Key Cardinality First 3 Key Cardinality First 4 Key Cardinality Full Key Cardinality

Number of different values in the first two columns of the index

Number of different values in the first three columns of the index

Number of different values in the first four columns of the index

Number of different values in all columns of the index

5.8.3.2 Indexes: Index Structure


The integrated Index Structure detail tab page on the Index tab page provides the following information: Column Position Description Position of the column in the index Sorting order of the column The following values are possible: A Order Data is sorted in ascending order D Data is sorted in descending order DB Column Number DB Column Name DB Type DB Length Number of the column in the database Name of the column in the database Data type of the column in the database Length of the column in the database

166

September 2011

5 Space

Note The following information is only displayed for the local system and if the table is defined as a transparent table in the ABAP Dictionary: Column SAP Column Name SAP Type SAP Length End of the note. Description Name of the column defined in the ABAP Dictionary Data type of the column defined in the ABAP Dictionary Length of the column defined in the ABAP Dictionary

5.8.3.3 Indexes: Index Status


Note The following information is only available as of DB2 V9.7. End of the note. The integrated Index Status detail tab page on the Index tab page provides the following information: Field Partition Database partition number Note Data Partition ID This field is only available if the related table is using data partitioning. End of the note. Data partition ID State of the COMPRESSION attribute of the index The following values are possible: Yes Compression Attribute Index compression is enabled No Index compression is not enabled Description

September 2011

167

5 Space

Partitioning characteristic of the index The following values are possible: N Index Partitioning Non partitioned index P Partitioned index Blank Index does not reside on a partitioned table. Index Requires Rebuild

Indicates whether the index requires to be rebuilt

Indicates whether the index is using large row IDs (RIDs), that is, 4-byte page number, 2-byte slot number The following values are possible: Yes The index is using large RIDs. Large RIDs No The index is not using large RIDs Pending The table where the index is defined supports large RIDs, that is, the table resides in a large tablespace. The index for the table or data partition, however, has not yet been reorganized or rebuilt. Therefore, the table is still using 4-byte RIDs, and the table or index has to be converted to use large RIDs. Physical index format The following values are possible: Yes Index Compressed Index is in compressed format No Index is in uncompressed format Note

168

September 2011

5 Space

If the physical index format does not match the compression attribute, you have to reorganize the index to convert the index to the defined format. End of the note. Logical Size Physical Size Index ID Note If the index is defined on a table that is partitioned or using data partitioning, the index status is separately available for each partition or data partition. End of the note. Amount of disk space in KB that is logically allocated for the index Amount of disk space in KB that is physically allocated for the index Identifier for the index

5.8.3.4 Indexes: Compression Status


Note This information is only available as of DB2 V9.7. End of the note. The integrated Compression Status detail tab page on the Index tab page provides the following information: Field Partition Database partition number Data partition ID Data Partition ID Note This field is only available if the related table is using data partitioning. End of the note. State of the COMPRESSION attribute on the index Yes Compression Index compression is enabled. No Index compression is not enabled. Partition

September 2011

169

5 Space

Physical index format Yes Index is in compressed format. Index Compressed No Index is in uncompressed format. If the physical index format does not match the compression attribute, an index reorganization is required to convert the index. Note This value is the same for each entry of an index or index partition for each database partition in a DPF environment. End of the note. Saved Pages If the index is not physically compressed (that is, INDEX_COMPRESSED is N), the displayed value represents the estimated percentage of leaf pages saved, as if the index were actually compressed. If the index is physically compressed (that is, INDEX_COMPRESSED is Y), the displayed value reports the PCTPAGESSAVED value from the system catalog view (either SYSCAT.INDEXES or SYSCAT.INDEXPARTITIONS). For more information, see Indexes: System Catalog [page 164].

Note This value is the same for each entry of an index or index partition for each database partition in a DPF environment. End of the note. If the index is not physically compressed (that is, INDEX_COMPRESSED is N), the displayed value represents the estimated number of leaf pages saved as if the index were actually compressed. If the index is physically compressed (that is, INDEX_COMPRESSED is Y), the displayed value reports the calculated number of leaf pages saved. This calculation is based on the PCTPAGESSAVED and NLEAF values from the system catalog view (either SYSCAT.INDEXES or SYSCAT.INDEXPARTITIONS). If either PCTPAGESSAVED or NLEAF are invalid values (-1), this value is also set to -1. For more information, see Indexes: System Catalog [page 164]. Time of Collection Date and time of the last compression check for this index

Saved Leaf Pages

170

September 2011

5 Space

Note If the index is defined on a table that is partitioned or using data partitioning the index status is available for each partition or data partition separately. End of the note.

5.8.3.5 Indexes: REORGCHK


The integrated REORGCHK detail tab page on the Index tab page provides the following information: Field Summary Description Brief description which kind of REORG is recommended according to the recommendations for this index Note Data Partition Name This field is available only if the related table is using data partitioning. End of the note. Name of the data partition F4: Cluster Ratio F5: Index Size / Allocated Space F6: No. Entries / No. Poss. Entries F7: Ratio of Deleted Index Entries F8: Ratio of Deleted Index Leafs Index size divided by allocated space Index size divided by allocated space as a percentage

Number of deleted entries in relation to total entries in index

Number of deleted entries in relation to total entries in index

Number of deleted tree leafs in relation to total tree leafs of index tree

Number of index entries in the index Cardinality For some indexes, this value can be different from table cardinality. For example, the index cardinality on XML columns might be higher than the table cardinality.

Number of PseudoNumber of pseudo-deleted RIDs. Deleted RIDs Note As of DB2 V9.7, the REORGCHK information for indexes of tables with data partitioning is available per data partition. In this case, the data is displayed in list format.

September 2011

171

5 Space

End of the note.

5.8.4 Single Table Analysis: Table Status


The Table Status tab page provides the following information: Field Partition Database partition number Data partition ID Data Partition ID Note This field is only available if the related table is using the data partitioning feature (DPF). End of the note. Physical Size Amount of disk space in KB that is physically allocated for the table Data Objects For tables using multi dimensional clustering (MDC), the value displayed includes the size of the block map object. The displayed value represents the physical size of the base table only. Space that is consumed by LOB data, long data, indexes, and XML objects is reported by other fields as described in the following. Amount of disk space in KB that is physically allocated for long field data in a table Amount of disk space in KB that is physically allocated for long field data in a table Amount of disk space in KB that is physically allocated for XML data in a table Amount of disk space in KB that is physically allocated for the indexes Description

Long Objects

LOB Objects

XML Objects Index Objects Logical Size

Amount of disk space in KB that is logically allocated for the table Data Objects For MDC tables, this size includes the logical size of the block map object. This size represents the logical size of the base table only. Space that is consumed by LOB data, long data, indexes, and XML objects is reported by other fields described in the following. Amount of disk space in KB that is logically allocated for long field data in a table Amount of disk space in KB that is logically allocated for long field data in a table

Long Objects

LOB Objects

172

September 2011

5 Space

Field XML Objects Index Objects REORG

Description Amount of disk space in KB that is logically allocated for XML data in a table Amount of disk space in KB that is logically allocated for the indexes

Current status of an inplace table reorganization on the table The following values are possible: ABORTED The inplace table reorganization has status PAUSED but is unable to resume. A STOP is required. For more information, see Utilities: Inplace Table Reorganization [page 120]. EXECUTING Inplace REORG Status The inplace table reorganization is currently being executed. NULL This value only appears if no inplace reorganization has been performed on the table. PAUSED The inplace table reorganization currently pauses and can be resumed again. For more information, see Utilities: Inplace Table Reorganization [page 120]. Indicates whether a REORG is pending for the table REORG Pending This state is possible for ALTER operations like DROP COLUMNthat require an offline reorganization of the table Number of ALTER operations after which a reorganization is required and that have been performed against this table since the last reorganization For an MDC table in a DMS tablespace, this value indicates the amount of disk space that can be reclaimed by running the REORG command with the RECLAIM option. For any other table, the value is zero. Indexes Require Rebuild

Number of ALTER Operations

Reclaimable MDC Space

Indicates whether an index requires rebuilding

September 2011

173

5 Space

Other Technical Attributes Indicates if a table is using large row IDs (RIDs) (4-byte page number, 2-byte slot number) The following values are possible: YES The table is using large RIDs. Large RIDs NO The table is not using large RIDs. PENDING The table supports large RIDs (that is, the table is in a large tablespace) but at least one of the indexes for the table has not yet been reorganized or rebuilt. Therefore, the table is still using 4 byte RIDs, which means that the table or indexes have to be converted. Indicates whether the table is using large slots (which allows more than 255 rows per page) The following values are possible: YES The table is using large slots. Large Slots NO The table is not using large slots. PENDING The table supports large slots (that is, the table resides in a large tablespace) but an offline table reorganization or a table truncation operation has not yet been performed. Therefore, the table is still using a maximum of 255 rows per page. Blocks Pending Cleanup Indicates the number of blocks pending cleanup for MDC tables. For tables that do not use MDC, this value is always 0.

174

September 2011

5 Space

Indicates how the statistics were generated The following values are possible: System fabricated Statistics are gathered by the system without a table or an index scan. These statistics are stored in-memory and are different from the statistics that are stored in the system catalog. This is a temporary state and finally full statistics are gathered by DB2 and are stored in the system catalog. System asynchronously gathered Type of Statistics Statistics are gathered asynchronously by the system. The statistics have been collected automatically by DB2 by a background process and stored in the system catalogs. System synchronously gathered Statistics are gathered synchronously by the system. User gathered Statistics are gathered by the user. Undef Unknown type of statistics or information that is not available for the current database release Current Dictionary Size

Current size of compression dictionary in bytes

Indicates the type of indexes that are currently in use for the table The following values are possible: 1 Index Type Appears if type-1 indexes are being used 2 Appears if type-2 indexes are being used

September 2011

175

5 Space

Availability Describes the status of the table The following values are possible: No The table is not available and all other output information that relates to the size and state is 0. Available YES The table is available. Note Rollforward through an unrecoverable load makes a table unavailable. End of the note. Read Access If the table is read-only, the value is YES. Otherwise, the value is NO. Only No Load Restart The value YES indicates that the table is in partially loaded state that does not allow a load restart. Otherwise, the value NO is returned.

If the table is partitioned or using data partitioning the table status is available for each partition or data partition separately. In this case, an overview list that contains a subset of the information described before, is displayed first. To view the full details, you can select an entry in the list. By default the first entry is displayed. Note The physical sizes returned consider full extents allocated for the appropriate object and include the Extent Map Page (EMP) extents for objects created in DMS tablespaces. The logical size is the amount of space that is known for this table. It might be less than the amount of space that is physically allocated to hold object data for the table, for example, in case of a logical table truncation. The logical size returned considers full extents that are logically allocated for the object and, for objects created in DMS tablespaces, an estimate of the EMP extents. End of the note.

176

September 2011

5 Space

5.8.5 Single Table Analysis: Compression Status


The Compression Status tab page provides the following information: Field Partition Description Database partition number Note Data Partition ID This field is available only if the related table is using data partitioning End of the note. Data partition ID Dictionary State of the COMPRESS attribute on the table The following values are possible: Y Compression Row compression attribute is set to yes. N Row compression attribute is set to no. Code path taken to build the dictionary The following values are possible: INSPECT The dictionary was built using the INSPECT ROWCOMPESTIMATE command. LOAD Built By The dictionary was built using the LOAD INSERT or REPLACE commands NOT BUILT The dictionary was not built and is, therefore, not available. REDISTRIBUTE The dictionary was automatically built during a REDISTRIBUTE operation.

September 2011

177

5 Space

Field REORG

Description

The dictionary was automatically built by the REORG RESETDICTIONARY utility. TABLE GROWTH The dictionary was built in the course of INSERT operations. Build Time Rows Sampled Estimated Compression Saved Pages Estimated amount of pages in percent that will be saved after compression Estimated amount of bytes in percent that will be saved after compression Estimated size of compression dictionary in bytes if the table will be compressed Size of the expansion dictionary measured in bytes Expansion Dictionary Size If a historical dictionary exists, this value is the sum of the current and historical dictionary sizes. Average length of rows if the table will be compressed Date and time when the dictionary was built Rows that have been sampled to calculate the compression results

Saved Bytes

Dictionary Size

Average Length of Compressed Rows

In the following cases, compression information is available more than once: The table is distributed across several database partitions. The table uses data partitioning The table contains XML data that is compressed separately from normal DATA pages. If any of these conditions is fulfilled, an overview list containing a subset of the information described before, is displayed first. To view the full details, you can select an entry in the list. By default, the first entry is displayed.

178

September 2011

5 Space

5.8.6 Single Table Analysis: REORGCHK


The REORGCHK tab page provides the following information: Field Summary Description Provides a brief description which kind of REORG is recommended according to the recommendations for the table Name of the data partition Data Partition Name Note This field is only available if the related table is using data partitioning. End of the note. F1: Overflow Rows Overflow rows as a percentage F2: Table Size / Allocated Space F3: Full Pages / Allocated Pages Table size divided by allocated space as a percentage

Full pages divided by allocated pages as a percentage

Number of records that have overflowed Number of Overflow Records overflow when a data record is updated and the new data Pages record is larger than the old one, or when a column is added to a table. Note As of DB2 V9.7, the REORGCHK information for tables with data partitioning is available per data partition. In this case, the data is displayed as list. End of the note.

September 2011

179

6 Backup and Recovery

6 Backup and Recovery


The following sections provide information about the available task areas under Backup and Recovery on the Database tab page of the DBA Cockpit: Overview Logging Parameters

6.1 Backup and Recovery: Overview


You can access the Overview screen by calling the DBA Cockpit and choosing and Recovery Overview on the Database tab page of the DBA Cockpit. The following information is displayed on the Overview screen: Tab Page Description Contains information about database backups Database Backup In the Selection area, you can specify a date. After applying your selected date, a list of backups since this date is displayed. For more information about a database backup, you can double-click an entry. The details are displayed on the tab pages Backup Details, Tablespaces, and Backup Sequences in the content detail area. Contains information about log files that have been moved from the log directory to the log archive or to a storage product, such as Tivoli Storage Manager (TSM) Backup

Log Files

6.2 Backup and Recovery: Logging Parameters


You can access information about logging parameters by calling the DBA Cockpit and choosing Backup and Recovery Logging Parameters on the Database tab page of the DBA Cockpit. The Logging Parameters screen appears displaying the Log Directory and the Failover tab pages. These tab pages provide information about the logging parameters that are configured, such as the size of log files, the log retain status, or the user exit status. Furthermore, you can check the available space of the file systems where your database logs and the archived database logs are stored. However, these directories are only displayed if the monitored systems are SAP ABAP systems. Caution In a production system, the User Exit for Logging Status field must be set to YES. If this is not the case, you risk losing data and the ability to roll forward your database if serious database problems occur. End of the caution.

180

September 2011

7 Configuration

7 Configuration
The following sections provide information about the main task areas that are available under Configuration on the Database tab page of the DBA Cockpit: Overview Database Manager Database Registry Variables Parameter Check Configuration History Buffer Pools Workload Management Database Partition Groups Special Tables Regarding RUNSTATS Automatic Maintenance Settings Data Classes Data Collection Framework Monitoring Settings

September 2011

181

7 Configuration

7.1 Configuration: Overview


You can access general information about the database instance by calling the DBA Cockpit and choosing Configuration Overview on the Database tab page of the DBA Cockpit. On the Overview screen, the following information is displayed: Database Instance Name Partitionable Name of the database instance Indicates whether or not the current instance is a partitionable database server instance Number of database partitions If the database environment is not partitioned, the value is 1. Size of the current database instance in Bit (32 or 64) DB2-internal release number, as it is returned if you use the db2level command, for example, 03030106 Service level, as it is returned if you use the db2level command, for example, DB2 v8.1.1.80 Build level, as is returned if you use the db2level command, for example, n041021 Program temporary fix (PTF) identifier, as it is returned if you use the db2level command, for example, U498350 Fix Pack number, as it is returned if you use the db2level command, for example, 9 Description

Number of Partitions Address Space Database Release Service Level

Build Level

PTF

Fix Pack

For the operating system, the following information is displayed: Operating System Host Name Partition OS Name OS Version OS Release Total CPUs Name of the system Partition number Name of the operating system Version number of the operating system Release number of the operating system Total number of physical CPUs of the system Description

182

September 2011

7 Configuration

Operating System Configured CPUs Total Memory (MB) Note

Description Number of configured physical CPUs of the system Total amount of memory in the system in MB

If the database is distributed over several partitions, the operating system data is displayed in a table. End of the note. If the system has been installed as a high-availability disaster recovery (HADR) system, the following additional information is displayed: HADR Information Description Current HADR connection status of the database The following values are possible: Connect Status CONGESTED CONNECTED DISCONNECTED Local HADR host name Local Host The value is displayed as a host name string or an IP address string, for example, 1.2.3.4. Local HADR TCP service Local Service The value is displayed as a service name string or a port number string. Average of the gap between the primary log sequence number (LSN) and the standby log LSN The gap is measured in bytes. Primary Log File Name of the current log file on the primary HADR database Current log position of the primary HADR database Primary Log LSN The log sequence number (LSN) is a byte offset in the log stream of the database.

Log Gap

September 2011

183

7 Configuration

Page number in the current log file indicating the current log position on the Primary Log primary HADR database Page The page number is relative to the log file, for example, page zero is the beginning of the file. Current HADR synchronization mode of the database The following values are possible: HADR Syncmode ASYNC NEARSYNC SYNC HADR Timeout Number of seconds without any communication from its partner server after which an HADR database server considers that the connection between them has failed Number of missed heartbeats on the HADR connection Heartbeat If the database is in HADR primary or standby role, this field indicates the health of the HADR connection. If the database is in HADR primary or standby role, the meaning of this field depends on the value of the Connect Status field. The following values are possible: CONNECTED Displays the connection time CONGESTED Connect Time Displays the time when the congestion began DISCONNECTED Displays the disconnection time If there has been no connection since the HADR engine dispatchable unit (EDU) was started, the connection status is reported as Disconnected, and the HADR EDU startup time is used for the disconnection time. Since HADR connect and disconnect events occur relatively seldom, the time is collected and reported even if the DFT_MON_TIMESTAMP switch is off. This element should be ignored if the database's HADR role is STANDARD. Host name of the HADR remote host Remote Host The value is displayed as a host name string or an IP address string, for example, 1.2.3.4.

184

September 2011

7 Configuration

Remote Instance Remote Service

Name of the HADR remote instance Remote HADR TCP service This value is displayed as a service name string or a port number string. Current HADR role of the database The following values are possible:

HADR Role

PRIMARY STANDARD STANDBY Current HADR state of the database The following values are possible: DISCONNECTED

HADR State

LOCAL_CATCHUP PEER REM_CATCH_PEN REM_CATCHUP

Standby Log File Standby Log LSN

Name of the current log file on the standby HADR database Current log position of the standby HADR database Log sequence number (LSN) is a byte offset in the log stream of the database. Page number in the current log file indicating the current log position on the standby HADR database The page number is relative to the log file, for example, page zero is the beginning of the file.

Standby Log Page

September 2011

185

7 Configuration

7.2 Configuration: Database Manager


You can access information about the configuration of the database manager by calling the DBA Cockpit and choosing Configuration Database Manager on the Database tab page of the DBA Cockpit. On the Configuration: Database Manager screen, the parameter information is displayed as a tree structure with the following first-level nodes: Tree Node Common Diagnostics Default Monitor Switches Security Groups Description Common information about the database manager, for example, release level and CPU speed Information about diagnostics Information about the default monitor switches of the database

Information about user groups of the database manager Information about authentications of the database manager and about clients Information about the memory of the database manager Information about agents Information about the database application remote interface (DARI) Information about the configuration of the synchronization manager and the transaction manager Information about the transaction manager Information about network characteristics such as communication protocols

Security Authentication Memory Agents Application Remote Interface Sync Point Manager Transaction Manager Network

Fast Communication Information about the Fast Communication Manager (FCM), that is, the Manager configured communication in a multi-partition database DB2 Discovery Information about the configuration of the discovery mode Single parameters that are not accessible to the groups described above as well as parameters that are not known by the DBA Cockpit, for example, those of a new database release

Others

186

September 2011

7 Configuration

For each node, the following information about the respective parameters is displayed: Column Description

Configuration Parameter Description of the parameter Technical Name Current Value Deferred Value DB2 technical name of the parameter Currently active value of the parameter Value that becomes active after a restart of the database instance

For more information about these parameters, see the IBM DB2 online documentation. For information about maintaining the database configuration parameters, see Maintaining the Database Configuration [page 189].

7.3 Configuration: Database


You can access information about the database configuration by calling the DBA Cockpit and choosing Configuration Database on the Database tab page of the DBA Cockpit. On the Database screen, the parameter information is displayed as a tree structure. In case of a distributed database, the number of partitions are displayed on the first level. Otherwise, the first-level tree nodes are as follows: Tree Node Common Automatic Maintenance Optimization I/O Self-Tuning Memory Manager Database Shared Memory Application Memory Logging Log File Management Description Common information about the database, for example, release level and country code Information about the automatic maintenance switches Information about optimization Information about I/O Information about the self-tuning memory manager

Information about the memory that is available for the database

Information about the memory that is available for the application Information about log files and logging parameters Information about log file management parameters

September 2011

187

7 Configuration

Tree Node Backup & Recovery TSM Locks Space Applications DB2 Data Links Manager High Availability

Description Information about recovery availability and backups Information about Tivoli Storage Management (TSM) Information about locks, for example, the percentage of lock lists per application Information about containers and tablespaces Information about applications that connect to the database Information about the DB2 Data Links Manager (DB2 UDB Version 8 only) Information about the system configuration is only displayed if you are running a high availability system. Single parameters that are not accessible to the groups described above as well as parameters that are not known by the DBA Cockpit, for example, those of a new database release

Others

For each node, the following information about the respective parameters is displayed: Column Description

Configuration Parameter Description of the parameter Technical Name Current Value Deferred Value Note In a multi partition environment, the parameters can vary for each partition. For more information about how to compare the configuration of several database partitions, see Comparing Database Configuration Parameters For Several Database Partitions [page 189]. Depending on your database release level, the tree nodes that are displayed can vary, that is, some might not be visible or others might be added. End of the note. For information about how to maintain the database configuration parameters, see Maintaining the Database Configuration. For more information about these parameters, see the IBM DB2 online documentation. DB2 technical name of the parameter Currently active value of the parameter Value that becomes active after a restart of the database instance

188

September 2011

7 Configuration

7.3.1 Maintaining the Database Configuration


You use the following procedure to maintain configuration parameters either on the Database or the Database Manager screen in the Configuration area.

Procedure
1. Select the parameter that you want to change and choose the Change pushbutton. The Change Database Configuration Parameter dialog box appears. 2. Enter the new configuration parameter values. Note Some configuration parameters are enabled for automatic value adjustment. In this case, the AUTOMATIC checkbox is displayed. If you select AUTOMATIC, the value is automatically maintained by DB2. End of the note. 3. To check your entries, choose the Check pushbutton. The generated CLP commands that are based on your input are displayed. This area is automatically filled and refreshed whenever you choose the Check pushbutton. 4. To confirm your entries, choose the Execute pushbutton.

7.3.2 Comparing Database Configuration Parameters for Several Database Partitions


On the Database screen in the Configuration area, select the database partitions that you want to compare and choose the Compare pushbutton. The Database Configuration Adjustment screen appears displaying the database configuration parameters for the selected database partitions in a table. The values that differ are marked blue. Note By default, only the parameters that differ from one another are displayed. If you want to display all parameters, choose All Parameters from the Filter dropdown list. End of the note.

September 2011

189

7 Configuration

7.4 Configuration: Registry Variables


You can access information about DB2 registry variables by calling the DBA Cockpit and choosing Configuration Registry Variables on the Database tab page of the DBA Cockpit. The Registry Variables screen appears displaying the information as a tree structure. Aggregate variables are displayed as a folder that contain all the registry variables affected by the aggregate variable. Note The variables that are affected when setting an aggregate variable, such as DB2_WORKLOAD, are grouped in folders. If the value of such a variable has been manually overwritten, it is marked yellow. End of the note. The Scope variable indicates the level at which the DB2 registry variable acquires its value. These levels are as follows: Instance Global Environment

7.5 Configuration: Parameter Check


You use the parameter check to check the existing parameterization of a DB2 database against SAP recommendations. When you access the Parameter Check screen, the SAP parameter recommendations, which are collected in one SAP Note per DB2 version, are automatically downloaded and checked for the following against the SAP recommendations: DB2 database manager configuration DB2 configuration DB2 registry variables Buffer pool settings The checks are performed depending on the current system characteristics, such as the application type, the operating system, or the usage of STMM. The parameter check reports deviations from the SAP standard recommendations. To correct these deviations, you can either change the respective parameters or declare the deviations as intended. Note A parameter is deviating if its current or its deferred value is different from the SAP recommendations. End of the note.

190

September 2011

7 Configuration

You can access the Parameter Check screen by calling the DBA Cockpit and choosing Configuration Parameter Check on the Database tab page of the DBA Cockpit. On the Parameter Check screen, the following tab pages are available: Deviations Found Intended Deviations Check Environment

Deviations Found
On this tap page, the following information about parameters that deviate from the SAP standard recommendation is displayed: Parameter type Parameter name Member number to which the parameter values apply to Recommended parameter value Current parameter value Deferred parameter value, that is, its value after the database has been restarted

Intended Deviations
On this tab page, the same information as on the Deviations Found tab page is displayed plus the following: User that declared the deviation as intended Time stamp when it was declared as intended Comment Note To display the comment in full length, click the relevant text in the Comment column. End of the note.

September 2011

191

7 Configuration

Check Environment
On this tab page, the following system attributes and attribute values that are relevant for the parameter check are displayed in the System Characteristics area: Attribute Description Indicates if the database is using the database partitioning feature (DPF) The following values are possible: NO DPF In case of a single-partition system YES In case of more than one partition BI Indicates whether the database system has BW content Indicates if the database system is using STMM The following values are possible: NO STMM is not enabled for all partitions. STMM YES STMM is enabled for all partitions. MIXED STMM is only enabled for some partitions. OS BIT Indicates the operating system platform Indicates if the database instances are 32 bit or 64 bit instances

In the Check Configuration area, you are also provided with the number of the SAP parameter note of the underlying DB2 release. You can download the latest version of this SAP Note by choosing the Download SAP Note pushbutton.

Maintaining Parameters
On the Parameter Check screen, you can perform the following actions: Declare parameter deviations as intended Reverse the declared as intended status Correct parameter deviations

192

September 2011

7 Configuration

Declaring Parameter Deviations as Intended


If a parameter value in the SAP recommendations (that is, in the SAP parameter notes) is not valid for a specific customer situation, you can declare the parameter deviation as intended. By doing so, you avoid that a specific deviation is displayed every time you run the parameter check tool. 1. On the Deviations Found tab page, select a row from the table and choose the Declare as Intended menu button. Note In a database environment with multiple database partitions, the deviations of database configuration parameters and registry variables can occur on several partitions. When choosing the Declare as Intended menu button, you have to specify if this operation applies to a single or to all partitions where this parameter deviation was found. End of the note. 2. In the Comment dialog box, enter a reason why you consider this deviation as intended and choose the Declare as Intended pushbutton. The relevant parameter deviation is moved to the Intended Deviations tab page. Note Since the list of intended deviations is stored in a table of the SAPTOOLS schema, the data collection framework (DCF) must be set up correctly. Otherwise, the Declared as Intended pushbutton is disabled. End of the note.

Reversing the Declared as Intended Status


During a parameter check, it can occur that a deviation that you formerly declared as intended is no longer valid. The status of intended deviations is automatically reversed to not intended in the following situations: The current parameter value in the monitored system has changed from the value at the moment when the deviation was declared as intended. The current deferred parameter value in the monitored system has changed from the value at the moment when the deviation was declared as intended. The SAP recommendation has changed, that is, the check has been changed since the parameter was declared as intended. The DB2 version or the Fix Pack have changed since the parameter was declared as intended. On the Intended Deviations tab page, all parameter deviations that were declared as intended are displayed. If you want to reverse the status of a parameter deviation, select a deviation from the list and choose the Declare as Not Intended pushbutton. As a result, the selected parameter deviation is removed from the Intended Deviations tab page and appears again on the Deviations Found tab page.

September 2011

193

7 Configuration

Note In a database environment with multiple database partitions, the deviations of database configuration parameters and registry variables can occur on several partitions. When choosing the Declare as Not Intended menu button, you have to specify if this operation applies to a single or to all partitions where this parameter deviation was found. End of the note. If you want to reverse the status of all deviations on the Intended Deviations tab page to not intended, you can clear the complete list by choosing the Clear List of Intended Deviations pushbutton. As a result, the deviations appear again on the Deviations Found tab page.

Correcting Parameter Deviations


1. On the Deviations Found tab page, select a deviation from the list and choose the Correct this Parameter pushbutton. Note This function is not available for buffer pools and registry variables. In a database environment with multiple database partitions, the deviations of database configuration parameters and registry variables can occur on several partitions. When choosing the Correct This Parameter menu button, you have to specify if this operation applies to a single or to all partitions where this parameter deviation was found. End of the note. The dialog box Change Database Configuration Parameters or Change Database Manager Configuration Parameters appears displaying the SAP-recommended value as default suggestion. 2. Enter the required value and choose the Execute pushbutton. The parameter changes are tracked in the DBA Cockpit and you can analyze them in the Configuration History task area under Configuration.

194

September 2011

7 Configuration

7.6 Configuration: Configuration History


Note This function is only available if the following applies: The monitored database is DB2 V9.7 or higher. The DCF is set up correctly. If the DCF is not available or not set up correctly, a warning is displayed including a link to the Collector Configuration screen where you can perform the necessary steps as described in Data Collection Framework: Collector Configuration [page 227]. The DCF runs the data collector Diag Log, which keeps a local history of special configuration events that are parsed from db2diag.log and the DB2 history file. For more information about the DCF, see Enabling the Database for the Data Collection Framework [page 32]. End of the note. You can use the Configuration History screen to keep track of database, instance, or registry configuration changes and the execution of certain DDL statements. To access information about the configuration history, call the DBA Cockpit and choose Configuration Configuration History on the Database tab page of the DBA Cockpit. In the Selection area, you can do the following: Specify the time frame for which you want to display the configuration history details. Choose an option in the Event Type field to restrict the result list. By default, all event types are displayed. Set additional filter criteria by using the keyword search in the Object Name field. You can use the asterisk (*) character in this field. On the Configuration History screen, the following information is displayed: Column Time of Collection Description Time when the event was logged Event type that is associated with the configuration change Possible values are: DB_CFG Event Type DB_CFG_STMM DBM_CFG REGISTRY DDL_BP

September 2011

195

7 Configuration

Column DDL_BP_STMM DDL_TBSP DDL_WLM DDL_THRES HADR Object Name Old Value

Description

Name of the object the event relates to If available, the old state or value of the configuration object If available, the old flag of the configuration change Possible values are:

Old Flag

COMPUTED AUTOMATIC None

New Value

If available, the new state or value of the configuration object If available, the new flag of the configuration change Possible values are:

New Flag

COMPUTED AUTOMATIC None

Invoked by

System authorization identifier of the event

To display details about a configuration history entry, select the relevant line in the list. The Configuration History Details area appears displaying the full log record.

196

September 2011

7 Configuration

7.7 Configuration: Buffer Pools


You can access information about available buffer pools by calling the DBA Cockpit and choosing Configuration Buffer Pools on the Database tab page of the DBA Cockpit. The following information is displayed on the Buffer Pools screen: Column Buffer Pool Name Partition Name of the buffer pool Number of the partition (only displayed if you are using a multi partition database) Size of the buffer pool in KB A value of 1 indicates that the default buffer pool size parameter from the database configuration is used (parameter BUFFPAGE). Size (Pages) AUTOMATIC indicates that the selected buffer pool is tuned by the DB2 self tuning memory management (STMM). If one of these special values is displayed and you want to see the real size of the buffer pool, you can use the buffer pool snapshot [page 84]. Page Size (Byte) Size of one buffer pool page in bytes Description

To display details about a buffer pool, choose a buffer pool from the list. The following information is displayed in the Buffer Pool Details area: Technical Settings Database Partition Groups Tablespaces

Technical Settings
The Technical Settings tab page displays the following technical attributes: Field Size Default (BUFFPAGE) Automatic The size of the buffer pool has not been set at creation time, and the default size as defined in the database configuration parameter BUFFPAGE is used. The size of the buffer pool is managed by STMM. Description

September 2011

197

7 Configuration

The size of the buffer pool is set to a fixed value. Fixed Standard Size This means that this size is set for all partitions except for those with exception entries.

I/O Units Page Size Block Size Number of Block Pages Size of one page in the buffer pool Size of one block for blocked I/O in pages (only displayed if you are using DB2 UDB Version 8) Number of pages that are reserved for block I/O usage (only displayed if you are using DB2 UDB Version 8)

For all partitions of the selected buffer pool, the following information is additionally displayed: Column Partition Buffer Pool Size Exception Database partition number Size of the buffer pool in pages Indicates whether an exception entry has been defined for this partition that specifies a size different from the default size in the Fixed Standard Size field Description

Database Partition Groups


The Database Partition Groups tab page displays a list of all database partition groups to which the buffer pool is related. A buffer pool can be related to all available partitions or to a set of partitions defined by database partition groups. If the buffer pool is not already defined on all partitions, you can select further database partition groups.

Tablespaces
The Tablespaces tab page displays a list of all tablespaces that use this buffer pool as well as the page size of these tablespaces.

Maintaining Buffer Pools


You can maintain buffer pools, that is, change, add, or delete them as described in the following section Maintaining Buffer Pools.

198

September 2011

7 Configuration

7.7.1 Maintaining Buffer Pools


Using the buffer pool list on the Buffer Pools screen, you can maintain buffer pool as follows: Change buffer pools, that is, add or remove partitions, resize or control the use of extended storage Add new buffer pools Delete buffer pools

Changing Buffer Pools


1. On the Buffer Pools screen, select a buffer pool from the list and choose the Edit pushbutton. 2. In the Change Buffer Pool dialog box, you can modify the buffer pool attributes as follows: o Change the buffer pool size from Automatic to Fixed and vice versa. If you select the Automatic radio button or if the Automatic attribute is already set for the buffer pool, you can set the initial size for STMM. If you select the Fixed radio button or if the buffer pool is already using a fixed size, you can set or change the standard size for all partitions except for those partitions with exception entries. If you want to create or delete an exception entry for a partition, select or deselect the relevant Exception checkbox in the partition list. After you selected the Exception checkbox for a partition, you can change the buffer pool size (pages). o If the buffer pool is specified for a set of database partition groups only and not yet for all database partition groups, you can add database partition groups by selecting them in the Database Partition Groups list. You can change the block size and the number of block pages.

3. If you want the changes take effect immediately, select the Change Immediately checkbox. Otherwise, the changes will take effect after the next restart of the database. 4. To confirm your entries, choose the Execute pushbutton.

Adding Buffer Pools


1. On the Buffer Pools screen, select a buffer pool from the list and choose the Add pushbutton. The Add Buffer Pool dialog box appears.

September 2011

199

7 Configuration

Note By default, all available partitions that relate to the new buffer pool are listed. To reduce this list, you can choose the On Selected Database Partition Groups radio button in the Database Partition Groups area, and select single database partition groups. End of the note. 2. Specify a name for the new buffer pool. Recommendation We recommend that you use uppercase letters for the buffer pool name. Using lowercase letters or special characters makes it less comfortable to access the selected database partition group with the DB2 command line processor. End of the recommendation. 3. In the Size and I/O Units areas, enter the relevant technical settings, such as the page size. 4. If the buffer pool is specified for a set of database partition groups only and not yet for all database partition groups, you can add database partition groups by selecting them in the Database Partition Groups list. 5. If you want the new buffer pool to be created immediately, select the Create Immediately checkbox. Otherwise, the newly created buffer pool is created after the next restart of the database. 6. To confirm your entries, choose the Execute pushbutton.

Deleting Buffer Pools


1. On the Buffer Pools screen, select a buffer pool from the list and choose the Delete pushbutton. 2. Confirm the deletion.

SQL Statements
In the Change Buffer Pool and Add Buffer Pool dialog boxes, the generated SQL statement(s) to be executed are displayed. This area is automatically filled and refreshed as soon as any changes are entered correctly.

200

September 2011

7 Configuration

7.8 Configuration: Workload Management


Workload management is supported as of DB2 V9.5. It lets you distinguish and prioritize different types of work on the database. Workloads identify the submitters of work by connection properties and assign incoming work to the service classes. You use service classes to monitor and control resource consumption of the different workloads. Note Setting up workload management is optional. If no workload management has been configured, the database does not distinguish different types of work as known from previous DB2 releases. End of the note. For information about thresholds, see Introduction to DB2 workload management concepts in the IBM Information Center at: http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=/com.ibm.db2.luw.admi n.wlm.doc/doc/c0052594.html You can access information about workload management by calling the DBA Cockpit and choosing one of the following on the Database tab page of the DBA Cockpit: Configuration Configuration Workload Management Workload Management Workloads and Service Classes SAP WLM Setup Status

7.8.1 Workload Management: Workloads and Service Classes


You use the data provided on the Workloads and Service Classes screen to obtain an overview of the workload management configuration of the database system. In addition, you can maintain the priority of service classes and configure the amount of monitoring data that is collected for each individual service class. The following tab pages are displayed on the Workloads and Service Classes screen: Overview Workloads Service Classes

Overview
This tab page provides an overview of all configured workloads, service superclasses, and their subordinate service classes on the database system. The hierarchy of service classes is displayed using the inheritance arrows that are known from UML diagrams.

September 2011

201

7 Configuration

Workloads
This tab page provides details of all existing workloads as follows: Column Position Workload Name Description Evaluation order that is used for choosing a workload Name of the workload Workload state The following states are possible: Green Enabled The workload is enabled. Red The workload is disabled. DB Access Allowed Service Class Parent Service Class Determines whether or not units of work (UOWs) that are associated with the workload are rejected Name of the service subclass to which an UOW that is associated with this workload is assigned Name of the service super class to which an UOW that is associated with this workload is assigned

To display additional information, you can select a workload from the list. The following tab pages are displayed in the content detail area: Workload Details Displays details about the workload from the system catalog as well as details about the configuration for collecting statistics on the workload Connection Attributes Displays all the attributes that associate an incoming activity with the selected workload For an activity to be associated with a certain workload, all the connection attributes of the incoming activity must match the definition of the workload (Boolean AND). If a single attribute type is specified more than once, this indicates that only one of them must match the activity (Boolean OR).

202

September 2011

7 Configuration

Service Classes
This tab page provides details of existing service classes as follows: Column Service Class Name of the service class State of the service class The following states are possible: Green Enabled The service class is enabled. Red The service class is disabled. Agent Priority Graphical display of the thread priority of the agents in the service class Thread priority of the agents in the service class in relation to the normal priority of DB2 threads The value DEFAULT indicates that the thread priority was inherited from the parent service class. Graphical display of the agents prefetch priority in the service class Prefetch priority of the agents in the service class Graphical display of the buffer pool priority in the service class (only applies to DB2 V9.7) Buffer pool priority of the service class (only applies to DB2 V9.7) Description

Agent Priority (Remarks)

Prefetch Priority Prefetch Priority (Remarks) Buffer Pool Priority Buffer Pool Priority (Remarks)

If you select a service class from the list, the Service Class Details tab page appears in the content detail area displaying further details of the service class.

Changing Data Collection Settings of Service Classes


You can maintain the amount of data that is collected for each individual service class as follows: 1. On the Service Class Details tab page, choose the Change Data Collection pushbutton. 2. On the Change Data Collection Settings, enter the required data using the dropdown lists in the fields.

September 2011

203

7 Configuration

Recommendation We recommend that you choose Collect Base Aggregate Activity Data in the Aggregate Activity Data field for all service classes. End of the recommendation. 3. Save your entries. For information about possible data collection settings, see ALTER SERVICE CLASS statement in the IBM DB2 Information Center at: http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.db2.luw.sql.ref.doc/doc/r0 050551.html

Changing Priorities of Service Classes


By changing agent priorities or prefetch priorities of certain service classes, you can distribute database resources among different types of workloads as follows: 1. On the Service Class Details tab page, choose Change Prioritization. 2. In the Change Prioritization dialog box, adjust the agent, prefetch, or buffer pool priority using of the following pushbuttons: o o o Increase <Agent or Prefetcher> Priority Decrease <Agent or Prefetcher> Priority Inherit <Agent or Prefetcher> Priority from Parent Class (DEFAULT) Resets the priority from its parent service class to the default value. 3. Save your entries. Caution If not chosen carefully, changing the agent or prefetch priority can significantly decrease the performance of some workloads. End of the caution.

204

September 2011

7 Configuration

7.8.2 Workload Management: SAP WLM Setup Status


In addition to the default workloads and service classes that are created automatically during the setup of history data collectors in an SAP environment, you can set up additional workloads and service classes using the SAP WLM Setup Status screen. The workload management setup that is supported by the DBA Cockpit is separated into the following categories: SAP enhanced prioritization scheme SAPTOOLS workload and service class Priority aging service class

SAP Enhanced Prioritization Scheme


In addition to the workload management setup that is based on the work process types and that is set up by default for SAP systems as described in Enabling the Database for the Data Collection Framework [page 32], you can create an additional workload and service class using the enhanced prioritization scheme. This additional workload and service class consists of one of the following groups: SAP users SAP transactions SAP application servers You can monitor and prioritize this special group separately from the workloads that are based on work process types. If you want to drop the enhanced prioritization scheme, choose the Modify Enhanced Prioritization Scheme pushbutton. In the wizard that appears, choose No enhanced priority scheme. If you want to drop the enhanced prioritization scheme as well as the workloads and service classes that identify the SAP work process types, choose the Drop SAP Workloads and Service Classes pushbutton. Recommendation We recommend that you always keep the work process type- based WLM setup to allow monitoring based on SAP work process types. End of the recommendation.

September 2011

205

7 Configuration

SAPTOOLS Workload and Service Class


For SAP systems, the separation of SAP monitoring tools is set up by default as described in Enabling the Database for the Data Collection Framework [page 32]. If you want to remove the SAPTOOLS workload and service class, you can do so by choosing the Drop SAPTOOLS Workload and Service Class pushbutton. If the SAPTOOLS workload and the service class have not yet been created, you can do so by choosing the Set Up SAPTOOLS Workload and Service Class pushbutton.

Priority Aging Service Class


Note The priority aging feature is only available as of DB2 V9.7. End of the note. The priority aging feature lets you change the priority of in-progress activities over time. You use priority aging to decrease the priority of longer-running activities so that the throughput for shorter-running activities stays at a stable level. If the priority aging service class has not yet been created, you can create it by choosing the Set Up Service Class for Priority Aging pushbutton. To drop the priority aging service class, choose the Drop Service Class for Priority Aging pushbutton. To enable priority aging based on defined thresholds, you have to set up corresponding service class thresholds as described in Critical Activities: Threshold Configuration [page 113]. For more information about the priority aging feature, see the IBM DB2 Information Center at: http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.db2.luw.admin.wlm.doc/d oc/c0051423.html

206

September 2011

7 Configuration

7.9 Configuration: Database Partition Groups


You can access information about available database partition groups by calling the DBA Cockpit and choosing Configuration Database Partition Groups on the Database tab page of the DBA Cockpit. On the Database Partition Groups screen, the following information is displayed: Column Database Partition Group Partition Description Name of the database partition group Number of the partition Current status of the partition The following values are possible: Status information not available Status Partition not in partitioning map; containers not yet created Partition not in partitioning map; containers created Partition in partitioning map; containers created Partition will be dropped after next redistribution You can display details about a database partition group by selecting it from the list. The following tab pages are displayed in the Database Partition Group Details area: Partitions Buffer Pools Tablespaces

Partitions
The Partitions tab page displays the following information: Column Partition Number of the partition Current status of the partition The following values are possible: Status Status information not available Partition not in partitioning map; containers not yet created Partition not in partitioning map; containers created Description

September 2011

207

7 Configuration

Column

Description Partition in partitioning map; containers created Partition will be dropped after next redistribution

Buffer Pools
The Buffer Pools tab page displays a list of all buffer pools that have been defined for the selected database partition group as follows: Column Buffer Pool Name Total space in KB If you create tablespaces, this information is not displayed. Size of the buffer pool in KB Buffer Pool Size (KB) Value 1 indicates that the default buffer pool size parameter from the database configuration is used (parameter BUFFPAGE). Size of one buffer pool page in bytes Description

Page Size

You can display more details about a buffer pool by selecting it from the list. The detail information is displayed in the Buffer Pool Details area below the Database Partition Group Details area.

Tablespaces
The Tablespaces tab page displays a list of all tablespaces that have been defined for the selected database partition group including their page size in bytes. You can display more details about a tablespace of a buffer pool by selecting the tablespace from the list. The detail information is displayed in the Tablespace Details area that appears below the Database Partition Group Details area.

Maintaining Database Partition Groups


You can maintain database partition groups, that is, change, add, redistribute, or delete them as described in the following section Maintaining Database Partition Groups.

208

September 2011

7 Configuration

7.9.1 Maintaining Database Partition Groups


Using the list of database partition groups on the Database Partition Groups screen, you can maintain database partition groups as follows: Change database partition groups, that is, add or remove partitions Add new database partition groups Delete database partition groups Redistribute database partition groups

Changing Database Partition Groups


1. On the Database Partition Groups screen, select a database partition group from the list and choose the Edit pushbutton. 2. In the Change Database Partition Group dialog box, select new database partitions to be added, or deselect existing database partitions to be dropped. 3. Confirm your selection by choosing the Execute pushbutton.

Adding New Database Partition Groups


1. On the Database Partition Groups screen, choose the Add pushbutton. 2. In the Add Database Partition Group dialog box, specify a name for the new database partition group. Recommendation We recommend that you use uppercase letters for the database partition group name. Using lowercase letters or special characters makes it less comfortable to access the selected database partition group with the DB2 command line processor. End of the recommendation. 3. From the list of available database partitions, select one or more partitions that you want to add to the new database partition group. 4. Confirm your entries by choosing the Execute pushbutton.

September 2011

209

7 Configuration

Deleting Database Partition Groups


1. On the Database Partition Groups screen, select a database partition group and choose the Delete pushbutton. Caution You cannot delete database partition groups that contain tablespaces that are still being used by the SAP system. You must delete the tablespaces first. End of the caution. 2. Confirm the deletion.

Redistributing Database Partition Groups


Note You can only redistribute database partition groups that have the status Partition not in partitioning map; containers created. End of the note. 1. On the Database Partition Groups screen, select a database partition group and choose the Redistribute pushbutton. 2. In the Schedule Job dialog box, define if you want to redistribute the database partition group immediately or at a later point in time.

SQL Statements
In the Change Database Partition Group and Add Database Partition Group dialog boxes, the generated SQL statement(s) to be executed are displayed. This area is automatically filled and refreshed whenever changes are correctly entered.

210

September 2011

7 Configuration

7.10 Configuration: Special Tables Regarding RUNSTATS


You can access information about tables with special RUNSTATS characteristics by calling the DBA Cockpit and choosing Configuration Special Tables Regarding RUNSTATS on the Database tab page of the DBA Cockpit. There are two categories of tables that are treated by the optimizer in a special way due to their characteristics: Tables marked as VOLATILE in the system catalog A volatile table is a table whose content can vary from a few entries to a very large amount of entries at lifetime, that is, statistics data is often out-of-date and may result in wrong access plans by the optimizer. These tables should be marked as VOLATILE and should have no statistics at all. Tables with RUNSTATS control parameters that are not in accordance with the default settings of the DBA Planning Calendar, for example, special scheduling patterns, different kinds of RUNSTATS, or tables that have a profile that may influence automatic RUNSTATS On the basis of the list displayed, you can check system catalog-related information against the DBSTATC control table. On the Special Tables Regarding RUNSTATS screen, the following information is displayed: Column Table Schema Table Name Description Name of the schema to which the table belongs Name of the database table Indicates whether the table is flagged as VOLATILE in the system catalog VOLATILE If the table is flagged as VOLATILE, statistics are not used by the optimizer. Type of entry in control table DBSTATC The following values are possible: N No RUNSTATS is run by any DBA Planning Calendar job. This status corresponds to the VOLATILE attribute of a database table, which prevents the query optimizer from using statistics. R No RUNSTATS is run automatically by any DBA Planning Calendar job. The only exception is that you explicitly schedule a RUNSTATS for the relevant table.

Active

September 2011

211

7 Configuration

Column A

Description

RUNSTATS may be run by DBA Planning Calendar jobs. This information is only relevant if RUNSTATS is performed by DBA Planning Calendar jobs and not by DB2 automatic RUNSTATS. Profile RUNSTATS Date RUNSTATS Time Indicates whether a RUNSTATS profile was set for the table Date of the last RUNSTATS in the system catalog table

Time of the last RUNSTATS in the system catalog table Number of rows as calculated by the last RUNSTATS

Cardinality (1 indicates that there are no statistics available.) For more details about a table, choose a table from the list. The Single Table Analysis screen appears providing detailed information about the selected table. For more information, see Analyzing and Maintaining a Single Table [page 154].

212

September 2011

7 Configuration

7.11 Configuring Automatic Maintenance Functions


Using DB2's automatic maintenance functions, you prepare the database for automatic administration. In addition, you should check the settings from time to time to make sure that they meet the requirements of your production system. You can configure the following automatic maintenance functions on the Automatic Maintenance screen: Automatic Backup Automatic RUNSTATS Automatic REORG Note If you enter this task area for the first time, certain settings are preselected based on the DB2 default policy. End of the note.

Procedure
1. Call the DBA Cockpit and choose Configuration Database tab page of the DBA Cockpit. Automatic Maintenance on the

The Automatic Maintenance screen appears displaying the following tab pages: o o o o General Automatic Backup Automatic RUNSTATS Automatic REORG

Each of these tab pages provides detailed information about the currently selected settings for each of the functions as well as general information applying to all functions. These tab pages are described in more detail later in this document. 2. To configure the automatic maintenance functions, choose the Configure pushbutton. The Configure Automatic Maintenance Functions wizard appears guiding you through the following configuration steps: Step Introduction Action Provides an overview of the available configuration steps Note General To be able to use the automatic maintenance functions, you must select the checkbox Automatic maintenance is switched on.

September 2011

213

7 Configuration

Step End of the note. o

Action

Specify the maintenance windows during which automatic maintenance is performed by DB2: Online Maintenance Window Time frame with only low activity on the database Offline Maintenance Window Time frame with no activity on the database

Select the required maintenance task, for example, Automatic REORG, for one of the maintenance windows. DB2 then decides if any action is required and automatically triggers the correct action.

Note Since the tab pages for specifying the online and the offline maintenance windows are identical, they are only described once. End of the note. Specify the following parameters: o Online Window / Offline Window o o o Caution The definition of all time-related parameters is combined by AND. Therefore, a valid maintenance window must meet all definitions. End of the caution. Specify the following: o Backup o o Start Conditions Backup Media Backup Operation Mode Time Day of Week Day of Month Month of Year

214

September 2011

7 Configuration

Specify the following: o o RUNSTATS Note You can only specify a table filter if you select Custom as Configuration Profile. End of the note. Specify the following: o o o REORG Configuration Profile Index Reorganization Mode Parameters such as the Maximum Table Size, Reclaim Size for MDC Tables, or whether you want to keep the compression dictionary. Configuration Profile Table Filter

Note You can only specify the index reorganization mode and other parameters if you select Custom as Configuration Profile. End of the note. Summarizes all actions to be performed Summary To apply your configuration entries and to exit the wizard, choose the Execute pushbutton.

September 2011

215

7 Configuration

7.11.1 Automatic Maintenance Settings: General Settings


When you open the Automatic Maintenance screen, the General tab page is displayed by default providing information about the maintenance windows during which automatic maintenance is performed by DB2. The maintenance windows are as follows: Online Maintenance Window Time frame with only low activity on the database. For example, during an online maintenance window, you can still be connected to the database. Offline Maintenance Window Time frame with no activity on the database. For example, during an offline maintenance window, neither connections to the database are allowed nor updates for tables and indexes while they are being reorganized. Note In this context, online and offline does not mean the state of the database itself but the time frame with only low activity (online) or no activity (offline) on the database. Since the tab pages specifying the online and the offline maintenance windows are identical, they are only described once. End of the note. On the Online Maintenance Window and Offline Maintenance Window tab pages, the following information is displayed: Parameter Description Enables or disables automatic maintenance Automatic maintenance is switched on To be able to use the automatic maintenance function, this checkbox must be selected. Indicates if the online or offline maintenance window was enabled Indicates if the maintenance window was specified directly or inverted Time frame when the automatic maintenance function is to be performed Days of the week during which the automatic maintenance function is to be performed

Online maintenance window is enabled / Offline maintenance windows is enabled Time of Automatic Maintenance

Time

Day of Week

216

September 2011

7 Configuration

Day of Month

Days of months during which the automatic maintenance function is to be performed You can specify days or day ranges that are separated by comma, for example, 1, 710. Months of the year during which the automatic maintenance function is to be performed

Month of Year Note

To change the settings, choose the Configure pushbutton. For more information, see Configuring Automatic Maintenance Functions [page 213]. End of the note.

7.11.2 Automatic Maintenance Settings: Automatic Backup


The Automatic Backup tab page provides the following information: Parameter General Automatic backup is switched on Description

Enables or disables the automatic backup function

Specifies the type of backup (online or offline) Backup Operation Type When an online backup is performed, you are still able to access the database during the online maintenance window. When an offline backup is performed within the offline maintenance window, you cannot access the database. Specifies the priority of the automatic backup over the other automatic maintenance features such as Automatic RUNSTATS or Automatic REORG Priority Note 1 means highest priority. End of the note.

September 2011

217

7 Configuration

Starting Conditions Backups are created more frequently. Therefore, less time is required to recover the database. Optimize for Database Recoverability The following limits apply: Maximum time between backups: 1 day Maximum log space used between backups: 10 MB Indicates the balance between the number of backups and the time for recovery. Balance Between Recoverability and Performance The following limits apply: Maximum time between backups: 7 days Maximum log space used between backups: 25 MB Fewer backups are created. Therefore, more time to recover the database is required. Optimize for Database Performance The following limits apply: Maximum time between backups: 30 days Maximum log space used between backups: 50 MB If you choose this option, you can customize the following parameters: Number of full backups is less than Minimum number of backups Customize Time since last full backup exceeds <value> days Maximum time between backups Log space used since last full backup is more than <value> MB Maximum log space between two backups Number of full backups is less than Time since last full backup exceeds Log space used since last full backup is more than If the number of backups is less than the specified value, a backup is created. If the time since the last backup exceeds the specified value, a backup is created. If the log space exceeds the specified value, a backup is created.

218

September 2011

7 Configuration

Backup Media The backup is created in the specified file systems. File System If you choose File System, you also have to specify the File Paths where the backup is to be created. The backup is created on tape. Tape Device If you choose Tape Device, you also have to specify the Number of Parallel Sessions. The backup is created and stored in IBM Tivoli Storage Manager (TSM). If you choose TSM, you also have to specify the File Paths. The backup is created using the XBSA API for storing the data. XBSA If you choose XBSA, you also have to specify the Number of Parallel Sessions. The backup is created and data is stored using a vendor library. Vendor Library If you choose Vendor Library, you also have to specify the Location (that is, a path and file name of the library) and the Options.

TSM

Note To change the settings, choose the Configure pushbutton. For more information, see Configuring Automatic Maintenance Functions [page 213]. End of the note.

September 2011

219

7 Configuration

7.11.3 Automatic Maintenance Settings: Automatic RUNSTATS


The Automatic RUNSTATS tab page provides the following information: Parameter General Automatic RUNSTATS is switched on Maintenance Window Enables or disables the automatic RUNSTATS function Specifies that automatic RUNSTATS can only be performed in the online maintenance window Specifies the priority of the automatic RUNSTATS over the other automatic maintenance features, such as Automatic REORG or Automatic Backup. Priority Note 1 means highest priority. End of the note. Parameters If you select this checkbox, you enable the SAP default criteria, that is, no tables are excluded from automatic RUNSTATS by the policy filter. SAP Default Criteria for Tables Excluded by Policy Note A full editor for these filter criteria is not provided. End of the note. In addition, the following information is displayed for tables that are excluded from RUNSTATS: Column Description The excluded tables are divided into the following categories: Volatile Tables Tables Excluded from RUNSTATS Volatile tables are always excluded from automatic RUNSTATS. If you expand this node, the volatile tables are displayed. Tables Excluded by Policy Within the policy, there are some filter criteria for tables to be excluded from automatic RUNSTATS. If you expand this node, Description

220

September 2011

7 Configuration

Column

Description the excluded tables are displayed.

Schema

Name of the schema to which the table belongs Indicates whether the table is flagged as VOLATILE in the system catalog

Volatile If the table is flagged as VOLATILE, statistics are not used by the optimizer. Active Profile RUNSTATS Date RUNSTATS Time A value of N indicates whether the table is marked as VOLATILE by SAP Indicates whether a RUNSTATS profile was set for the table Date of the last RUNSTATS in the system catalog table Time of the last RUNSTATS in the system catalog table Number of rows as calculated by the last RUNSTATS Cardinality (1 indicates that no statistics are available.) Note To change the settings, choose the Configure pushbutton. For more information, see Configuring Automatic Maintenance Functions [page 213]. End of the note.

7.11.4 Automatic Maintenance Settings: Automatic REORG


The automatic REORG checks regularly if tables or indexes require reorganization. This check is performed by the REORGCHK. The tables are always defragmented during the offline maintenance window. You can specify only for indexes if a reorganization is to be performed during the online or offline maintenance window. Note If the index reorganization mode is configured to be performed online and no offline maintenance windows has been defined, only online index reorganizations and no table reorganizations are performed by automatic maintenance. End of the note.

September 2011

221

7 Configuration

On the Automatic REORG tab page, the following information is displayed: Parameter General Automatic REORG is switched Enables or disables the automatic REORG function on Specifies a maintenance window for index reorganization Recommendation Index Reorganization Mode We recommend that you reorganize indexes during the online maintenance window. End of the recommendation. Specifies the priority of the automatic REORG over the other automatic maintenance features, such as Automatic RUNSTATS or Automatic Backup. Priority Note 1 means highest priority. End of the note. Parameters Description Enables the SAP default filter criteria for tables that are to be excluded from automatic REORG That is, all table filters in the policy are disabled and the parameters are changed according to the SAP recommendations. Note A full editor for these filter criteria is not provided. End of the note. If you select this option, a copy of the table or index is created in the temporary tablespace, and the table or index is copied to the original tablespace. Use a System Temporary Tablespace with Compatible Page Size Since temporary tablespaces in SAP systems are SMS tablespaces, the required space for defragmentation will be available after the reorganization. Recommendation We recommend that you use a system temporary tablespace. Description

SAP Default Criteria for Tables Excluded by Policy

222

September 2011

7 Configuration

Parameter

Description End of the recommendation. Specifies the tables that are excluded from the automatic REORG because of their size

Maximum Table Size

Recommendation We recommend a maximum table size filter of 1,000,000 KB. End of the recommendation. Specifies whether MDC tables are reorganized and which size limit is used.

Reclaim Size for MDC Tables

Note This option is only available as of DB2 V9.7. End of the note. Specifies whether you want to keep or rebuild the compression dictionary A rebuild of the compression dictionary can lead to a better compression ratio but implicates a longer REORG runtime.

Compression Dictionary Recommendation We recommend that you rebuild the compression dictionary. End of the recommendation. In addition, the following information is displayed for tables that are excluded from an automatic REORG: Column Description The excluded tables are divided into the following categories: Tables Excluded by Policy Within the policy, there are some filter criteria for tables to be excluded from the automatic REORG. If you expand this node, the excluded tables are displayed. Tables Excluded by Size If you expand this node, the tables with a size larger than the threshold are displayed. Determining the table sizes online is much too expensive. To obtain the sizes of the tables, you have to schedule the job REORGCHK for all Tables in the DBA Planning Calendar.

Tables Excluded from REORG

September 2011

223

7 Configuration

Column Schema Table Flagged Index Flagged

Description Name of database schema to which the table belongs Table to be reorganized Indexes to be reorganized

Table Size (KB) Size of the table in KB Note To change the settings, choose the Configure pushbutton. For more information, see Configuring Automatic Maintenance Functions [page 213]. End of the note.

7.12 Configuration: Data Classes


Note This function is only available for SAP ABAP systems. End of the note. The technical settings of SAP tables define data classes that need to be related to database tablespaces. You can access the list of available data classes by calling the DBA Cockpit and choosing Configuration Data Classes on the Database tab page of the DBA Cockpit. On the Data Classes screen, the following information is displayed: Column Green: No action required Yellow: Indicates warnings State Recommendation We strongly recommend that you take immediate action. End of the recommendation. Red: Indicates errors, immediate action required The following errors are checked: Description

224

September 2011

7 Configuration

Column

Description Is there a related data tablespace? Does the data tablespace exist in the database? Is there a related tablespace for indexes? Does the index tablespace exist in the database? Does the name of the tablespace comply with the naming conventions for the customer namespace? Is there a description for the data class?

Data Class Data Tablespace Index Tablespace No. of Tables

Name of the data class known to the ABAB Dictionary Name of the tablespace where table data is stored

Name of the tablespace where table indexes are stored Number of tables within the related data tablespace

No. of Indexes Number of indexes within the related index tablespace Category Description Category of the data class Description of the data class

In addition, you can maintain data classes, that is, change, add, or delete them as described in Maintaining Data Classes.

September 2011

225

7 Configuration

7.12.1 Maintaining Data Classes


Using the data class list on the Data Classes screen, you can maintain data classes as follows: Change data classes Add new data classes Delete data classes

Changing Data Classes


1. On the Data Classes screen, select a data class and choose the Edit pushbutton. 2. If required, change the description in the Change Data Class dialog box. 3. Change the tablespace assignment by selecting an entry from the dropdown list in the Data Tablespace field. 4. Save your changes. Caution Changing the related tablespaces does not affect already existing tables. It only has an impact on new tables. End of the caution.

Adding Data Classes


1. On the Data Classes screen, choose the Add pushbutton. 2. In the Add Data Class dialog box, specify a name for the data class using the naming conventions for customer-defined data classes. If you do not follow these naming conventions, you might receive an error message. Caution If you do not define data classes according to the naming conventions, this has an impact on future upgrades of your system. Such entries are not recognized as customer entries and will be lost during the upgrade. End of the caution. Note You cannot enter a value in the Category field. It always has the value USR. End of the note. 3. Enter a description. 4. Select a data and index tablespace from the dropdown list. 5. Save your entries.

226

September 2011

7 Configuration

Deleting Data Classes


1. On the Data Classes screen, select a data class and choose the Delete pushbutton. 2. Confirm the deletion.

7.13 Configuration: Data Collection Framework


The following sections provide information about how to use the data collection framework (DCF) to collect history data of the monitored databases: Collector Configuration Setup of Workloads and Service Classes in SAP Environments Note The data collection framework is based on predefined templates. For information about these templates, see Maintaining Templates for the DCF [page 35]. End of the note.

7.13.1 Data Collection Framework: Collector Configuration


The Collector Configuration screen provides an overview of the state of the installed history data collectors. You can use this screen to change the configuration of specific data collectors. Furthermore, you can set up the data collection framework (DCF) using templates as described in Setting Up the Data Collection Framework (DCF) Manually [page 34]. You can access information about the history data collectors by calling the DBA Cockpit and choosing Configuration Data Collection Framework Collector Configuration on the Database tab page of the DBA Cockpit. In the central system data area of the Collector Configuration screen, status messages are displayed that provide information such as the following: Tablespace status If the database is not enabled for automatic storage and the SAPTOOLS or SAPEVENTMON tablespaces are not available, the appropriate messages with detailed setup information are displayed. If back-end automatic update is enabled or disabled By default, the automatic back-end update function is enabled. This means that once per day, the installed data collection framework is checked. If it needs to be updated due to SAP code changes or database changes, these updates are performed automatically. Which task scheduler is used By default, the DB2 Administrative Task Scheduler is used to execute the stored procedures regularly. However, in some DB2 V9.1 scenarios, the DB2 Administrative Task Scheduler is not available so that you have to use an external scheduler. If you upgrade the database at a later date to a version that supports the DB2

September 2011

227

7 Configuration

Administrative Task Scheduler, you can migrate the tasks to the DB2 Administrative Task Scheduler using the Migrate to DB2 Admin Task Scheduler link. In the content area, the following information is displayed: Column Name of the data collector Data Collector Typically, the name refers to the data that is collected, for example, the data collector Tables stores table-related metrics in the history tables. Type of data collector The following collector types are possible: SAP Data Collection and Preparation (STP) These data collectors have their own mechanism to calculate the delta of the different snapshots. Type DB2 Event Monitor and Preparation (STP) A DB2 event monitor is used to store the data in tables. Cleanup of Message Logs (STP) The Framework data collector is not a typical data collector type, but a cleanup job for the messages generated by the above mentioned data collector types. Indicates the setup status The following values are possible: Green: The data collector is set up as intended. Yellow: Setup The data collector is not set up properly. We recommend that you repair the data collector. Red: The data collector is not set up. Set up the data collector according to the assigned template. Gray: The data collector is not set up and the assigned template also marks this data collector to be deactivated. Collection Interval Schedule of the data collector Description

228

September 2011

7 Configuration

Column State of the DB2 event monitor

Description

The following values are possible: Green: The DB2 event monitor is set up as intended. Yellow: Event Monitor Active The DB2 event monitor is not set up properly. We recommend that you repair the data collector. Red: The DB2 event monitor is not set up. Set up the data collector according to the assigned template. Gray: No DB2 event monitor is used by the data collector. Available Days Days Kept in History Size on Disk (MB) Errors Availability of the collected data for the given number of days as of now Number of days of the sliding history window The data in the history is deleted after this number of days. Space consumption in the local history of the data that is stored by the data collector Number of errors that the data collector has captured and that the scheduler has recorded Number of warnings that the data collector has captured and that the scheduler has recorded

Warnings

Maintaining History Data Collectors


To maintain history data collectors, that is, for example, to set them up, change, or analyze them, or to remove data from them, choose a data collector from the list. In the content detail area of the Collector Configuration screen, the Configuration and Data Collector Log tab pages appear displaying the relevant data collector details.

September 2011

229

7 Configuration

Depending on your setup status, you can proceed with the following maintenance actions: Action Setup Status Steps to Be Performed On the Configuration tab page, choose the Set Up pushbutton. Setting up a Gray or red as the data single history data collector is not set up yet collector Note You must set up the Framework collector before all other data collectors. End of the note. Yellow as the data Repairing a single collector is set up but history data should be updated or collector needs to be repaired

On the Configuration tab page, choose the Repair pushbutton.

Changing a single history data Green collector

1. On the Configuration tab page, choose the Change Settings pushbutton and enter your changes. 2. To apply your changes, choose the Apply Changes pushbutton. If you want to discard your changes, choose the Reset Changes pushbutton. On the Configuration tab page, choose the Prune pushbutton. By doing so, the collected data and the generated messages of the data collector are removed. On the Configuration tab page, choose the Drop pushbutton. On the Data Collector Log tab page, you can choose between the following pushbuttons:

Removing data of a single history Yellow or green data collector Dropping a single history data Yellow or green collector

Analyzing a single history data Yellow or green collector

Show Error Messages Show Warnings Show Information Messages

230

September 2011

7 Configuration

7.13.2 Setup of Workloads and Service Classes in SAP Environments


If the database that is set up for historical monitoring belongs to an SAP system with SAP Basis Release 6.20 or higher and if the database release level is at least DB2 V 9.5, a set of SAP-specific workloads and service classes is created with the Framework data collector. Dedicated workloads are created to identify each of the work process types in an SAP environment, that is, one workload per SAP work process type. Each of these workloads is then assigned to its own service class. This setup lets you prioritize and monitor work per SAP work process type. This means that the drill-down capabilities of monitoring data in an SAP environment are improved significantly. The following work process types are identified in an SAP environment: ABAP dialog ABAP batch ABAP spool ABAP updater (primary and secondary) Java (if available) Note Since the SAP Enqueue work process is not connected to the database, no workload and service class are created for this type of work process. End of the note. All work coming from outside the SAP system still runs in the DB2 default workload and service classes.

September 2011

231

7 Configuration

The following figure provides an overview of the workloads and service classes that are created:
Workloads
SAP_ABAPDIA_WL

Service Subclasses
SAP_ABAPDIA_SSC

Service Superclasses

SAP_ABAPBTC_WL

SAP_ABAPBTC_SSC

SAP_ABAPSPO_WL

SAP_ABAPSPO_SSC

SAP_ABAPUPD_WL

SAP_ABAPUPD_SSC

SAP_SC

SAP_ABAPUPD2_WL

SAP_ABAPUPD2_SSC

SAP_JAVA_WL

SAP_JAVA_SSC

SAPTOOLS_WL

SAPTOOLS_SSC

SAP_DIAGNOSTIC_WL

SAP_DIAGNOSTIC_SSC

DB2_ATS_WL

DB2_ATS_SSC

DB2_SC

Overview of Workloads and Service Classes The SAP_DIAGNOSTIC_WL workload as well as the SAP_DIAGNOSTIC_SSC service class are created for SAP-internal use. Currently, no work is executed in this service class. The SAP_SAPTOOLS_WL workload as well as the SAP_SAPTOOLS_SSC service class are created to separate work that originates from SAP monitoring tools. You can monitor the SAP_SAPTOOLS_SSC service class to determine the amount of resources that are consumed by SAP monitoring tools such as the DBA Cockpit or the Performance Warehouse. The DB2_ATS_WL workload as well as the DB2_ATS_SSC service class are created to separate work that is executed by the DB2 task scheduler. The DCF uses the DB2 task scheduler to execute the data collectors. Since in typical SAP systems no other component uses this mechanism, the workload that is measured on this service class is caused by the DCF of the DBA Cockpit. The service superclass SAP_SC is only created for structural reasons. No work is executed in service superclasses. In addition to the default workloads and service classes that are created in SAP environments, you can set up additional workloads and service classes as described in Workload Management: SAP WLM Setup Status [page 205].

232

September 2011

7 Configuration

7.14 Configuring Monitoring Settings


Using Monitoring Settings screen, you can perform the following actions to configure the monitoring settings: Change the retention periods for history data This applies only to systems where you have selected Collect History Data when configuring your database for remote monitoring. For more information, see Configuring Systems for Remote Monitoring Manually [page 23]. Activate the automatic switching of the db2diag.log file Note If the DBM configuration parameter DIAGSIZE is set, this function is not available for DB2 V9.7. End of the note. Specify a dedicated server for the background processing

Procedure
1. Call the DBA Cockpit and choose Configuration Database tab page of the DBA Cockpit. Monitoring Settings on the

2. On the Monitoring Settings screen, choose the Change pushbutton. 3. Enter your changes in retention time of the statistics in the relevant fields under Database and Tablespace Size, Table and Index Size, and Database Performance. 4. If you want to switch the db2diag.log file to automatically restrict its size to a manageable value, select the Switch Weekly checkbox. This means that the db2diag.log file is saved under a new name with a time stamp and a new db2diag.log file is created. 5. If you want to collect history data on a dedicated background server, specify a server in the Server for Data Collection field by choosing a name from the dropdown list. 6. Save your changes.

September 2011

233

8 Jobs

8 Jobs
The following sections provide information about the main task areas that are available under Jobs on the Database tab page of the DBA Cockpit: DBA Planning Calendar DBA Log Back-End Configuration SQL Script Maintenance Scheduled DB2 Tasks

8.1 The DBA Planning Calendar


You use the DBA Planning Calendar to automate database administration actions that have to be performed regularly. You can schedule operations such as online backups that are then automatically performed, and you can check if the operations were successful. The main function of the DBA Planning Calendar is to define the start times and parameters for database actions. Since these actions run without administrator interaction, you have to make sure in advance that the necessary resources are available.

Integration
The DBA Planning Calendar is part of the DBA Cockpit. You can start the DBA Planning Calendar by calling the DBA Cockpit and choosing Jobs DBA Planning Calendar on the Database tab page of the DBA Cockpit.

Features
The initial screen of the DBA Planning Calendar consists of a Selection area and the calendar. In the following, both are described in more detail.

The Selection Area


The Selection area contains all information and parameters to select the set of actions to be displayed. You can: Select the category of an action: o DBA Actions These are plannable actions. o External Actions These are plannable actions that have not been started via the DBA Planning Calendar but that have been started manually or by external job schedulers. o All Actions These are all plannable actions, regardless how they have been scheduled.

234

September 2011

8 Jobs

DB Collectors These are actions that are automatically selected by the system to collect data, for example, on performance or history and that are only available for RFC-monitored systems.

Select the week to be displayed The default is the current week. To navigate to another week, use the F4 help. Select a factory calendar Specifying a factory calendar only has an impact on the calendar display. Holidays are the same color as weekend days. It does not result in any restrictions on planned actions.

The Calendar
The calendar displays all scheduled jobs. The status of each job is indicated using different colors. To display the meaning of each color, choose the Legend pushbutton. The following information is displayed: Color Light blue Dark blue Green Status Planned Description The action has not yet started. Action

Running Finished successfully Finished with warning Finished with error No longer available Scheduling failed

The action has not yet finished.

The action has run successfully. The action has finished with a warning. An error has occurred and the action was interrupted. No more information is available. Scheduling failed, that is, there is no status available and the action is overdue.

Check the job log for details. Check the job log for details and reschedule the action.

Yellow

Red Dark yellow Dark red

Note By default, the DBA Planning Calendar appears in display mode. To switch to editing mode, choose the Change pushbutton in the global toolbar. End of the note.

September 2011

235

8 Jobs

More Information
Setting Up and Working with the DBA Planning Calendar Scheduling Typical DBA Actions

8.1.1 Setting Up and Working with the DBA Planning Calendar


The following sections provide information about setting up the DBA Planning Calendar initially and how you perform standard actions, such as: Creating a Pattern of Actions in the DBA Planning Calendar Scheduling an Action Changing an Action Deleting an Action Executing an Action Displaying Scheduled Actions Troubleshooting

More Information
Scheduling Typical DBA Actions [page 244]

8.1.1.1 Creating an Action Pattern in the DBA Planning Calendar


You need to set up the DBA Planning Calendar because when you start your system for the first time, there are no actions planned. The most important thing when setting up the DBA Planning Calendar is to choose a pattern of actions that covers your regular database administration (DBA) needs and to specify all required action parameters that take account of any dependencies between actions. You must also consider that there is a number of database-related jobs (for example, performed by the DB2 scheduler) that are not controlled by the DBA Planning Calendar but which you must take into account when scheduling regular actions. Depending on the underlying DB2 version, some of these jobs might be automatically performed by data collectors of the DCF, or by automatic maintenance settings (for example, automatic RUNSTATS or automatic REORG). If, for example, the DCF has been enabled and correctly set up, you can view these data collectors on the Collector Configuration screen. For more information, see Data Collection Framework: Collector Configuration [page 227].

236

September 2011

8 Jobs

If the DCF is not enabled and the SAP history collection is used instead, the following jobs are involved: Collection of database performance history data done every two hours starting at 00:00 Monitoring of database and database manager configuration changes done daily at 8.00 am, 01.00 pm, and 7.00 pm Collection of database and tablespace history data done daily at 7:00 am and 8.00 pm Collection of space history data for tables and indexes done weekly on Sundays at 12.00 pm Caution Some of the available actions have an impact on database performance and availability. Check the start and end times of scheduled actions to make sure that they do not interfere with each other and that they do not impact other system activities. You cannot perform all required DBA actions from the DBA Planning Calendar or the DBA Cockpit. For more information about actions that you must perform with the SAP system down, such as an offline database backup, see the SAP Database Administration Guide for your database version. End of the caution. Optionally, you can configure the back end of the DBA Planning Calendar to be able to control the execution of these background jobs. For more information, see Back-End Configuration [page 258].

Prerequisites
Before you start using the DBA Planning Calendar, you have to check the following: SAP system authorizations Check that you have authorization for DBA and background job scheduling, which is provided by profiles S_RZL_ADMIN and S_BTCH_ALL. Check that external programs are able to run on the database server so that actions affecting the database can be performed from other application servers. Database system authorizations Check that actions requiring authorization to connect to the database are permitted. Some actions, such as online backup, require higher levels of authorization. Before scheduling database backups, see the information about backing up the database in the SAP Database Administration Guide for your database. Hardware and backup media Check that you have enough hardware (such as tape drives) and backup media (such as tapes) for the backup strategy you intend to use.

September 2011

237

8 Jobs

You make sure that the media are initialized and ready so that the operator does not have to interrupt scheduled backup runs. For example, check that tapes are already in the specified tape drive or tape changer. You might require different tape drives for database backups and log backups.

Procedure
1. On the Database tab page of the DBA Cockpit, choose Calendar . Note By default, the DBA Planning Calendar appears in display mode. To switch to editing mode, choose the Change pushbutton in the global toolbar. End of the note. 2. Choose the Pattern Setup pushbutton. The Setup Planning Pattern wizard appears guiding you through the procedure of setting up a pattern of recurring actions that cover your regular DBA needs. Note Depending on your database version and configuration, a set of recommended actions is available and some of these actions might be preselected by default. You may change this selection set, for example, if you want to use TSM for backup and archiving instead of backup and archiving to devices. End of the note. 3. To enter the pattern into the DBA Planning Calendar, choose the Execute pushbutton on the Summary screen. 4. Exit the wizard. Caution When you start using the DBA Calendar in production operation, you must check daily that scheduled actions have been executed correctly. End of the caution. Jobs DBA Planning

238

September 2011

8 Jobs

8.1.1.2 Scheduling an Action


Procedure
1. To add new actions to the DBA Planning Calendar, you can do one of the following: o o o Click a calendar cell. Position the cursor on a calendar cell and choose the Add pushbutton. Choose Schedule an Action in your Favorites.

The Schedule an Action wizard appears. 2. In the Job Selection step, do the following: 1. Choose the job that you want to schedule from the Action dropdown list. 2. Specify one of the following options: Option Start Immediately Start on Description The job starts immediately in the background after you have completed the required steps in the wizard. Specifies the date and time when the action is to start

Start as Recurring Activates the Recurrence step where you can further specify a recurrence Action pattern for this job as described later on in this section 3. In the Parameter step, change, or enter the basic parameters for the action. 4. Optional: If you previously selected the Start as Recurring Action option in the Job Selection step, you now have to enter a recurrence pattern in the Recurrence step. The following table describes the parameters to be specified in more detail: Parameter Description Interval for the action in weeks, days, or hours Recurrence Pattern Depending on the selected recurrence pattern, you need to specify the pattern in more detail, that is, the days of the week for weekly periods and the hours of the day for a daily period. The action is repeated at the interval that you enter. If you select Once only, the action is executed only once. Recurrence Range Range of time where the action recurs, that is, for a specific time interval or for a limited number of occurrences

September 2011

239

8 Jobs

Caution The system warns you if there is a conflict with an existing action, but it does not prevent you from inserting the new action. You must decide whether the actions might conflict in terms of database access or performance. The system does not check for conflicts between actions with identical start times but checks for actions within a range of approximately 30 minutes. End of the caution. 5. On the Summary screen, review the specified parameters and schedule the job by choosing the Execute pushbutton. 6. Exit the Schedule an Action wizard.

Result
The schedule of the DBA Planning Calendar is updated.

8.1.1.3 Changing an Action


This section tells you how to change an action in the DBA Planning Calendar. Note If you want to change a recurring action, the changes only affect recurrences of the action in the future. The action is split into two actions, one describing the old action, and one the new action. End of the note.

Prerequisites
The action to be changed must be in the state Planned (that is, not already executed). Note If an action has already been executed, you can only display it. For more information, see Displaying Scheduled Actions [page 242]. End of the note.

Procedure
1. In the DBA Planning Calendar, click a calendar cell that contains an action. The Action Description detail area appears displaying the action parameters and, if available, the recurrence pattern. 2. From the Change menu button, choose one of the following options: o If you want to edit the currently selected occurrence only, choose Selected Occurrence.

240

September 2011

8 Jobs

If you want to change all occurrences of a recurring job, choose All Occurrences.

The Change Scheduled Action dialog box appears displaying the action parameters and, if available, the recurrence patterns. 3. Apply and save your changes.

8.1.1.4 Deleting an Action


This section tells you how to delete an action from the DBA Planning Calendar.

Prerequisites
The action to be deleted must be in the state Planned (that is, not already executed).. Note If an action has already been executed, you can only display it. For more information, see Displaying Scheduled Actions [page 242]. End of the note.

Procedure
1. In the DBA Planning Calendar, click a calendar cell that contains the action to be deleted. The Action Description detail area appears displaying the action parameters and, if available, the recurrence pattern. 2. From the Delete menu button, choose one of the following options: o o If you want to delete the currently selected occurrence only, choose Selected Occurrence. If you want to delete all occurrences of a recurring job, choose All Occurrences.

8.1.1.5 Executing an Action


You might have to reschedule an action, for example, after it has failed or if there is a resource bottleneck that needs immediate reaction.

Procedure
1. Click the action that you want to re-execute. The Action Description detail area of the action appears where you can check the action parameters. 2. Choose the Re-Execute pushbutton.

Result
The action is rescheduled starting at the current time.

September 2011

241

8 Jobs

8.1.1.6 Displaying Scheduled Actions


From the DBA Planning Calendar, you can view all action-related information. This includes: Action parameters Job logs if the action has already run These logs provide detailed information on the results of an action. Recurrence patterns The status of an action is indicated by the color of the calendar cell where an action is inserted.

Procedure
To display a scheduled action, click a calendar cell that contains an action. The Action Description detail area appears displaying scheduling information or the return status of a finished action. The following tab pages are displayed: Action Parameters Displays the parameters of the action Recurrence Displays the recurrence patterns and only appears if the action is part of a recurring action Job Log The background processing job log generated by the action is displayed under Job Log. All messages that have been written by the background job are also displayed. To display long texts, if any are available, double-click a message. Program Log Some actions write log files onto the database server. If such a program log exists, it is displayed on this tab page.

242

September 2011

8 Jobs

8.1.1.7 Troubleshooting
Since any action scheduled in the DBA Planning Calendar can fail, you must at least check the more critical actions such as database backups. The following steps describe how you check whether a job was executed correctly and how to proceed if it failed.

Procedure
1. Check the status of the job in the DBA Calendar. The status of a job is indicated by different colors. If the job finished successfully, the calendar cell is marked green. 2. If the job terminated with a warning, an error, consult the job log. Note If there is no job log available, the background job was probably not started. In this case, proceed as follows: 1. In your SAP system, call transaction SM37 and display the job overview. The jobs related to the planning calendar start with the prefix DBA:. The complete name of such a job in SM37 contains a short description of what the job is about. The following is an example of, for example, a REORG job: DBA:REORG_TABLE_____@095534/4000. 2. To search for information about possible errors that prevented the job from being executed, double-click the respective background job in the overview list. End of the note. 3. Correct the error using the information that you found the job log or in transaction SM37, and reschedule the job in the DBA Planning Calendar. Make sure there are no conflicts with other scheduled actions before you reschedule this job. Note If you want to completely clean up your jobs, choose the Cleanup pushbutton. This deletes all jobs, all scheduling data, and all related protocol records. It also resets the DBA Planning Calendar to its initial state. We recommend that you clean up after an SAP system upgrade or if jobs have become corrupt. End of the note.

September 2011

243

8 Jobs

8.1.2 Scheduling Typical DBA Actions


As already described in previous sections, you can use the DBA Planning Calendar to automate administrative tasks that have to be performed on a regular basis, such as: Scheduling backups Archiving log files to tape Updating statistics Reorganizing tables Scheduling a REORGCHK for all tables Scheduling scripts Running the NLS cleanup job Note Even though some of the tasks are already performed by DB2's automatic maintenance functions (for example, automatic RUNSTATS or automatic REORG), there may be situations when you have to explicitly update statistics or perform a REORGCHK for all tables. For more information, see Configuring Automatic Maintenance Functions [page 213]. End of the note.

8.1.2.1 Scheduling Database Backups


A database backup is a complete copy of your database. To be able to restore the database to a consistent state that is as up-to-date as possible, you have to perform database backups on a regular basis. You can perform database backups using the DBA Planning Calendar in the DBA Cockpit. Depending on the storage device that you are using, you can choose one of the following jobs: Database Backup into TSM You back up the database to Tivoli Storage Manager (TSM). Database Backup to Device You back up the database to a specified tape or disk. Database Backup with Vendor Library You back up the database to any other vendor storage management product.

244

September 2011

8 Jobs

Snapshot Backup You back up the database using the fast copying technology of a storage device. Caution This job is only available as of DB2 V9.5. End of the caution.

Procedure
1. To schedule a database backup in the DBA Planning Calendar, click a calendar cell or choose the Schedule an Action link in your Favorites. The Schedule an Action wizard appears guiding you through the procedure. In the Parameters step, specify the following parameters: Parameter Backup Mode Online Access to the database is not blocked. The users can continue to work normally during the backup. Note This option is no longer supported and is displayed only for upward compatibility reasons. Backup jobs that have this option are automatically performed as online backups with the Include Logs option. End of the note. Backup Type Full The complete database is backed up. Cumulative (that is, incremental) backup image Incremental An incremental backup image is a copy of all database data that has changed since the most recent successful full backup operation. Non-cumulative (that is, delta) backup image Incremental Delta A delta backup image is a copy of all database data that has changed since the most recent successful backup operation. Description

Offline

September 2011

245

8 Jobs

Additional Options Compress The backup is to be compressed. Note Only choose this option if you want to perform an online backup. Include Logs End of the note. Only those log files are included in the backup that are required to get a consistent database. Any further log files are not taken into consideration. Caution The following options are only available for downward-compatibility reasons and we strongly recommend that you do not set them: o o o Number of Buffers Buffer Size Parallelism

End of the caution. 2. Schedule the job by choosing the Execute pushbutton on the Summary screen of the Schedule an Action wizard. 3. Exit the wizard

8.1.2.1.1 Backup Considerations


When performing a backup, you should consider the following: Regardless of the selected backup mode, you can only restore the database if you have at least one valid full backup. To restore the database completely and to bring the system up-to-date, you have to roll in the log files that were generated after the backup was performed. The database may be local or remote. The backup, however, remains on the database server unless a storage management product, for example, Tivoli Storage Manager (TSM), is used. After an online backup, DB2 forces the currently active log files to be closed and as a result they are archived. Therefore, an online backup has a complete set of archived log files that are available for database recovery.

246

September 2011

8 Jobs

Backup of a MultiPartition Database


You have to back up partition by partition. Therefore, you have to schedule backup jobs for each partition. In a multipartition database system, keep a copy of file db2nodes.cfg with any backup copy that you take. This copy of file db2nodes.cfg is used as a safety copy in case of possible damage to the original file. Note As of DB2 V9.5, a single system view backup is available that performs the backup for all database partitions in one job. You can use this option by choosing the value All for the database partition in the Schedule an Action wizard. End of the note.

Frequency of Backups and Time Required


You should take full database backups on a regular basis, regardless of how often log files are archived. A current full backup means that there are fewer archived log files that you have to apply in case of a database recovery. Therefore, the amount of time that is required by the ROLLFORWARD utility to recover the database decreases. In addition, the chance of a log file not being available (for example, due to data corruption or data loss) also decreases. To reduce the amount of time that the database is not available, we recommend that you consider performing online backups. Note You can only use an online backup for recovery if the database log files that were created during the online backup are available. End of the note.

Advanced Backup Techniques


The following list provides information on advanced backup techniques: Incremental or delta backups To reduce the backup and restore time, you can use incremental or delta backups. For more information, see the IBM manual Data Recovery and High Availability Guide and Reference. Backup of a file system copy using the db2inidb tool For more information about the db2inidb tool and its use as a mirror for a backup based on a file system, see the Database Administration Guide: SAP on IBM DB2 for Linux, UNIX, and Windows. Standby database for backup purposes For more information about how to use the db2inidb tool to create a standby database for backup purposes, see the Database Administration Guide: SAP on IBM DB2 for Linux, UNIX, and Windows.

September 2011

247

8 Jobs

More Information
Database Administration Guide: SAP on IBM DB2 for Linux, UNIX, and Windows at: http://service.sap.com/instguidesnw Database-Specific Guides <Your SAP NetWeaver Release> Operations

8.1.2.2 Archiving Log Files To Tape


You can archive log files to tape using the job Archive Log Files to Tape in the DBA Planning Calendar.

Procedure
1. Start the Schedule an Action wizard by clicking a calendar cell or by choosing the Schedule an Action link in your Favorites. 2. In the Job Selection step, choose Archive Log Files to Tape from the Action dropdown list. 3. In the Parameter step, specify the required parameters. Note The DB2 tape manager is used to archive log files to tape. Besides the standard parameters (for example, start time, date, number of log files to be saved, and tape label), you can also specify the option of the tape manager to use for archiving log files: o o o Double Store Overwrite Expired Tapes Eject Tape at End of Operation

For more information, see the Database Administration Guide SAP on IBM DB2 for Linux, UNIX, and Windows. End of the note. 4. Schedule the job by choosing the Execute pushbutton on the Summary and exit the wizard.

More Information
Database Administration Guide SAP on IBM DB2 for Linux, UNIX, and Windows at: http://service.sap.com/instguidesnw Database-Specific Guides <Your SAP NetWeaver Release> Operations

248

September 2011

8 Jobs

8.1.2.3 Updating Statistics


You can use the DBA Planning Calendar to schedule an update of the database statistics. In general, DB2 updates the database statistics automatically using its automatic RUNSTATS function. If the automatically maintained statistics need to be up-to-date or if a different type of statistics other than DB2s default is required, you can schedule the job RUNSTATS and REORGCHK for Set of Table in the DBA Planning Calendar. This job performs a RUNSTATS for a single table or a set of tables that is specified by a name using wildcards. Recommendation Since the RUNSTATS can affect system performance in case of large tables, we recommend that you schedule the job RUNSTATS and REORGCHK for Single Table to run outside normal working hours, for example, on Sundays. End of the recommendation.

Procedure
1. Start the Schedule an Action wizard by clicking a calendar cell or by choosing the Schedule an Action link in your Favorites. 2. In the Job Selection step, choose RUNSTATS and REORGCHK for Set of Tables from the Action dropdown list. 3. In the Parameters step, do the following: o o Specify the tables where the statistics are to be updated. You can use wildcards for the table names. Specify how you take statistic profiles into account by choosing one of the following options: Use Customized Settings or Existing Profiles For tables that have statistic profiles, the RUNSTATS is performed using exactly the same settings as specified in the profile. For all other tables, the RUNSTATS is performed as specified in the wizard. Use Customized Settings Ignoring Existing Profiles If you choose this option, the RUNSTATS is performed as specified in the wizard regardless whether or not statistic profiles exist. o Specify the following settings for the RUNSTATS: Field Table Analysis Method Basic Distributed Statistics Basic statistics for the table Distributed statistics for the table Description

September 2011

249

8 Jobs

Field No statistics for the table Caution None

Description

Selecting this option only freezes already existing old table statistics but it does neither delete nor invalidate them. End of the caution. Percentage of entries to be used for sampling Sampling of [ ] %of entries Caution This field is only active if you are using DB2 UDB for UNIX and Windows Version 8, FixPak 2 or higher. End of the caution. The data to be sampled is selected page by page. System (Page, Sampling) Caution This field is only active if you are using DB2 UDB for UNIX and Windows Version 8, FixPak 2 or higher. End of the caution. The data to be sampled is selected row by row. BERNOULLI (Row Sampling) Caution This field is only active if you are using DB2 UDB for UNIX and Windows Version 8, FixPak 2 or higher. End of the caution. Analyze Key Columns Table statistics are gathered only for key columns of the table. only Index Analysis Method Basic Detailed Statistics Detailed Sampled Statistics Basic statistics for the index are gathered. Detailed statistics for the index are gathered. Detailed statistics for the index using sampling are gathered.

250

September 2011

8 Jobs

No statistics for the index are gathered. Caution None Selecting this option only freezes already existing old index statistics but it does neither delete nor invalidate them. End of the caution. o If you have specified more than one table, you can choose the degree of parallelism by setting the value for Number of Parallel Jobs higher than one. In this case, the RUNSTATS job can be parallelized if there are enough system resources available (for example, background processes and the appropriate number of processors). Doing so results in additional jobs that are scheduled by the regular DB13 job and which perform the RUNSTATS on tables in parallel. The SAP system makes sure that the number of parallel jobs does not exceed the number of available background processes. Caution Handle the parameter Number of Parallel Jobs with care. Starting more jobs can have a high impact on the overall system performance even though the parameter Number of Parallel Jobs significantly reduces the amount of time for the job execution. End of the caution.

o o

4. Schedule the job by choosing the Execute pushbutton on the Summary screen and exit the wizard.

September 2011

251

8 Jobs

8.1.2.4 Reorganizing Tables


You can use the DBA Planning Calendar to schedule a reorganization of a set of tables. In general, DB2 reorganizes the tables using its automatic REORG function. If a reorganization is required that is not covered by automatic REORG ( for example, due to table compression), you can schedule the job REORG and RUNSTATS for Set of Tables in the DBA Planning Calendar.

Procedure
1. Start the Schedule an Action wizard by choosing the Schedule an Action link in your Favorites or by clicking a calendar cell. 2. In the Job Selection step, choose REORG and RUNSTATS for Set of Tables from the Action dropdown list. 3. In the Parameters step, specify the following parameters: Parameter Table Schema Table Description Name of the schema to which the table belongs Name of the table Schedules an offline reorganization Optionally, you can also specify the following parameters: o Use Temporary Tablespace If you select this option, a temporary tablespace is used for the reorganization. Note If no temporary tablespace is used for the REORG, it is performed in the tablespace where the table or index resides. You must make sure that there is enough free space in this tablespace (approximately the size of the table or index). If this tablespace already has a high I/O load, we recommend that you use a temporary tablespace for performance reasons. End of the note. o With Long Fields and LOB Data If you select this option, long field and LOB data areas are also reorganized. o Switch Compression on If you select this option, the table and its indexes are enabled for compression before the REORG operation is performed. o Reset Dictionary

Offline

252

September 2011

8 Jobs

Parameter

Description If you choose this option, a compression dictionary is rebuilt if the table is compressed or the Switch Compression on option is set. Otherwise, an existing compression dictionary is removed. o Keep Dictionary If you choose this option, an already existing compression dictionary is kept and not rebuilt. If the table is compressed or the Switch Compression on option is set and a dictionary does not yet exist, the compression dictionary is built. Note The compression-related options are only available for DB2 V9.1 and higher. End of the note.

Online All Indexes

Schedules an online reorganization of the table Schedules only a reorganization of all indexes Schedules a reorganization that reclaims space for MDC tables

Reclaim Space for MDC

Note This option is only available for DB2 V9.7 and higher. End of the note.

4. Schedule the job by choosing the Execute pushbutton on the Summary screen and exit the wizard.

8.1.2.5 Scheduling a REORGCHK for All Tables


Caution The following section only applies if your database is DB2 UDB for UNIX and Windows Version 8.2 or if the data collection framework has not been set up. End of the caution. You can use the DBA Planning Calendar to schedule an overall check of all tables using the job REORGCHK for All Tables. This job collects the following: REORG recommendations for tables and indexes that are provided by the DB2 REORGCHK command Information about current table and index sizes Recommendation The job REORGCHK for All Tables must run once a week.

September 2011

253

8 Jobs

End of the recommendation.

Procedure
1. Start the Schedule an Action wizard by clicking a calendar cell or by choosing the Schedule an Action link in your Favorites. 2. In the Job Selection step, choose REORGCHK for All Tables from the Action dropdown list. 3. In the Parameters step, specify the required parameters as follows: Parameter Description Specifies that the job is called for all tables All Tables By default, this parameter is selected. Specifies that this job is restricted to a set of tables If you choose this option, you also have to specify the Table Schema and Table Name. Selected Tables Note Only choose this option if you require an up-to-date analysis for the selected tables. End of the note. Analyzes the tables and checks for candidates to be compressed With Compression By default, you should not activate this option for the REORGCHK job that Check is scheduled weekly. For performance reasons, only perform compression checks in larger time-frames. Defines the minimum size limit for checking how much space can be saved by compressing the table. Recommendation We recommend that you set this limit to prevent too small tables that do not benefit from row compression from being checked. End of the recommendation. Note You can only specify this value if you have chosen With Compression Check. End of the note. Maximum Runtime Restricts the runtime of this job

Minimum Table Size for Check

254

September 2011

8 Jobs

4. Schedule the job by choosing the Execute pushbutton on the Summary screen and exit the wizard.

8.1.2.6 Scheduling Scripts


You can use scripts to schedule time-consuming and non standard database administration tasks using the job CLP Script.

Procedure
1. Start the Schedule an Action wizard by clicking a calendar cell or by choosing the Schedule an Action link in your Favorites. 2. In the Job Selection step, choose CLP Script from the Action dropdown list. 3. Specify SQL statements directly as job parameters. Note Alternatively, you can use scripts that have been created before. For more information, see The SQL Script Maintenance [page 259]. End of the note. 4. Save your entries by choosing the Execute pushbutton on the Summary screen. 5. Exit the wizard

8.1.2.7 Running the NLS Cleanup Job


Note The following section only applies if you are using a near-line storage (NLS) database for your local BW system. End of the note. When data is reloaded from the NLS database into the BW system, it continues to exist in the NLS database. It is marked, however, as invalidated. To remove this invalidated data and to reduce the space consumption in the NLS database, you can use the NLS Cleanup job in the DBA Planning Calendar.

Procedure
1. Start the Schedule an Action wizard by clicking a calendar cell or by choosing the Schedule an Action link in your Favorites. 2. In the Job Selection step, choose NLS Cleanup from the Action dropdown list.

September 2011

255

8 Jobs

3. In the Parameter step, specify the following: o o In the NLS Connection field, choose an existing NLS connection. In the InfoProvider field, choose the name of the InfoProvider.

Caution If you do not specify an InfoProvider, the cleanup is performed for all InfoProviders. To run the job for many InfoProviders with similar names, you can use the wildcard character *. End of the caution. 4. Save your entries by choosing the Execute pushbutton on the Summary screen. 5. Exit the wizard.

More Information
For more information about reloading data from the NLS database into the BW system, see the document Enabling an SAP NetWeaver BW to Use IBM DB2 for Linux, UNIX, and Windows as Near-Line Storage at: http://service.sap.com/instguidesnw <Your SAP NetWeaver Release> Installation - SAP NetWeaver Systems Installation

256

September 2011

8 Jobs

8.2 The DBA Log


The DBA log provides information about protocol records that are written by all databaserelated monitoring programs and administration tools. You can access the DBA log by calling the DBA Cockpit and choosing on the Database tab page of the DBA Cockpit. Jobs DBA Log

In the Selection area, you can specify a time frame for which you want to display data. After you have applied your selection, the following information is displayed: Column Partition Start Date Start Time End Date End Time Runtime Action Return Code Name of the partition Start date of the action Start time of the action End date of the action End time of the action Runtime in HH:MM:SS Description of the action Return code of the action Description

When you access the DBA log for the first time, the log information for the current week is displayed by default. For more information about an action, select an entry from the overview table. The Log Details area appears displaying more details about the log file.

September 2011

257

8 Jobs

8.3 Back-End Configuration


You can configure the back end of the DBA Planning Calendar to control the execution of background jobs. You can configure the back end for all systems, for selected database platforms, or for single systems only. The respective system configuration is determined by applying the first available configuration in the following order: 1. The system-specific configuration 2. The configuration for the database platform 3. The configuration valid for all platforms 4. The standard configuration, that is, the current user, selection of background server by background dispatcher, and low job priority

Configuration Steps
1. Call the DBA Cockpit and choose Database tab page. Jobs Back End Configuration on the

2. To switch to editing mode, choose the Change pushbutton. 3. In the Selected Scope area, choose the scope of the configuration entry. 4. In the Background Dispatching area, specify the following parameters: Field Description Server where scheduled jobs are executed Background Server If no server is specified, the background job dispatcher dynamically selects the server. Priority of the job Job Priority If no priority is specified, jobs run with default priority (low). Name of the user to execute the job User If no user is specified, the dialog user is used. 5. Save your changes.

258

September 2011

8 Jobs

8.4 The SQL Script Maintenance


You use the SQL Script Maintenance function to manage your own DB2 scripts.

Integration
The SQL Script Maintenance is part of the DBA Cockpit.

Activities
To access the SQL Script Maintenance, call the DBA Cockpit and choose Script Maintenance on the Database tab page. Jobs SQL

The SQL Script Maintenance screen appears displaying all the scripts located on your local monitoring system. You can perform one of the following actions: Action Display an existing SQL script Edit an existing SQL script Delete an existing SQL script Steps to Be Performed Choose an entry from the list. Detailed information is displayed in the SQL Script Details detail area. 1. Choose a script from the list and choose the Edit pushbutton. 2. Enter and save your changes in the Change Script dialog box. 1. Choose a script from the list and choose the Delete pushbutton. 2. Confirm the deletion. 1. To add a new script, choose the Add pushbutton. Add a new SQL script 2. In the Add Script dialog box, enter a name in the Script Name field and start editing. 3. Save the new script. 1. Choose a script from the list and choose the Execute pushbutton. 2. In the Execute SQL Script dialog box, enter the name of the SAP system where you want the script to be executed in the Execute SQL Script on System field. 3. To confirm your entry, choose the Execute pushbutton again. The CLP Output Tray appears showing an editor in the lower half of the screen where the result is displayed. Note As an alternative to the SQL Script Maintenance function, you can also use the DBA Planning Calendar to execute a script by using the CLP Script job as described in Scheduling Scripts [page 255]. End of the note.

Execute an existing SQL script

September 2011

259

8 Jobs

8.5 Scheduled DB2 Tasks


On the Scheduled DB2 Tasks screen, you can monitor the execution of tasks that have been scheduled from the DB2 Admin Task Scheduler and the status of the data collectors of the DCF. To access the Scheduled DB2 Tasks screen, call the DBA Cockpit and choose Scheduled DB2 Tasks . Jobs

In the Selection area, you can specify the time frame to be displayed. By default, the jobs of the current day are displayed. The following information is displayed: Column Name Name of the task Status of the task The following values are possible: RUNNING The task is currently running. COMPLETED Status The task has finished running. NOTRUN An error prevented the scheduler from calling the tasks procedure. UNKNOWN The task started running but an unexpected condition prevented the scheduler from recording the task outcome. This can occur if the system ends abnormally or a power failure happens while the task is running. Invocation Number of invocations so far Starting time of the task Time Started If the status is RUNNING, COMPLETED, or UNKNOWN, this value indicates the time when the task started running. The status is NOTRUN indicates the time that the task should have started. Time when the task finished running Time Finished This value is not set as long as the status is RUNNING. If the status is UNKNOWN, this value is the time when the task scheduler detected that the task was no longer executing and updated the status table accordingly. Description

260

September 2011

8 Jobs

Column

Description

Agent TID Agent thread ID of the application that executed the task Value displayed depends on the status this field. If the status is COMPLETED, this value indicates the SQL code that is returned by the CALL to the procedure. If the status is NOTRUN, this value indicates the SQL code of the error that SQL Code prevented the task from running. Note As long as the status is RUNNING or UNKNOWN, this value is not available. End of the note. SQL State The SQL state that is related to the SQL code Return Code Error Message Return code of the procedure that was called As long as the status is not COMPLETED, this value is not available Full message text corresponding to the SQL Code

September 2011

261

9 Alerts

9 Alerts
The following sections provide information about alerts: Alerts: Database System Monitoring in CCMS Alerts: Configuring Database System Monitoring Alerts: Alert Monitor Alerts: Alert Message Log Alerts: Alert Configuration

9.1 Alerts: Database System Monitoring in CCMS


The alert monitor checks snapshot data and the database history file. If a critical situation, for example, a threshold violation, is detected, alerts are raised so that you can recognize and solve problems at an early stage.

Integration
The monitoring functions are fully integrated into the CCMS alert monitoring and architecture.

Features
The following categories of information are monitored: Disk space of the tablespaces and file systems that are required for the database system Performance indicators such as the following: o o Access behavior of database buffers Lock behavior of the application, monitoring of deadlock situations, and lock escalations

Availability of backup and recovery mechanisms: o o Last available backup Availability of the log files that are necessary to achieve the current state of the database from the last available backup

Configuration parameters Availability data of tablespaces and containers Recommendation We recommend that you check the alert monitor daily for information about database system monitoring. End of the recommendation.

262

September 2011

9 Alerts

9.2 Alerts: Configuring Database System Monitoring


The DB2 database system monitoring has preconfigured check categories and parameters. Caution Only experienced users should make changes to the system check configuration. End of the caution. There are two complementary tools available for the configuration of database system monitoring: Configuration using general alert monitoring, that is: o Automatic e-mail notification The central, automated notification function informs you of an alert by e-mail. If you want to be notified as soon as an alert is raised, you have to define yourself as a recipient of mails generated by this function. o Background monitoring

Configuration of DB2-specific parameters

Enabling Automatic E-Mail Notification


1. Call transaction RZ21. The Monitoring: Settings and Tool Maintenance screen appears. 2. Choose Tool Definition and then Display Overview. 3. Scroll through the list until you find CCMS_OnAlert_Email. 4. Select this entry and choose application toolbar). List Selected Entries Edit (or Edit in the

The Monitoring: Tool Administration screen appears. 5. Choose Parameter. 6. Choose Tool Definitions tool bar). Display Change (or Display Change in the application

7. In the SENDER line in the Parameter value column, enter a valid user for your SAP system.

September 2011

263

9 Alerts

8. In the RECIPIENT line in the Parameter value column, enter a valid user for your SAP system who will be notified in the event of an alert. 9. Save your changes.

Activating Background Monitoring


1. Call transaction RZ21. 2. Choose Technical Infrastructure Dispatching . Caution If you do not enable your system for background monitoring, the system will not be monitored at all. End of the caution. Method Execution Activate Background

Configuring DB2-Specific Parameters


You can specify additional parameters, for example, assign logged values for given alerts. For more information, see Alerts: Alert Configuration [page 268].

264

September 2011

9 Alerts

9.3 Alerts: Alert Monitor


You can choose one of the following options to retrieve information about alerts: For an overview of alert situations, call the DBA Cockpit and choose Alerts Alert Monitor on the Database tab page of the DBA Cockpit. The Alert Monitor screen appears. To display the message log for an alert, select the relevant alert from the tree structure. To start a more detailed analysis, call transaction RZ20 and choose SAP CCMS Monitor Templates Database DB2 Universal Database for NT/UNIX in the tree structure CCMS monitor sets. Note If you want to use transaction RZ20 for remote database systems, choose SAP CCMS Monitor Templates Remote Database DB2 for Linux, UNIX, and Windows . End of the note.

Data Displayed in the Alert Monitor Tree


Regardless of the view variant you choose, information about the following is displayed: Space management Performance Backup/restore SAP consistency Health The checked parameters are displayed in the following colors depending on the type of message: Message Type Information Warning Error Note If a check resulted in a warning or an error, a short text is additionally displayed next to the parameter. End of the note. Green Yellow Red Color

September 2011

265

9 Alerts

9.4 Alerts: Alert Message Log


You can access an overview of the system monitoring results by calling the DBA Cockpit and choosing Alerts Alert Message Log on the Database tab page of the DBA cockpit. The Alert Message Log screen appears. To limit the display to specific error levels or check categories, you can use the list boxes in the Current Selection area. In the Object and Attribute fields, you can enable restrictions to single attributes. Additionally, you can specify a time period for which the messages are displayed. By default, the messages of the last seven days are displayed. Only the most important data is displayed in the overview. The results are displayed as notes, warnings, or errors and are sorted by log date by default. You can display more detailed information by selecting an alert message. The Alert Message Details area appears displaying the following: Alert Message Details Complete description of the attribute as displayed in the alert monitor tree Logged Data Information about the alert message, for example, type of error, reported value, and date and time when it occurred Description Description of the type of error and which value or parameter is being monitored

Deleting Alert Messages


You can delete alert messages from any given time period by selecting an alert message and choosing the Delete pushbutton. If you choose the Delete pushbutton without having selected an alert message, a dialog box appears. In the Date field, you can specify the date from which you want all messages to be deleted. You can also enter the category or partition as selection criteria. Caution To avoid that the log table becomes too large, automatic clean-up programs run and delete entries that are older than 30 days. End of the caution.

266

September 2011

9 Alerts

Displaying Data in the Alert Monitor Tree


1. Call transaction RZ20. The Alert Monitor Set screen appears. 2. Expand SAP CCMS Monitor Templates and double-click Database. 3. Expand DB2 Universal Database for NT/UNIX. 4. You can display information about the following: o o o o o Space management Performance Backup/restore SAP consistency Health

The checked parameters are displayed in the following colors depending on the type of message: Message Type Information Warning Error Green Yellow Red Color

If a check resulted in a warning or error, a short text is additionally displayed next to the parameter in the Open alerts view.

September 2011

267

9 Alerts

9.5 Alerts: Alert Configuration


The DB2 database system monitoring has preconfigured check categories and parameters. Caution Only experienced users should make changes to the system check configuration. End of the caution. The initial screen of the database-specific configuration provides you with an overview of all the configuration entries. You can access information about alert configuration by calling the DBA Cockpit and choosing Alerts Alert Configuration on the Database tab page of the DBA Cockpit. The Alert Configuration screen appears. On this screen, you can display alert configuration details and select configuration options using the list boxes in the Selection area. In addition, you can activate or deactivate an alert configuration entry by selecting or deselecting the checkbox in the Active column. Caution If you deactivate an alert configuration entry, you will no longer be notified of the respective alerts. End of the caution. For more information about an alert configuration entry, select one from the list. The Alert Configuration Details area appears displaying the following tab pages: Thresholds General (RZ21) Administration

Thresholds
This tab page displays the threshold statuses of an alert configuration as follows: Error Condition If the error is not corrected, normal operation is endangered. Warning Condition Limited operation, for example, with reduced performance Normal State Condition Each condition is described by a relational operator, a comparison value, and the unit of measurement for this value.

268

September 2011

9 Alerts

Maintaining Alert Conditions


1. To maintain these alert conditions, choose the Edit pushbutton. The Alert Configuration Details dialog box appears. 2. Maintain the configuration values according to which the system is monitored as follows: o Relational operators You can specify how the defined comparison value should be compared with the current value. In addition to the relational operators, you can enter whether a value should lie inside or outside of a range of values. A full colon ( : ) must separate the two values. You can also specify whether or not discrete values are within a set of explicit values. Semicolons ( ; ) must separate such values. o Comparison value You can specify a value, a list of values, or a value range depending on the operator. This value will later be compared with the currently measured value. o Unit of measurement of the comparison value You can specify the unit of measurement of the comparison value. This is important for time values, which are normally calculated internally in seconds, to be correctly converted before comparison. Note You do not have to enter values for every operation status. However, you must make sure that the sum of comparison values covers every possible value. If this is not the case, a special alert is triggered with the following message: There is no configuration entry for the logged value End of the note. 3. Save your entries. The changes take effect immediately.

General (RZ21)
This tab page displays the scheduling data from the basic alert monitor configuration for completeness reasons. You cannot change the values on this tab page. You can make changes using the general maintenance function (transaction RZ21) in the alert monitor.

Administration
This tab page displays the user, date, and time of the last changes.

September 2011

269

10 Diagnostics

10 Diagnostics
The following sections provide information about the main task areas under Diagnostics on the Database tab page of the DBA Cockpit: Audit Log Lock-Wait Events Missing Tables and Indexes Message History Dump Directory CLP Commands DB2 Logs Trace Status Cumulative SQL Trace

10.1 Diagnostics: Displaying the Audit Log


On the Audit Log screen, you can track changes to the database that were made from the DBA Cockpit and to the monitoring setup. Changes made from outside for example, using native database commands are not displayed here. To access the Audit Log screen, call the DBA Cockpit and choose Diagnostics Audit Log on the Database tab page of the DBA Cockpit. The Audit Log screen appears displaying the following information: Field Date Time System Action Command Object User Start date of the action Start time of the action Target system on which the action was performed Type of action (name of the action in the DBA Cockpit) Type of command (for example, ADD, DELETE, or EDIT) Name of the modified object (for example, database or tablespace name) Name of the SAP user who performed the action Description

From System System from where the action was performed In the Selection area, you can specify a time frame for which you want to display data. By default, the audit logs of the current week are displayed.

270

September 2011

10 Diagnostics

10.2 Diagnostics: Lock-Wait Events


You can access information about lock-wait events by calling the DBA Cockpit and choosing Diagnostics Lock-Wait Events on the Database tab page of the DBA Cockpit. Using the information provided on this screen, you can: Review lock wait events that occurred in the past and that were captured by the lock event monitor. By default, information about lock events is collected by the Lock Event data collector. For more information, see Data Collection Framework: Collector Configuration [page 227]. Review lock wait events that are currently occurring on the database server. In the Selection area, you can specify the time frame for which you want lock-wait events to be displayed as well as the type of lock-wait event, such as, lock waits, lock time outs, and lock waits with a specific lock time out. After having applied your selection, the total number of lock-wait events that occurred and that you selected in the Selection area is displayed in the Summary area. For each lock-wait event, the following information is displayed: Column Event Type Description Type of lock event, which can be a lock wait, a lock timeout or a deadlock

Event Occurrence Time when the lock event first occurred Time when the lock event was solved Event Resolution Note For events that are still existing, the status displayed is Still Existing. End of the note. Involved Agents Max. Wait Time Lock Objects Number of agents involved in the lock event Max. lock-wait time of any of the involved agents Database objects involved in the lock conflict

September 2011

271

10 Diagnostics

Activities
You can display the lock chain - or in case of a deadlock a log circle - of an event graphically by choosing a line from the overview table. To display details about the agents involved, select the appropriate agent in the graphical display. The Details of Agent <agent numer> detail area appears providing general information about the application the lock-waiting agent is working for as well as about the application the lock-holding agent is working for. In addition, information about the activity that is currently being executed or that was executed last by each agent is provided, such as, the SQL statement text and general information about the SQL statement (for example, the compilation environment). To show the current access plan of the statement, you can choose the EXPLAIN pushbutton. For more information, see The EXPLAIN Function [page 43]. To display the ABAP source code from where the SQL statement was executed, you can choose the Show Source pushbutton. Note The pushbutton is only available if the following applies: The SAP system on which the currently monitored database is running is an ABAP system. The SAP system has the minimum Support Package level as described in SAP Note 1493490. End of the note. Note If the lock event monitor has captured past activities or nested activities for a certain agent, the Activity History table appears providing information about the agent ID; its nesting level and the SQL statement executed by each agent. You can display detailed information for each activity by choosing a line in the Activity History table. The information is displayed in the Details of Activity <activity number> detail area. End of the note.

272

September 2011

10 Diagnostics

10.3 Diagnostics: Missing Tables and Indexes


Note This function is only available for local systems or for ABAP systems for which an additional RFC destination has been assigned. End of the note. You can find out whether tables or indexes are missing from either the database or the ABAP Dictionary by calling the DBA Cockpit and choosing Diagnostics Missing Tables and Indexes on the Database tab page of the DBA Cockpit. The results of the last consistency check are displayed in a tree structure that is grouped into the following sections: Section Description

Objects missing from Objects that are defined in the ABAP Dictionary, but not found in the the database database Unknown objects in Objects that are found in the database, but not defined in the ABAP the ABAP Dictionary Dictionary Inconsistent objects Results of the detailed comparison of the ABAP Dictionary and the database are displayed here Different checks are performed here: It is checked whether the primary index of tables defined in the ABAP Dictionary was created uniquely on the database. Other checks Objects in the SAP system tables are checked, which cannot be described at all or which cannot be completely described in the ABAP Dictionary for technical reasons. If inconsistencies for these objects are detected, they are also displayed here. In general, additional information about the type of inconsistency is provided. Optional indexes Mismatch between ABAP Dictionary and database regarding secondary indexes

If the database structure has been changed since the last consistency check, choose the Refresh pushbutton. Recommendation To ensure consistency between the ABAP Dictionary and the database, the consistency check should be performed once a month or whenever the database structure has changed. End of the recommendation.

September 2011

273

10 Diagnostics

10.4 Diagnostics: Dump Directory


The DB2 dump directory contains the following files: DB2 diag log (db2diag.log) DB2 notification log (<instance_name>.nfy) DB2 dump files User exit log and error files Trace files The system displays the content of the directory specified by the diagnostic data directory path (diagpath). This path is configured in the database manager configuration. You can access the dump directory by calling the DBA Cockpit and choosing Dump Directory on the Database tab page of the DBA Cockpit. Note If you want to display the content of an error log or a trace file, click the relevant file. The File Viewer area appears displaying the file contents. End of the note. Diagnostics

10.5 Diagnostics: CLP Commands


Note This function is only available for DB2 V9.1 with at least Fix Pack 7 or for DB2 V9.5 with Fix Pack 1 and higher. End of the note. You can access detailed information about CLP commands by calling the DBA Cockpit and choosing Diagnostics CLP Commands on the Database tab page of the DBA Cockpit. By selecting a specific database area from theCLP Commands dropdown list (for example, Database Configuration) and choosing the Apply Selection pushbutton, the corresponding DB2 CLP native commands are performed and the native output is provided on the CLP Commands screen. Note The information provided on the CLP Commands screen is available in a formatted way also on other screens, for example, the Database screen in the Performance task area. But in contrast to these screens that only provide data for current database releases, the native view can provide the complete data also for future database releases. End of the note.

274

September 2011

10 Diagnostics

10.6 Diagnostics: DB2 Messages


The following sections provide information about the history of messages that are written to log files as well as information about all relevant DB2 log files: Message History Note This function is only available if the monitored database is DB2 V9.7 or higher. End of the note. Diagnostic Logs Note This function is only available if the monitored database is DB2 V9.5 or higher. End of the note.

10.6.1 DB2 Messages: Message History


Note This function is only available if the following applies: The monitored database is DB2 V9.7 or higher. The data collection framework is set up properly. In particular, you have to ensure that the Diag Log data collector is correctly configured because it keeps a local history of special db2diag.log and notification log entries. For more information, see Data Collection Framework: Collector Configuration [page 227]. End of the note. On the Message History screen, information about relevant DB2 errors and informational messages are displayed that help you identify database events, for example, backup and recovery, performance bottlenecks, or critical situations. You can access information about the history of messages that are written to log files by calling the DBA Cockpit and choosing Diagnostics Message History on the Database tab page of the DBA Cockpit. In the Selection area, you can do the following: Specify a time frame for which you want to display log file messages. Set additional filter criteria by using the keyword search in the Message Code and Message Text fields. You can use the asterisk (*) character in these fields. Select if you also want the diagnostic messages and the blacklisted messages to be displayed.

September 2011

275

10 Diagnostics

How to maintain the blacklist is described later in this section. Choose one of the following options in the Display Type field: Show All Messages No grouping is applied, but all messages are displayed. By default, this option is preselected. Group by Message Code In the result list, all occurring messages are grouped by message code. Group by Message Text In the result list, all occurring messages are grouped by message text. Note If you choose one of the grouping options, only the first message of the chosen grouping type is displayed in detail. The Count column indicates the total number of messages of this grouping type. End of the note. After you have applied your selections, the following information is displayed: Column Time of Collection Description Time when the message was created Time when the message was created Note Time Stamp of This column replaces the Time of Collection column if you have chosen one First Message of the grouping options as display type. Only the first message is displayed in detail whereas the other messages are only added up and given as a total number. End of the note. Identifier for the database member from which the data was retrieved Member Note This column is only visible in a DPF system. End of the note. Total number of messages matching the Display Type criteria Count Note This column is only visible if you have chosen one of the grouping options as display type.

276

September 2011

10 Diagnostics

Column End of the note.

Description

Message type that is related to the message identifier Message Type Example ADM is used for administration or notification log messages. End of the example. Message number of the associated message Message Number Example 6102 is the numerical part of the ADM6102I message code. End of the example. Indicates the severity level of the message The following values are possible: C Indicates a critical situation E Indicates that an error occurred Level I Displayed message is only informational S Indicates a severe situation, for example, deadlocks have been detected W Indicates that the message contains a warning

September 2011

277

10 Diagnostics

Qualifies the impact of the message from a DBAs perspective The following values are possible: CRITICAL Impact IMMEDIATE NONE POTENTIAL UNLIKELY Message Text Short description of the message

Displaying Details and Maintaining the Message Blacklist


You can display the complete log record by selecting a line in the overview table. The Message History Details area appears displaying details about the selected message. If you want to remove unwanted messages permanently from the result list, you can do so by selecting the relevant message rows and choosing the Add to Blacklist pushbutton. In the blacklist, the messages are listed by message code, for example, ADM5540. To edit the blacklist, that is, to remove a message code or to completely reset the entire blacklist, choose the Maintain Blacklist pushbutton.

278

September 2011

10 Diagnostics

10.6.2 DB2 Messages: Diagnostic Logs


Note This function is only available if the monitored database is DB2 V9.5 or higher. If your database is DB2 V9.1 or lower, refer to the following sections: Diagnostics: Database Notification Log Diagnostics: Database Diag Log These sections are part of an earlier version of this document. For more information, see Database Administration Using the DBA Cockpit: IBM DB2 for Linux, UNIX, and Windows For SAP Systems based on SAP Enhancement Package 1 for SAP NetWeaver 7.0 available at: http://service.sap.com/operationsnw70 End of the note. The Diagnostics Logs screen provides you with information about all relevant log files of DB2 including the following: The database diagnostic log (db2diag.log) Note Since DB2's automatic RUNSTATS have been introduced, the db2diag.log can rapidly grow in size up to several gigabytes depending on the value of the DIAGLEVEL database configuration parameter. By default, the value of this parameter is 3. We therefore recommend that you regularly switch the db2diag.log using the automation function as described in Configuring Monitoring Settings [page 233]. End of the note. The database notification log (<instance_name>.nfy) The statistics log You can access the DB2 logs by calling the DBA Cockpit and choosing Diagnostic Logs on the Database tab page of the DBA Cockpit. DB2 Messages Database-Specific Guides

To avoid unnecessary system workload, you can restrict the amount of data that is processed by specifying the following in the Selection area: A Log Facility A Record Type The minimum impact level (Impact) A time range (Messages From / To)

September 2011

279

10 Diagnostics

If you apply your selection, information according to the specified values is displayed including the appropriate DB2 component. To display additional details about a log entry, click the relevant entry in the list.

10.7 Diagnostics: Trace Status


Note This function is only available for local systems or an RFC connection. If the RFC connection already exists, make sure that the software release level on the target application server is sufficient. End of the note. You can access information about the current trace status by calling the DBA Cockpit and choosing Diagnostics Trace Status on the Database tab page of the DBA Cockpit. On the Trace Status screen, the following information is displayed: DBSL Trace Description Specifies the amount of data to be traced The following trace levels are available: Trace Level 0 or 1: Trace is off. 2: Only statements are traced. 3: Statements and results are traced. Number of I/O Records to Be Traced Display Length for String/Raw Data DBSL Trace Search String Number of result records to be traced for a statement This value is only displayed if trace level 3 is activated. Maximum output length If provided, only SQL statements containing this string are traced.

DBSL Trace Minimum Time If provided, only SQL statements with execution times higher Limit than this time limit are traced.

280

September 2011

10 Diagnostics

Cumulative Trace First Trace Entry Displays the start time of this trace if trace information already exists Last Trace Entry Displays the end time of this trace if trace information already exists Number of Entries Deadlock Trace Detection Interval Only SQL statements running longer than this time are recorded for deadlock detection. Displays the number of entries in this trace if trace information already exists

For each trace, a pushbutton shows whether the trace is active or switched off. To change the information to be displayed on the Trace Status screen, choose the Change pushbutton. You can then perform one or more of the following actions: Choose if you want the trace status to be displayed on the connected application server or on all application servers by using the relevant radio button. Activate or deactivate the trace function by choosing the Trace Off or Trace On pushbutton. Change the trace level. Maintain the trace parameters in the DBSL Trace Attributes area.

September 2011

281

10 Diagnostics

10.8 Diagnostics: Cumulative SQL Trace


You can access trace information about SQL statements by calling the DBA Cockpit and choosing Diagnostics Cumulative SQL Trace on the Database tab page of the DBA Cockpit. The Cumulative SQL Trace screen appears. If you want to retrieve new data, choose the Refresh pushbutton. On the EXECUTE Time, PREPARE Time, and FETCH Time tab pages, the following information is displayed for the SQL statements: Column Total Time % Count Time/Stmt Description Cumulative execution time of a statement Proportional execution time of one statement with regard to all executed statements Number of executions Average execution time of one statement Name of the table the SQL statement reads from Table If the statement reads from more than one table, only the name of the first table is displayed on this screen. The other names are displayed under Statement Information on the detail screen. Complete SQL statement

SQL Statement

If you want to display more detailed information, choose an entry from the list. The Cumulative SQL Trace - Details area appears providing information about the optimization level, the query degree as well as the first and last statement usage. In addition, the following tab pages are displayed: Statement Information Displays the complete SQL statement, the application server where the statement was executed, and a list of all ABAP reports in which the statement can be found Time Histograms Displays the distribution times of the selected SQL statement If you want to display the access plan for the execution of a single statement, select the relevant entry and choose the Explain pushbutton. This function provides a detailed analysis of expensive SQL statements. For more information, see The EXPLAIN Function [page 43]. To display the ABAP source program where the statement was defined, choose an entry in the list of ABAP reports. An editor screen appears, which contains the related source.

282

September 2011

10 Diagnostics

Caution Since all trace data remains permanently in the database, you should delete obsolete data before starting a new trace. To do so, choose the Delete pushbutton in the global toolbar. End of the caution. For information about activating the cumulative SQL trace function, see SAP Note 139286.

September 2011

283

11 BW Administration

11 BW Administration
Note All BWrelated actions in the DBA Cockpit are only available if the system has been recognized as a BW system. A system is recognized as a BW system if the BI_Content component is installed. End of the note. The following sections provide information about: The MDC Advisor Health Checks of the BW System Administration and Monitoring of the Near-Line Storage (NLS) Database

11.1 Improvement of MDC Settings Using the MDC Advisor


The MDC advisor is a DB2 tool that proposes multidimensional clustering (MDC) settings for tables using queries executed on these tables. You use the MDC advisor to collect BW reporting queries for an InfoProvider, that is, for InfoCubes and DataStore objects. The MDC Advisor analyzes the collected BW reporting queries and returns a proposal for MDC settings for the fact tables of an InfoCube and for the active table of a DataStore object. Based on this MDC proposal, you can change the clustering of the analyzed InfoProvider using transaction RSA1 in your SAP system. You access the MDC advisor by calling the DBA Cockpit and choosing MDC Advisor on the Database tab page of the DBA Cockpit. BW Administration

More Information
For more information about the MDC advisor, see the Database Administration Guide: SAP NetWeaver Business Warehouse 7.0 and Higher Administration Tasks: IBM DB2 for Linux, UNIX, and Windows at: http://service.sap.com/instguidesnw Database-Specific Guides <Your SAP NetWeaver Release> Operations

284

September 2011

11 BW Administration

11.2 Scheduling a Health Check for the BW System


Note This screen is only available in a local BW system and if your SAP system release is based on SAP NetWeaver 7.3 or higher. End of the note. You use BW health checks in the DBA Cockpit to verify if the main DB2 features for SAP NetWeaver BW have been correctly implemented in your system. Using the data provided on the BW Health Checks screen, you can check the following: If there is a high disk space consumption because of multidimensional clustering (MDC) for InfoCubes and DataStore objects that was unsuitably defined If you have wrong distribution keys for InfoCubes, DataStore objects, and PSA tables If the fact tables of your InfoCubes are distributed over the same database partitions If the partitioning columns of your InfoCubes are filled correctly To access the BW Health Checks screen, call transaction DBACOCKPIT and choose BW Administration BW Health Checks on the Database tab page of the DBA Cockpit. The BW Health Checks screen appears displaying the date and time of the last MDC space check, distribution key check, and BW-specific layout check. You can display more information about each kind of check by choosing the relevant (Information) pushbutton.

Scheduling BW Health Checks


1. On the BW Health Checks screen, choose the Schedule BW Health Checks pushbutton. 2. In the Select BW Health Checks dialog box, select one or more of the following options: o MDC Space Check: If MDC has been defined for an InfoCube or all standard and transactional DataStore objects, this check verifies if the disk space consumption exceeds a specific threshold. o Distribution Key Check This check verifies if the distribution keys of your InfoProviders and PSA tables have been correctly defined. The following objects are checked: All InfoCubes and their aggregates All standard, transactional, and write-optimized DataStore objects All PSA tables

September 2011

285

11 BW Administration

Recommendation If you are using a single-partition database, InfoProviders and PSA tables are already created with a distribution key. We recommend that you check the distribution keys of your InfoProviders and PSA tables before you add new partitions to your database. End of the recommendation. o BW-Specific Layout Check This check verifies if both fact tables of an InfoCube are distributed over the same database partitions. In addition, it checks whether the column SID_0CALMONTH or SID_0FISCPER is filled correctly with data if MDC was defined for an InfoCube with one of these columns. You cannot use the BWSpecific Layout Check to check SAP BW compression. 3. Choose the Execute pushbutton. The Schedule Job dialog box appears. 4. Choose if you want the check to start immediately in the background or at a later date, and confirm your selection. After the jobs have finished, the results are displayed in the Results of Consistency Check area as follows: Type of Check Result o Description The MDC Space Check returns no error if one of the following applies: MDC is not defined for an InfoCube or DataStore object. MDC is defined for an InfoCube or DataStore object, and the additional disk space consumption with MDC is less or equal 33%. o The MDC Space Check returns a warning if MDC is defined for an InfoCube or a DataStore object, and the additional disk space consumption with MDC is more than 33% but less than 50%. The MDC Space Check returns an error if MDC is defined for an InfoCube or DataStore object, and the additional disk space consumption with MDC is more than 50%.

MDC Space Check

MDC Disk Space Consumption

286

September 2011

11 BW Administration

Type of Check

Result

Description

Note If the MDC Space Check returns a warning or an error, you should change the defined MDC settings using the Repair pushbutton. End of the note. o The Distribution Key Check returns no errors if the distribution key of an InfoCube, DataStore object, or PSA table is correct. The Distribution Key Check returns an error if one of the distribution keys of an InfoCube, DataStore object, or PSA table is missing or is not correct or is not defined. If the database is not partitioned, you can repair the distribution key using the Repair pushbutton. Otherwise, we recommend that you redistribute the table. o The BW-Specific Layout Check returns no errors if both fact tables of an InfoCube are distributed over the same database partitions or if the column SID_0CALMONTH or SID_0FISCPER is filled correctly with data. The BW-Specific Layout Check returns warnings if both fact tables of an InfoCube are not distributed over the same database partitions or if the column SID_0CALMONTH or SID_0FISCPER is not correctly filled with data. If the distribution check of the fact tables returns warnings, we recommend that you redistribute the tables using DB6CONV. If the check of the column SID_0CALMONTH or SID_0FISCPER returns warnings, open a customer message on SAP Service Marketplace. Note

o Distribution Distribution Key Key Check

o o o Column Data Distribution PARTTIM

BWSpecific Layout Check

September 2011

287

11 BW Administration

You can monitor the background job in the DBA Planning Calendar. End of the note.

More Information
The DBA Planning Calendar [page 234]

11.3 Administration and Monitoring of the NearLine Storage (NLS) Database


Near-line storage (NLS) is a new category of data persistency that is similar to archiving. The overall goal is to take read-only data out of the BW database and to store it in an additional near-line storage DB2 database. The database server and the storage devices of the nearline storage solution can be separated from the SAP NetWeaver database hardware but you can still access the separated data transparently from an SAP NetWeaver BW system (in the following referred to as BW system). Using the NLS database includes the following administrative tasks: Configuring the NLS database as a monitored system in the DBA Cockpit For more information, see Configuration of Systems for Remote Monitoring [page 22]. Configuring the database connections that are required to access the NLS database from the local BW system using the NLS Configuration screen in the DBA Cockpit Note This task is an extension to the standard database connection maintenance. End of the note. Monitoring the BW objects of which data has been archived to the NLS database using the NLS Overview screen in the DBA Cockpit On this screen, you can monitor the space consumption of BW objects in both the SAP BW database and in the related NLS database. Cleaning up invalidated requests in the NLS database using the NLS Cleanup Job in the DBA Planning Calendar [page 255]

288

September 2011

11 BW Administration

11.3.1 Configuration of the Connection to the NLS Database


Note This screen is only available in a local BW system. End of the note. You use the NLS Configuration screen to configure the connection to the NLS database.

Process
1. You access the BW Administration NLS Configuration screen by calling the DBA Cockpit and choosing BW Administration NLS Configuration in the DBA Cockpit. The following table shows all NLS databases that are connected to your SAP NetWeaver BW system providing the following information: Column Connection Name DB Name DB Server Description Name of the database connection that is used to access the database Name of the assigned NLS database Name of the host where the NLS database is installed

Schema Name Name of the NLS database schema User Name Name of the database user that is used to connect to the NLS database Indicates if the configuration information, which is stored as part of the NLS connection, matches the BW system information Configuration Status If the Configuration Status is not correct, the BW system cannot use a NLS connection. To update the configuration of the NLS connection, choose the Update Configuration pushbutton. Indicates if the remote NLS database is available Connection Status Note By default, this field is empty. To check the connection status, choose the Test Connection pushbutton. End of the note.

September 2011

289

11 BW Administration

2. You maintain your NLS configurations using the following pushbuttons from the application toolbar: o o o To create a new NLS configuration entry, you choose Add. To change an existing NLS configuration, you choose Change. To delete an existing NLS configuration, you choose Delete.

To perform these tasks, the standard maintenance screen for the configuration of database connections is used. In all cases, a dialog box appears with a detailed maintenance screen for the database connection related to the NLS database. To check the availability of the NLS connection, choose the Test Connection pushbutton. The result of the connection test appears in the action message window in the lower half of the screen. Note If you create the NLS connection using directly the database connection maintenance functions without the NLS Configuration screen, the configuration data for the NLS connection is not created. Make sure that you use the NLS Configuration screen. End of the note.

More Information
Configuring Database Connections [page 28]

11.3.2 Overview of the NLS Database


Note This screen is only available in a local BW system. End of the note. The NLS Overview screen provides you with an overview of InfoProviders that are connected to an NLS database. You can use the information on this screen to analyze the space consumption of an InfoProvider in the BW database in comparison to the remote NLS database. In addition, you can update the configuration of your BW queries so that they automatically read data from the NLS database. To access the NLS Overview screen, call the DBA Cockpit and choose BW Administration NLS Overview . To specify which InfoProviders are displayed, enter the required data in the following input fields and choose the Apply pushbutton: InfoProvider Name InfoProvider Size (KB) NLS Connection NLS Size

290

September 2011

11 BW Administration

The following table displays all InfoProviders that meet the specified selection criteria: Column InfoProvider Name Name of the InfoProvider Total size of all database tables of the InfoProvider in KB Note InfoProvider Size (KB) This size information is not newly calculated but retrieved from values that were previously provided by the REORGCHK for All Tables job and might therefore not be accurate. If you do not run the REORGCHK for All Tables job, the displayed value is -1. For more information, see Scheduling a REORGCHK for All Tables [page 253]. End of the note. NLS Connection NLS Name Name of the NLS connection Name of the NLS object Total size of all database tables of the InfoProvider in the NLS database Note NLS Size This value is only available if the NLS database has been configured and properly set up for monitoring in the DBA Cockpit. For more information, see Configuration of Systems for Remote Monitoring [page 22] and Scheduling a REORGCHK for All Tables [page 253]. End of the note. Query Enabled Indicates whether the BW queries of the InfoProvider have been enabled to read data from the NLS database Description

Enabling BW Queries to Use the Near-Line Storage Database


By choosing the Enable Queries pushbutton, you enable all BW queries of a single InfoProvider to read data from the NLS database. After a data archiving process has been created for an InfoProvider, the InfoProvider can no longer access the NLS database to build the query results.

September 2011

291

11 BW Administration

Displaying Details of InfoProviders


To display detailed information about an InfoProvider, double-click an InfoProvider, or select it and choose the Details pushbutton. The NLS Details screen appears displaying details of the InfoProviders in two tables: In the left table, the schema name, table name, and size of the database tables that are associated with the InfoProvider in the BW database are displayed. The right table displays the same information for the database tables representing the InfoProvider in the NLS database.

Analyzing Single Tables of the BW and the NLS Database


To analyze a single table of an InfoProvider, double-click an InfoProvider in the left table on the NLS Details screen, or select the InfoProvider and choose the Details pushbutton. The Table and Indexes Detail screen appears providing detailed technical information, for example, about the structure of the selected table, its indexes, and the tablespaces used. Caution If you want to analyze a single NLS table, you cannot navigate to the Single Table Analysis screen in the Space task area by double-clicking a table cell in the right table of the NLS Details screen. Instead, proceed as follows: 1. On the System Landscape tab page, select your NLS database system. 2. Go to the Database tab page and choose Space Single Table Analysis .

3. On the Single Table Analysis screen in the Space task area, enter the schema and the table name of the NLS table in the appropriate fields. End of the caution.

More Information
Analyzing and Maintaining a Single Table [page 154]

292

September 2011

11 BW Administration

11.3.3 Synchronization Check of the NLS Database


Note This screen is only available in a local BW system. End of the note. On the NLS Synchronization Check screen, you can check whether the NLS database is consistent with the attached BW system. If, for example, you recovered either the BW database or the NLS database, you need to check that both systems are synchronized and consistent.

Process
1. You access the NLS Synchronisation Check screen by calling the DBA Cockpit and choosing BW Administration NLS Synchronisation Check . 2. You choose the NLS connection that you want to check from the drop-down list. The consistency of the NLS database and the BW system is checked. The output is displayed in the following table: Column Checked Object Description Tree structure with the name of the InfoProvider and of inconsistent archiving requests

Required Action Action that is required to repair the inconsistent request Description Target Timestamp Additional information about the required action Time stamp of the operation as contained in the BW system

The consistency check returns one of the following results: o The NLS database is consistent No further action is required. o The NLS database is not consistent and it can be resynchronized If the NLS connection is not consistent but it can be resynchronized, the archiving requests with problems are displayed for each InfoProvider as well as the corrective action to be taken. To resynchronize the NLS database, choose the Resynchronize pushbutton. o The NLS database is not consistent and it must be restored In this case, you have to restore the NLS database to the point in time that is displayed in column Target Timestamp (see above table). For more information about restoring a DB2 database, see the Database Administration Guide: SAP on IBM DB2 for Linux, UNIX, and Windows.

September 2011

293

11 BW Administration

More Information
Database Administration Guide: SAP on IBM DB2 for Linux, UNIX, and Windows at: http://service.sap.com/instguidesnw Database-Specific Guides <Your SAP NetWeaver Release> Operations

294

September 2011

12 Appendix

12 Appendix
This appendix contains detail information about the various snapshot options.

12.1 Database Details: Buffer Pool


The following information is displayed on the Buffer Pool tab page in the content detail area of the Database screen: Field Buffer Pools Number Total Size Buffer Quality Percentage at which the data is read from the buffer pool, rather than directly from the hard disk Overall Buffer Quality This is calculated using the following formula: (logical reads - physical reads) / (logical reads) * 100 Data Hit Ratio Percentage at which data (without index data) is read from the buffer pool, rather than directly from the hard disk Frequency as a percentage at which index data is read from the buffer pool, rather than directly from the hard disk Number of times an agent did not have a preselected victim buffer available Number of buffer pools Total size in KB of all buffer pools Description

Index Hit Ratio

No Victim Buffers Average Time Physical Reads

Average time in milliseconds required to read data from disk into the buffer pool Average time in milliseconds required to write data from the buffer pool to disk

Physical Writes Data Logical Reads

Number of read accesses to data in the buffer pool Number of read accesses to data on disk (I/O)

Physical Reads

This value includes the number of physical reads that were performed synchronously (by the database manager agents) and asynchronously (by the I/O servers).

September 2011

295

12 Appendix

Field

Description Number of write accesses to data on disk (I/O)

Physical Writes

This value includes the number of physical writes that were performed synchronously (by the database manager agents) and asynchronously (by the I/O cleaners). Number of read accesses to data on disk (by agents)

Synchronous Reads Synchronous Writes Temporary Logical Reads Temporary Physical Reads Index Logical Reads

Number of write accesses to data on disk (by agents) Number of logical read requests that required I/O to get data pages into the temporary tablespace Number of physical read requests that required I/O to get data pages into the temporary tablespace

Number of read accesses to index data in the buffer pool Number of read accesses to index data on disk (I/O)

Physical Reads

Since index data is read only by the database manager agents, this value includes the number of synchronously read index pages. Number of write accesses to index data on disk (I/O)

Physical Writes

This value includes the number of physical writes that were performed synchronously (by the database manager agents) and asynchronously (by the I/O cleaners). Number of read accesses to index data on disk (by agents)

Synchronous Reads Synchronous Writes Temporary Logical Reads Temporary Physical Reads Note

Number of write accesses to index data on disk (by agents) Number of logical read requests that required I/O to get index pages into the temporary tablespace Number of physical read requests that required I/O to get index pages into the temporary tablespace

Data is read or written in pages. A page can be 4 KB, 8 KB, 16 KB, or 32 KB in size. Unless otherwise specified, no distinction is made between synchronous and asynchronous accesses.

296

September 2011

12 Appendix

End of the note.

12.2 Database Details: Cache


The following information is displayed on the Cache tab page in the content detail area of the Database screen: Field Catalog Cache Maximum allowed size in KB for the catalog cache Size The catalog cache is accessed each time a transaction accesses a table, view, or alias. The cache is allocated dynamically from the heap. The maximum allowed size is determined by database configuration parameter CATALOGCACHE_SZ. Percentage at which the data is read from the catalog cache, rather than directly from the hard disk Quality This is calculated using the following formula: (catalog cache lookups - catalog cache inserts) / catalog cache lookups * 100 Lookups Number of times that the catalog cache was referenced to obtain table descriptor information Number of times that the system tried to insert table descriptor information into the catalog cache Number of times that an insert into the catalog cache failed due to the catalog cache being full Largest size reached by package cache Description

Inserts

Overflows High-Water Mark Package Cache

Maximum allowed size in KB for the package cache Size The package cache contains access plans. The maximum allowed size is determined by database configuration parameter PCKCACHESZ. Indicates percentage at which the data is read from the package cache, rather than directly from the hard disk Quality This is calculated using the following formula: (package cache lookups - package cache inserts) / package cache lookups *100

September 2011

297

12 Appendix

Field Lookups Inserts

Description Number of times an application looked for a section in the package cache Total number of times that an access plan was not available for use and had to be loaded into the package cache Number of times that the package cache overflowed the bounds of its allocated memory Largest size reached by the package cache

Overflows High-Water Mark

12.3 Database Details: Asynchronous I/O


The following information is displayed on the Asynchronous I/O tab page in the content detail area of the Database screen: Field I/O Number of I/O Servers Number of I/O Cleaners Average Time Asynchronous Physical Reads Asynchronous Physical Writes Data Asynchronous Physical Reads Asynchronous Physical Writes Asynchronous Read Requests Number of data pages that were read asynchronously from disk and written to the buffer pool by the I/O servers (prefetch) Number of data pages that were written asynchronously from buffer pool to disk (I/O cleaners) Number of asynchronous data read requests Average time in milliseconds required by the I/O servers to read a page from disk and write it to the buffer pool Average time in milliseconds required by the I/O cleaners to read a page from the buffer pool and write it to the hard disk Number of I/O servers that read data asynchronously from the hard disk into the buffer pool Number of I/O cleaners that write data asynchronously from the buffer pool to the hard disk Description

298

September 2011

12 Appendix

Index Asynchronous Physical Reads Asynchronous Physical Writes Asynchronous Read Requests Note Data is read or written in pages. A page can be 4 KB, 8 KB, 16 KB, or 32 KB in size. End of the note. Number of index pages that were read asynchronously from disk and written to the buffer pool by the I/O servers (prefetch) Number of index pages that were written asynchronously from buffer pool to disk (I/O cleaners) Number of asynchronous index read requests

12.4 Database Details: Direct I/O


The following information is displayed on the Direct I/O tab page in the content detail area of the Database screen: Field Average Time Direct Reads Direct Writes I/O Direct Reads Read accesses from disk that do not use the buffer pool (LONG VARCHAR fields, backup) Write accesses to disk that do not use the buffer pool (LONG VARCHAR fields, restore, load) Average time in milliseconds required to read directly from disk Average time in milliseconds required to write directly to disk Description

Direct Writes Average I/O per Request Direct Reads Direct Writes

Average number of requests to read directly from disk Average number of requests to write directly to disk

September 2011

299

12 Appendix

12.5 Database Details: Real-Time Statistics


The following information is displayed on the Real-Time Statistics tab page in the content detail area of the Database screen: Field Size of Statistics Cache Number of Asynchronously Collected Statistics Description Size of statistics cache in bytes Total number of successful asynchronous statistics collection activities

Total number of statistics collection activities for creating Number of Statistics Collections statistics by the system without table or index scan during During Query Compilation query compilation Time Spent During Query Compilation Number of Synchronously Collected Statistics Time Spent on Synchronous Statistics Collection Activities Total time spent on creating statistics by system without table or index scan during query compilation in milliseconds Total number of synchronous statistics collection activities during query compilation Total time spent on synchronous statistics collection activities in milliseconds

12.6 Database Details: Locks and Deadlocks


The following information is displayed on the Locks and Deadlocks tab page in the content detail area of the Database screen: Field Lock List Maximum length of the list (database configuration parameter LOCKLIST) Size Database locks are managed in a list. The lock list is allocated dynamically. In Use Lock Waits Total Time Waited Average Time Waited Total number of times that applications or connections waited for locks Total amount of elapsed time in milliseconds that applications waited for a lock to be granted Average time in milliseconds waited for a lock Current size of the lock list Description

300

September 2011

12 Appendix

Field Escalations

Description

Number of times that locks have been escalated from several row locks to a table lock Lock Escalations If the maximum allowed length of the lock list is reached, row locks are converted to table locks to save space in the lock list. This process is called lock escalations Number of times that locks have been escalated from several row locks to one exclusive table lock, or the number of times an exclusive lock on a row caused the table lock to become an exclusive lock Exclusive locks are important to track since they can impact the concurrency of your data because other applications cannot access data held by an exclusive lock.

Exclusive Lock Escalations

Locks Locks Currently Total number of locks currently held by the applications Held Number of deadlocks that have occurred Deadlocks Detected Deadlock situations are recognized and resolved automatically by the database. The database configuration parameter lock escalations determines when a lock wait situation is resolved. Number of times that a request to lock an object timed out instead of being granted Lock Timeouts The database configuration parameter lock escalations determines when a lock wait situation is resolved.

September 2011

301

12 Appendix

12.7 Database Details: Logging


The following information is displayed on the Logging tab page in the content detail area of the Database screen: Field Log Files Number of primary log files Primary The database configuration parameter LOGPRIMARY determines this value. Number of secondary log files Secondary The database configuration parameter LOGSECOND determines this value. Number of pages in each log file Size The database configuration parameter LOGFILSIZ determines this value. Each page has 4 KB. Description

Total Log Available to Database Used by Database Maximum Space Used Amount of primary log space in bytes in the database that is not being used by uncommitted transactions Total amount of primary log space in bytes currently used in the database Maximum amount of primary log space used in bytes Node with the least amount of available log space in bytes Node with Least Available Space Note This field is only displayed for global snapshots over all partitions. End of the note. Application with Oldest Transaction Secondary Log Logs Currently Allocated Maximum Space Total number of secondary log files that are currently being used for the database Maximum amount of secondary log space used in bytes Application ID (that corresponds to the agent_id value from the application snapshot) of the application that has the oldest transaction

302

September 2011

12 Appendix

Field Used Log Pages Read Written Log Buffer Consumption LSN Gap

Description

Number of log pages read from disk Number of log pages written to disk

Percentage of log space held by dirty pages in relation to log space specified by parameter SOFTMAX Percentage of log space held that will have to be redone for crash recovery pages in relation to log space specified by parameter SOFTMAX

Restart Range

Log Buffer Quality Log Buffer Hit Ratio Ratio of log data read from the buffer in relation to log data read from disk Number of times that agents have to wait for log data to write to disk while copying log records into the log buffer Log Buffer Overflows This value is incremented per agent per incident. For example, if two agents attempt to copy log data while the buffer is full, then this value is incremented by two.

Log Buffer I/O Average Write Time/Page Average Write Time/IO Average Read Time/Page Average Read Time/IO Average time per page in microseconds required to write log data to disk Average time per I/O in microseconds required to write log data to disk Average time per page in microseconds required to read log data from disk Average time per I/O in microseconds required to read log data from disk

September 2011

303

12 Appendix

12.8 Database Details: Calls


The following information is displayed on the Calls tab page in the content detail area of the Database screen: Field Rows Read Selected Deleted Inserted Updated Number of data records that were read Number of data records that were selected Number of data records that were deleted Number of data records that were inserted Number of data records that were updated Ratio of rows read from the base table compared to rows processed, which can be either rows returned to the application (SELECT statements) or rows written (UPDATE, INSERT, DELETE statements) Rows Read / Rows Processed A value of 1 indicates an optimal access to the requested data. High values indicate statements with inefficient access. Note End of the note. This metric is only available if your database is DB2 V9.5 for Linux, UNIX, and Windows Fix Pack 1 or higher. Average number of pages read from the buffer pool per rows processed, which can be either rows returned to the application (SELECT statements) or rows written (UPDATE, INSERT, DELETE statements) BP Gets / Rows Processed Note This metric is only available if your database is DB2 V9.5 for Linux, UNIX, and Windows Fix Pack 1 or higher. End of the note. Statements Executed SELECT SQL UPDATE/INSERT/DELETE Number of SELECT statements that were executed Number of UPDATE, INSERT, and DELETE statements that were executed Description

304

September 2011

12 Appendix

Field

Description Number of Data Definition Language (DDL) statements that were executed, for example, CREATE TABLE, CREATE VIEW, ALTER TABLE, and DROP INDEX Sum of the host execution times in seconds for all the statements that were executed Remaining part of the above elapsed time in microseconds

DDL

Elapsed Time (sec) Elapsed Time (microsec) Statements Attempted COMMITs

Number of COMMIT statements that have been attempted Number of ROLLBACK statements that have been attempted

Rollbacks

Automatic rollbacks caused by error situations or deadlocks are not included. Number of dynamic SQL statements attempted Number of static SQL statements attempted Number of attempted SQL statements that failed

Dynamic SQL Static SQL Failed SQL Hash Joins Total Total Hash Loops

Total number of hash joins executed Total number of times that a single partition of a hash join was larger that the available sort heap space Number of times that hash join data exceeded the available sort heap space Number of times that hash join data exceeded the available sort heap space by less than 10% Total number of hash joins that were throttled back by the sort memory throttling algorithm A throttled hash join is a hash join that was granted less memory than requested by the sort memory manager. A hash join is throttled back when the memory allocation from the shared sort heap is close to the limit set by database configuration parameter sheapthres_shr. This throttling significantly reduces the number of overflows over thesheapthres_shr limit in a system that is not properly configured. The data reported in this element only reflects hash joins using memory allocated from the shared sort heap.

Overflows

Small Overflows

Post Threshold

September 2011

305

12 Appendix

12.9 Database Details: Sorts


The following information is displayed on the Sorts tab page in the content detail area of the Database screen: Field Sort Heap Total Size Amount of memory in KB available for each sort as defined in the database configuration parameter SORTHEAP (in pages) Total number of allocated space of sort heap space for all sorts and at the time the snapshot was taken Description

Allocated Sort Time Total Average Sorts

Total time in milliseconds required for all sort processes Average sort time in milliseconds

Total Sorts Total number of sorts that have been executed Sort Overflows If the storage area allocated for sorting is not large enough, a sort overflow occurs. The hard disk is then used temporarily.

Active Sorts Number of sorts in the database that currently have a sort heap allocated Total number of sorts that were throttled back by the sort memory throttling algorithm. A throttled sort is a sort that was granted less memory than requested by the sort memory manager. A sort is throttled back when the memory allocation for sorts is close to the limit set by database configuration parameter sheapthres_shr. This throttling significantly reduces the number of overflows over sheapthres_shr limit in a system that is not properly configured. The data reported in this element only reflects sorts using memory allocated from the shared sort heap.

Post Threshold Sorts

306

September 2011

12 Appendix

12.10 Database Details: XML Storage


The following information is displayed on the XML Storage tab page in the content detail area of the Database screen: Field Pool Data Number of data pages for XML storage objects (XDAs) that have been Logical Reads requested from the buffer pool (logical reads) for regular and large tablespaces Physical Reads Write Accesses Temporary Data Logical Reads Physical Reads Asynchronous I/O Physical Reads Number of XML storage object (XDA) data pages that have been read in from the tablespace containers (physical reads) by asynchronous engine dispatchable units (EDUs) for all types of tablespaces. Number of pages for XML storage objects (XDA) that have been requested from the buffer pool (logical reads) for temporary tablespaces. Number of pages for XML storage objects that have been (XDA) read from the tablespace containers (physical reads) for temporary tablespaces Number of data pages for XML storage objects (XDAs) that have been read from the tablespace containers (physical reads) for regular and large tablespaces Number of times a buffer pool data page for an XML storage object (XDA) was physically written to disk Description

Number of times a buffer pool data page for an XML storage object (XDA) was physically written to disk by either an asynchronous page cleaner, or a Physical Writes prefetcher A prefetcher may have written dirty pages to disk to create space for the pages being prefetched. Read Requests Number of asynchronous read requests for XML storage object (XDA) data

September 2011

307

12 Appendix

12.11 Buffer Pool Details: Buffer Pool


The following information is displayed on the Buffer Pool tab page in the content detail area of the Buffer Pool screen Field Buffer Pool Name Name of the buffer pool Size of the buffer pool in KB and in pages Caution Current Size If Automatic is selected, the buffer pool is automatically tuned (if DB2's Self-Tuning Memory Management is activated). End of the caution. New Size Pages Left to Remove Tablespace Use Count Buffer Quality Percentage at which the data is read from the buffer pool, rather than directly from the hard disk Overall Buffer Quality This is calculated using the following formula: (logical reads - physical reads) / (logical reads) * 100 Data Hit Ratio Percentage at which only data (without index data) is read from the buffer pool, rather than directly from the hard disk Percentage at which index data is read from the buffer pool, rather than directly from the hard disk Size of the buffer pool in pages after a database restart Number of pages that are still to be removed Description

Number of tablespaces that belong to this buffer pool

Index Hit Ratio Average Time Physical Reads

Average time in milliseconds required to read data from disk into the buffer pool Average time in milliseconds required to write data from the buffer pool to disk

Physical Writes

308

September 2011

12 Appendix

Data Logical Reads Number of read accesses to data in the buffer pool Number of read accesses to data on disk (I/O) Physical Reads This value includes the number of physical reads that were performed synchronously (by the database manager agents) and asynchronously (by the I/O servers). Number of write accesses to data on disk (I/O) Physical Writes This value includes the number of physical writes that were performed synchronously (by the database manager agents) and asynchronously (by the I/O cleaners). Number of read accesses to data on disk (by agents)

Synchronous Reads Synchronous Writes Temporary Logical Reads Temporary Physical Reads Index Logical Reads

Number of write accesses to data on disk (by agents) Number of logical read requests that required I/O to get data pages into the temporary tablespace Number of physical read requests that required I/O to get data pages into the temporary tablespace

Number of read accesses to index data in the buffer pool Number of read accesses to index data on disk (I/O)

Physical Reads

Since index data is read only by the database manager agents, this value includes the number of synchronously read index pages. Number of write accesses to index data on disk (I/O)

Physical Writes

This value includes the number of physical writes that were performed synchronously (by the database manager agents) and asynchronously (by the I/O cleaners). Number of read accesses to index data on disk (by agents)

Synchronous Reads Synchronous Writes Temporary Logical Reads

Number of write accesses to index data on disk (by agents) Number of logical read requests that required I/O to get index pages into the temporary tablespace

September 2011

309

12 Appendix

Temporary Physical Reads

Number of physical read requests that required I/O to get index pages into the temporary tablespace

12.12 Buffer Pool Details: Asynchronous I/O


The following information is displayed on the Asynchronous I/O tab page in the content detail area of the Buffer Pool screen: Field Average Time Asynchronous Physical Reads Asynchronous Physical Writes Data Asynchronous Physical Reads Asynchronous Physical Writes Asynchronous Read Requests Index Asynchronous Physical Reads Asynchronous Physical Writes Asynchronous Read Requests Note Data is read or written in pages. A page can be 4 KB, 8 KB, 16 KB, or 32 KB in size. End of the note. Number of index pages that were read asynchronously from disk and written to the buffer pool by the I/O servers (prefetch) Number of index pages that were written asynchronously from buffer pool to disk (I/O cleaners) Number of asynchronous index read requests Number of data pages that were read asynchronously from disk and written to the buffer pool by the I/O servers (prefetch) Number of data pages that were written asynchronously from buffer pool to disk (I/O cleaners) Number of asynchronous data read requests Average time in milliseconds required by the I/O servers to read a page from disk and write it to the buffer pool Average time in milliseconds required by the I/O cleaners to read a page from the buffer pool and write it to the hard disk Description

310

September 2011

12 Appendix

12.13 Buffer Pool Details: Direct I/O


To display detailed information about direct I/O for your selected buffer pools, choose the Direct I/O tab page in the content detail area of the Buffer Pool screen. The following information is displayed on the Direct I/O tab page in the content detail area of the Buffer Pool screen: Field Average Time Direct Reads Direct Writes I/O Direct Reads Read accesses from disk that do not use the buffer pool (LONG VARCHAR fields, backup) Write accesses to disk that do not use the buffer pool (LONG VARCHAR fields, restore, load) Average time in milliseconds required to read directly from disk Average time in milliseconds required to write directly to disk Description

Direct Writes Average I/O per Request Direct Reads Direct Writes

Average number of requests to read directly from disk Average number of requests to write directly to disk

September 2011

311

12 Appendix

12.14 Buffer Pool Details: XML Storage


The following information is displayed on the XML Storage tab page in the content detail area of the Buffer Pool screen: Field Pool Data Number of data pages for XML storage objects (XDAs) that have been Logical Reads requested from the buffer pool (logical reads) for regular and large tablespaces Physical Reads Write Accesses Temporary Data Logical Reads Physical Reads Asynchronous I/O Physical Reads Number of XML storage object (XDA) data pages that have been read in from the tablespace containers (physical reads) by asynchronous engine dispatchable units (EDUs) for all types of tablespaces. Number of pages for XML storage objects (XDA) that have been requested from the buffer pool (logical reads) for temporary tablespaces. Number of pages for XML storage objects that have been (XDA) read from the tablespace containers (physical reads) for temporary tablespaces Number of data pages for XML storage objects (XDAs) that have been read from the tablespace containers (physical reads) for regular and large tablespaces Number of times a buffer pool data page for an XML storage object (XDA) was physically written to disk Description

Number of times a buffer pool data page for an XML storage object (XDA) was physically written to disk by either an asynchronous page cleaner, or a Physical Writes prefetcher A prefetcher may have written dirty pages to disk to create space for the pages being prefetched. Read Requests Number of asynchronous read requests for XML storage object (XDA) data

312

September 2011

12 Appendix

12.15 Tablespace Details: Buffer Pool


The following information is displayed on the Buffer Pool tab page in the content detail area of the Tablespaces screen: Field Tablespace Name Buffer Quality Buffer Pool Name of the buffer pool associated with the selected tablespace Percentage at which the data is read from the buffer pool, rather than directly from the hard disk This is calculated using the following formula: (logical reads - physical reads) / (logical reads) * 100 Indicates percentage at which data (without index data) is read from the buffer pool, rather than directly from the hard disk Indicates percentage at which index data is read from the buffer pool, rather than directly from the hard disk Number of times an agent did not have a preselected victim buffer available Name of the tablespace Description

Overall Buffer Quality

Data Hit Ratio

Index Hit Ratio No Victim Buffer Average Time Physical Reads

Average time in milliseconds required to read data from disk into the buffer pool Average time in milliseconds required to write data from the buffer pool to disk

Physical Writes Data Logical Reads

Number of read accesses to data in the buffer pool Number of read accesses to data on disk (I/O)

Physical Reads The value includes the number of physical reads that were performed synchronously (by the database manager agents) and asynchronously (by the I/O servers).

September 2011

313

12 Appendix

Number of write accesses to data on disk (I/O) Physical Writes The value includes the number of physical writes that were performed synchronously (by the database manager agents) and asynchronously (by the I/O cleaners). Number of read accesses to data on disk (by agents)

Synchronous Reads Synchronous Writes

Number of write accesses to data on disk (by agents)

Temporary Logical Number of logical read requests that required I/O to get data pages into Reads the temporary tablespace Temporary Physical Reads Index Logical Reads Number of read accesses to index data in the buffer pool Number of read accesses to index data on disk (I/O) Physical Reads Since index data is read only by the database manager agents, this value includes the number of synchronously read index pages. Number of write accesses to index data on disk (I/O) Physical Writes The value includes the number of physical writes that were performed synchronously (by the database manager agents) and asynchronously (by the I/O cleaners). Number of read accesses to index data on disk (by agents) Number of physical read requests that required I/O to get data pages into the temporary tablespace

Synchronous Reads Synchronous Writes

Number of write accesses to index data on disk (by agents)

Temporary Logical Number of logical read requests that required I/O to get index pages into Reads the temporary tablespace Temporary Physical Reads Number of physical read requests that required I/O to get index pages into the temporary tablespace

314

September 2011

12 Appendix

12.16 Tablespace Details: Asynchronous I/O


The following information is displayed on the Asynchronous I/O tab page in the content detail area of the Tablespaces screen: Field Average Time Asynchronous Physical Reads Asynchronous Physical Writes Data Asynchronous Physical Reads Asynchronous Physical Writes Asynchronous Read Requests Index Asynchronous Physical Reads Asynchronous Physical Writes Asynchronous Read Requests Number of index pages that were read asynchronously from disk and written to the buffer pool by the I/O servers (prefetch) Number of index pages that were written asynchronously buffer pool to disk (I/O cleaners) Number of asynchronous index read requests Number of data pages that were read asynchronously from disk and written to the buffer pool by the I/O servers (prefetch) Number of data pages that were written asynchronously from buffer pool to disk (I/O cleaners) Number of asynchronous data read requests Average time in milliseconds required by the I/O servers to read a page from disk and write it to the buffer pool Average time in milliseconds required by the I/O cleaners to read a page from the buffer pool and write it to the hard disk Description

September 2011

315

12 Appendix

12.17 Tablespace Details: Direct I/O


The following information is displayed on the Direct I/O tab page in the content detail area of the Tablespaces screen: Field Average Time Direct Reads Direct Writes I/O Direct Reads Read accesses from disk that do not use the buffer pool (LONG VARCHAR fields, backup) Write accesses to disk that do not use the buffer pool (LONG VARCHAR fields, restore, load) Average time in milliseconds required to read directly from disk Average time in milliseconds required to write directly to disk Description

Direct Writes Average I/O per Request Direct Reads Direct Writes

Average number of requests to read directly from disk Average number of requests to write directly to disk

12.18 Tablespace Details: XML Storage


The following information is displayed on the XML Storage tab page in the content detail area of the Tablespace screen: Field Pool Data Number of data pages for XML storage objects (XDAs) that have been Logical Reads requested from the buffer pool (logical reads) for regular and large tablespaces Physical Reads Write Accesses Temporary Data Number of data pages for XML storage objects (XDAs) that have been read from the tablespace containers (physical reads) for regular and large tablespaces Number of times a buffer pool data page for an XML storage object (XDA) was physically written to disk Description

316

September 2011

12 Appendix

Field Logical Reads Physical Reads Asynchronous I/O Physical Reads

Description Number of pages for XML storage objects (XDA) that have been requested from the buffer pool (logical reads) for temporary tablespaces. Number of pages for XML storage objects that have been (XDA) read from the tablespace containers (physical reads) for temporary tablespaces

Number of XML storage object (XDA) data pages that have been read in from the tablespace containers (physical reads) by asynchronous engine dispatchable units (EDUs) for all types of tablespaces.

Number of times a buffer pool data page for an XML storage object (XDA) was physically written to disk by either an asynchronous page cleaner, or a Physical Writes prefetcher A prefetcher may have written dirty pages to disk to create space for the pages being prefetched. Read Requests Number of asynchronous read requests for XML storage object (XDA) data

12.19 Application Details: Application


The following information is displayed on the Application tab page in the content detail area of the Applications screen: Field Application PID Handle Connect Start Platform Host Name Process ID of the database process belonging to an SAP work process In multi partition database systems, this ID is the same on every member where the application might span subagents. Start time when the application connected to the database Operating system on which the client application is running Host name of the application server where the application server is running Name of application running at the client as known to the database manager or DB2 connect Description

September 2011

317

12 Appendix

Current status of the application. Possible values are: Database Connect Pending The application has initiated a database connection but the request has not yet completed. Database Connect Completed The application has initiated a database connection and the request has completed. Unit of Work Executing The database manager is executing requests on behalf of the unit of work. Unit of Work Waiting The database manager is waiting on behalf of the unit of work in the application. This status typically means that the system is executing in the application's code. Lock Wait The unit of work is waiting for a lock. After the lock is granted, the status is restored to its previous value. Status Commit Active The unit of work is committing its database changes. Rollback Active The unit of work is rolling back its database changes. Recompiling The database manager is compiling an SQL statement or precompiling a plan on behalf of the application. Request Interrupted An interrupt of a request is in progress. Database Disconnect Pending The application has initiated a database disconnect but the command has not yet completed executing. The application might not have explicitly executed the database disconnect command. The database manager disconnects from a database if the application ends without disconnecting. Transaction prepared The unit of work is part of a global transaction that has entered the

318

September 2011

12 Appendix

prepared phase of the two-phase commit protocol. Transaction Heuristically The unit of work is part of a global transaction that has been heuristically committed. Transaction Heuristically Rolled Back The unit of work is part of a global transaction that has been heuristically rolled-back. Transaction Ended The unit of work is part of a global transaction that has ended but has not yet entered the prepared phase of the two-phase commit protocol. Creating Database The agent has initiated a request to create a database and that request has not yet completed. Restarting Database The application is restarting a database to perform crash recovery. Restoring Database The application is restoring a backup image to the database. Backing Up Database The application is performing a "fast load" of data into the database. Data Fast Load The application is performing a "fast load" of data into the database. Data Fast Unload The application is performing a "fast unload" of data from the database. Wait to Disable Tablespace The application has detected an I/O error and is attempting to disable a particular tablespace. The application has to wait for all other active transactions on the tablespace to complete before it can disable the tablespace. Quiescing a Tablespace The application is performing a QUIESCE TABLESPACE request. Wait for Remote Partition The application is waiting for a response from a remote partition in a partitioned database instance.

September 2011

319

12 Appendix

Agent PID Client Information Client user ID that is generated by the transaction manager and provided to the server, if the sqleseti API is used For ABAP systems: name of the SAP user Workstation Identifies the clients system or workstation (for example, CICS EITERMID) if the sqleseti API was used in this connection. Identifies the server transaction program performing the transaction if the sqleseti API was used in this connection. For ABAP systems: name of the SAP transaction The data passed to the target database for logging and diagnostic purposes, if the sqleseti API was used in this connection For ABAP systems: name of the program executing the SQL statement Process ID of an SAP work process that made the connection to the database

User ID

Application

Accounting

320

September 2011

12 Appendix

12.20 Application Details: Agents


Note This tab page is only available if you are using the SAP GUI-based user interface of the DBA Cockpit. End of the note. The following information is displayed on the Agents tab page in the content detail area of the Applications screen: Field Agents Coordinator Agent PID Currently Associated Associated with This Appl. Process ID (UNIX systems) or thread ID (OS/2 or Windows systems) of the coordinator agent for the application Number of agents currently associated with the application Description

Number of agents participating in this application (high-water mark) Number of agents removed from this application and subsequently used by another application This only happens if the agent was not busy.

Stolen from Application

Times Used by Agent(s) User CPU Time System CPU Time Idle Time Total user CPU time in seconds consumed by agents Total system CPU time in seconds consumed by agents Total idle time in seconds

Waited for Prefetch Total time in milliseconds waited for prefetch

September 2011

321

12 Appendix

Displays information about memory pools allocated to this application The table contains the following columns: Partition Partition number PID Process ID (UNIX) or thread ID (Windows) of the agent Memory Pools Allocated to Agent Pool ID Type of memory pool Current Size (KB) Current size of the memory pool High-Water Mark (KB) Largest size of the memory pool since its creation Configured Size (KB) Configured size of the memory pool

322

September 2011

12 Appendix

12.21 Application Details: Assigned Agents


Note This tab page is only available if you are using the Web browser-based user interface of the DBA Cockpit. End of the note. The following information is displayed on the Assigned Agents tab page in the content detail area of the Applications screen: Field Agents Coordinator Agent PID Process ID (UNIX systems) or thread ID (Windows) of the coordinator agent for the application Description

Currently Associated Number of agents currently associated with the application Associated with This Appl. Number of agents participating in this application (high-water mark) Number of agents removed from this application and subsequently used by another application This only happens if the agent was not busy. Times Spent by Agent(s) User CPU Time System CPU Time Idle Time Waited for Prefetch Total user CPU time in seconds consumed by agents Total system CPU time in seconds consumed by agents Total idle time in seconds Total time in milliseconds waited for prefetch

Stolen from Application

September 2011

323

12 Appendix

This table displays information about all agents that are the coordinator agent itself or agents working as a subagent for the coordinator agent: Partition Partition number Agent Type Type of the agent Nesting Level Nesting level of the agent Entity Entity of the agent State Assigned Agents Indicates whether an agent is associated or active TID Thread ID of the agent Service Class Service class the agent is assigned to Event Type Type of event that was last processed by the agent Event Object Object of the event that was last processed by the agent Event State State of the event that was last processed by the agent

324

September 2011

12 Appendix

12.22 Application Details: Agents Memory


Note This tab page is only available if you are using the Web browser-based user interface of the DBA Cockpit. End of the note. The following information is displayed on the Agents Memory tab page in the content detail area of the Applications screen: Column Partition PID Pool ID Current Size (KB) High-Water Mark (KB) Configured Size (KB) Partition number Process ID (UNIX) or thread ID (Windows) of the agent Type of memory pool Current size of the memory pool Largest size of the memory pool since its creation Configured size of the memory pool Description

12.23 Application Details: Buffer Pool


The following information is displayed on the Buffer Pool tab page in the content detail area of the Applications screen: Field Buffer Quality Indicates percentage at which the data is read from the buffer pool, rather than directly from the hard disk Overall Buffer Quality This is calculated using the following formula: (logical reads - physical reads) / (logical reads) * 100 Data Hit Ratio Indicates percentage at which data (without index data) is read from the buffer pool, rather than directly from the hard disk Indicates percentage at which index data is read from the buffer pool, rather than directly from the hard disk Description

Index Hit Ratio

September 2011

325

12 Appendix

Average Time Physical Reads Average time in milliseconds required to read data from disk into the buffer pool Average time in milliseconds required to write data from the buffer pool to disk

Physical Writes Data Logical Reads

Number of read accesses to data in the buffer pool Number of read accesses to data on disk (I/O)

Physical Reads

The value includes the number of physical reads that were performed synchronously (by the database manager agents) and asynchronously (by the I/O servers). Number of write accesses to data on disk (I/O)

Physical Writes

It includes the number of physical writes that were performed synchronously (by the database manager agents) and asynchronously (by the I/O cleaners). Number of logical read requests that required I/O to get data pages into the temporary tablespace Number of physical read requests that required I/O to get data pages into the temporary tablespace

Temporary Logical Reads Temporary Physical Reads Index Logical Reads

Number of read accesses to index data in the buffer pool Number of read accesses to index data on disk (I/O)

Physical Reads

Since index data is read only by the database manager agents, this value contains the number of synchronously read index pages. Number of write accesses to index data on disk (I/O)

Physical Writes

The value includes the number of physical writes that were performed synchronously (by the database manager agents) and asynchronously (by the I/O cleaners). Number of logical read requests that required I/O to get index pages into the temporary tablespace Number of physical read requests that required I/O to get index pages into the temporary tablespace

Temporary Logical Reads Temporary Physical Reads

326

September 2011

12 Appendix

12.24 Application Details: Direct I/O


The following information is displayed on the Direct I/O tab page in the content detail area of the Applications screen: Field Average Time Direct Reads Direct Writes I/O Direct Reads Read accesses from disk that do not use the buffer pool (LONG VARCHAR fields, backup) Write accesses to disk that do not use the buffer pool (LONG VARCHAR fields, restore, load) Average time in milliseconds required to read directly from disk Average time in milliseconds required to write directly to disk Description

Direct Writes Average I/O per Request Direct Reads Direct Writes

Average number of requests to read directly from disk Average number of requests to write directly to disk

12.25 Application Details: XML Storage


The following information is displayed on the XML Storage tab page in the content detail area of the Applications screen: Field Pool Data Logical Reads Physical Reads Write Accesses Number of data pages for XML storage objects (XDAs) that have been requested from the buffer pool (logical reads) for regular and large tablespaces Number of data pages for XML storage objects (XDAs) that have been read from the tablespace containers (physical reads) for regular and large tablespaces Number of times a buffer pool data page for an XML storage object (XDA) was physically written to disk Description

September 2011

327

12 Appendix

Temporary Data Logical Reads Physical Reads Asynchronous I/O Physical Reads Number of XML storage object (XDA) data pages that have been read in from the tablespace containers (physical reads) by asynchronous engine dispatchable units (EDUs) for all types of tablespaces. Number of pages for XML storage objects (XDA) that have been requested from the buffer pool (logical reads) for temporary tablespaces. Number of pages for XML storage objects that have been (XDA) read from the tablespace containers (physical reads) for temporary tablespaces

Number of times a buffer pool data page for an XML storage object (XDA) was physically written to disk by either an asynchronous page cleaner, or a Physical Writes prefetcher A prefetcher may have written dirty pages to disk to create space for the pages being prefetched. Read Requests Number of asynchronous read requests for XML storage object (XDA) data

328

September 2011

12 Appendix

12.26 Application Details: Locks and Deadlocks


The following information is displayed on the Locks and Deadlocks tab page in the content detail area of the Applications screen: Fields Lock Waits Total Total number of times that this application requested a lock, but had to wait because another application was already holding a lock on the data Total amount of elapsed time in milliseconds that this application has waited for a lock to be granted Average time in milliseconds waited for a lock Description

Time Waited Average Time Waited Escalations

Number of times that locks have been escalated from several row locks to a table lock Lock Escalations If the maximum allowed length of the lock list is reached, row locks are converted to table locks to save space in the lock list. This process is called "lock escalation".

Number of times that locks have been escalated from several row locks to one exclusive table lock, or the number of times an exclusive lock on a row Exclusive Lock caused the table lock to become an exclusive lock Escalations Exclusive locks are important to track since they can impact the concurrency of your data because other applications cannot access data held by an exclusive lock. Locks Locks Currently Total number of locks currently held by the application Held Number of deadlocks that have occurred Deadlock situations are recognized and resolved automatically by the database The database configuration parameter DLCHKTIME determines when a lock wait situation is resolved. Number of times that a request to lock an object timed out instead of being granted Lock Timeouts The database configuration parameter LOCKTIMEOUT determines when a lock wait situation is resolved. Lock Timeout Value of the database configuration parameterLOCKTIMEOUT

Deadlocks Detected

September 2011

329

12 Appendix

Fields Value Deadlock Event Monitor Statement History List Size

Description

When a detailed deadlock event monitor with history is running, this element reports the number of bytes being used from the database monitor heap (HON_HEAP_S) to keep track of the statement history list entries.

12.27 Application Details: Calls


The following information is displayed on the Calls tab page in the content detail area of the Applications screen: Field Rows Deleted Inserted Selected Updated Statements Executed SELECT SQL UPDATE/INSERT/DELETE Number of SELECT statements that were executed Number of UPDATE, INSERT, and DELETE statements that were executed Number of Data Definition Language (DDL) statements that were executed, such as CREATE TABLE, CREATE VIEW, ALTER TABLE, and DROP INDEX. Number of data records that were deleted Number of data records that were inserted Number of data records that were selected Number of data records that were updated Description

DDL

Statements Attempted COMMITs Number of COMMIT statements that have been attempted Number of ROLLBACK statements that have been attempted Rollbacks Automatic rollbacks caused by error situations or deadlocks are not included. Number of dynamic SQL statements attempted

Dynamic SQL

330

September 2011

12 Appendix

Field Static SQL Failed SQL Hash Joins Total Total Hash Loops

Description Number of static SQL statements attempted Number of attempted SQL statements that failed

Total number of hash joins executed Total number of times that a single partition of a hash join was larger than the available sort heap space Number of times that hash join data exceeded the available sort heap space Number of times that hash join data exceeded the available sort heap space by less than 10%

Overflows

Small Overflows

12.28 Application Details: Sorts


The following information is displayed on the Sorts tab page in the content detail area of the Applications screen: Field Sort Time Total Average Sorts Total Sorts Sort Overflows Total number of sorts that have been executed If the storage area allocated for sorting is not large enough, a sort overflow occurs. The hard disk is then used temporarily. Total time in milliseconds required for all sort processes Average sort time in milliseconds Description

September 2011

331

12 Appendix

12.29 Application Details: Cache


The following information is displayed on the :Cache tab page in the content detail area of the Applications screen: Field Catalog Cache Indicates percentage at which the data is read from the catalog cache, rather than directly from the hard disk Quality This is calculated using the following formula: (catalog cache lookups - catalog cache insert) / catalog cache lookups * 100 Lookups Number of times that the catalog cache was referenced to obtain table descriptor information Number of times that the system tried to insert table descriptor information into the catalog cache Number of times that an insert into the catalog cache failed due to the catalog cache being full Number of times that an insert into the catalog cache failed due to the database heap being full Description

Inserts

Overflows

Heap Full Package Cache

Indicates percentage at which the data is read from the package cache, rather than directly from the hard disk Quality This is calculated using the following formula: (package cache lookups - package cache inserts) / package cache lookups * 100 Lookups Inserts Number of times an application looked for a section in the package cache Total number of times that a request section was not available for use and had to be loaded into the package cache

332

September 2011

12 Appendix

12.30 Application Details: Unit of Work


The following information is displayed on the Unit of Work tab page in the content detail area of the Applications screen: Field Unit of Work Start Time Stop Time Elapsed Time (s) Elapsed Time (s) Time that unit of work first required database resources Time that the most recent unit of work completed, which occurs when the database changes are committed or rolled back Duration of unit of work in seconds Description

Duration of unit of work in microseconds

Log Space Used Log space used in bytes in most recent unit of work Completion Status Previous Unit of Work Stop Time Previous time that the most recent unit of work completed, which occurs when the database changes are committed or rolled back Completion status of last transaction

12.31 Application Details: Statement


The following information is displayed on the Statement tab page in the content detail area of the Applications screen: Field Statement Start Time Stop Time Elapsed Time(s) Elapsed Time (sec) Date and time when unit of work starts, the statement starts, or a deadlock is detected Date and time when the statement stopped executing Duration of unit of work in seconds Duration of unit of work in microseconds Description

September 2011

333

12 Appendix

Field Rows Rows Read Rows Written Sort Sort Overflow Total Sort Time Number of Statement Sorts Data Logical Reads Physical Reads

Description

Number of rows read from the table Number of rows changed (inserted, deleted, or updated) in the table

If the storage area allocated for sorting is not large enough, a sort overflow occurs. The hard disk is then temporarily used. Total time for all sort processes Total number of sorts that have been executed

Number of read accesses to data in the buffer pool Number of read accesses to data on disk

Temporary Logical Number of logical read requests that required I/O to get data pages into Reads the temporary tablespace Temporary Physical Reads Index Logical Reads Physical Reads Number of read accesses to data in the buffer pool Number of read accesses to data on disk Number of physical read requests that required I/O to get data pages into the temporary tablespace

Temporary Logical Number of logical read requests that required I/O to get index pages into Reads the temporary tablespace Temporary Physical Reads Number of physical read requests that required I/O to get index pages into the temporary tablespace

334

September 2011

12 Appendix

12.32 Application Details: Statement Text


The following information is displayed on the Statement Text tab page in the content detail area of the Applications screen: Field Statement Type of statement processed Possible types are: Type Static SQL statement Dynamic SQL statement An operation other than an SQL statement, for example, a bind or precompile operation Operation currently being processed or most recently processed (if none is currently running) Possible operations are: SELECT PREPARE EXECUTE EXECUTE IMMEDIATE OPEN FETCH Operation CLOSE DESCRIBE STATIC COMMIT STATIC ROLLBACK FREE LOCATOR PREP_COMMIT CALL PREP_OPEN PREP_EXEC Description

September 2011

335

12 Appendix

Field COMPILE

Description

Blocking Cursor

Indicates if the statement that is executed is using a blocking cursor (YES) or not (NO) If data is transferred in blocks and not row by row, the performance of the corresponding query is improved. Text of dynamic SQL statement that was being processed when the snapshot was taken

Statement It can also be the text of the statement that was most recently processed if no statement was being processed at the time when the snapshot was taken. If a statement is displayed, you can choose EXPLAIN to list the access plan for the statement execution. This function provides a detailed analysis of expensive SQL statements. To show the current access plan of the statement, you can choose the EXPLAIN pushbutton. To display the ABAP source code from where the SQL statement was executed, you can choose the Show Source pushbutton. Note The Show Source pushbutton is only available if the following applies: The SAP system on which the currently monitored database is running is an ABAP system. The SAP system has the minimum Support Package level as described in SAP Note 1493490. End of the note.

More Information
The EXPLAIN Function [page 43]

336

September 2011

12 Appendix

12.33 Application Details: SQL Workspace


The following information is displayed on the SQL Workspace tab page in the content detail area of the Applications screen: Field Private Workspace Lookups Inserts Overflows Number of times an application looked for an SQL section in the agent's private workspace Inserts of SQL sections by an application into the private workspace Number of times that the private workspace overflowed the bounds of its allocated memory Description

High-Water Mark Largest size reached by the private workspace Shared Workspace Lookups Inserts Overflows Number of times an application looked for an SQL section in the agent's shared workspace Inserts of SQL sections by an application into the shared workspace Number of times that the shared workspace overflowed the bounds of its allocated memory

High-Water Mark Largest size reached by the shared workspace

September 2011

337

You might also like