197
Database Administration Guide Database Administration Using the DBA Cockpit: IBM DB2 for Linux, UNIX, and Windows For SAP Systems Based on SAP NetWeaver 7.0 SP12 or higher 7.1 or higher Document Version 1.00 – April 30, 2007 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

Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

Embed Size (px)

Citation preview

Page 1: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

Database Administration Guide

DatabaseAdministration Usingthe DBA Cockpit:IBM DB2 for Linux,UNIX, and Windows

For SAP Systems Based onSAP NetWeaver

7.0 SP12 or higher

7.1 or higher

Document Version 1.00 – April 30, 2007

SAP AGDietmar-Hopp-Allee 1669190 WalldorfGermanyT +49/18 05/34 34 24F +49/18 05/34 34 20www.sap.com

Page 2: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

© Copyright 2007 SAP AG. All rights reserved.

No part of this publication may be reproduced or transmitted in any formor for any purpose without the express permission of SAP AG. Theinformation contained herein may be changed without prior notice.

Some software products marketed by SAP AG and its distributors containproprietary software components of other software vendors.

Microsoft, Windows, Outlook, and PowerPoint are registered trademarksof Microsoft Corporation.IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA,AIX, S/390, AS/400, OS/390, OS/400, iSeries, pSeries, xSeries, zSeries,z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, Informix,i5/OS, POWER, POWER5, OpenPower and PowerPC are trademarks orregistered trademarks of IBM Corporation.

Adobe, the Adobe logo, Acrobat, PostScript, and Reader are eithertrademarks or registered trademarks of Adobe Systems Incorporated inthe 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 OpenGroup.Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame,VideoFrame, and MultiWin are trademarks or registered trademarks ofCitrix Systems, Inc.

HTML, XML, XHTML and W3C are trademarks or registeredtrademarks of W3C®, World Wide Web Consortium, MassachusettsInstitute of Technology.

Java is a registered trademark of Sun Microsystems, Inc.

JavaScript is a registered trademark of Sun Microsystems, Inc., usedunder license for technology invented and implemented by Netscape.

MaxDB is a trademark of MySQL AB, Sweden.

SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, andother SAP products and services mentioned herein as well as theirrespective logos are trademarks or registered trademarks of SAP AG inGermany and in several other countries all over the world. All otherproduct and service names mentioned are the trademarks of theirrespective companies. Data contained in this document servesinformational purposes only. National product specifications may vary.

These materials are subject to change without notice.These materials are provided by SAP AG and its affiliatedcompanies ("SAP Group") for informational purposesonly, without representation or warranty of any kind, andSAP Group shall not be liable for errors or omissions withrespect to the materials. The only warranties for SAPGroup products and services are those that are set forth inthe express warranty statements accompanying suchproducts and services, if any. Nothing herein should beconstrued as constituting an additional warranty.

SAP Library document classification: PUBLIC

DisclaimerSome components of this product are based on Java™.Any code change in these components may causeunpredictable and severe malfunctions and is thereforeexpressively prohibited, as is any decompilation of thesecomponents.

Any Java™ Source Code delivered with this product isonly to be used by SAP’s Support Services and may notbe modified or altered in any way.

Documentation in the SAP Service MarketplaceYou can find this documentation at the following Internetaddress:service.sap.com/instguides

Page 3: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

Typographic Conventions

Type Style Description

Example text Words or characters quotedfrom the screen. These includefield names, screen titles,pushbuttons labels, menunames, menu paths, and menuoptions.

Cross-references to otherdocumentation

Example text Emphasized words or phrasesin body text, graphic titles, andtable titles

EXAMPLE TEXT Technical names of systemobjects. These include reportnames, program names,transaction codes, tablenames, and key concepts of aprogramming language whenthey are surrounded by bodytext, for example, SELECT andINCLUDE.

Example text Output on the screen. Thisincludes file and directorynames and their paths,messages, names of variablesand parameters, source text,and names of installation,upgrade and database tools.

Example text Exact user entry. These arewords or characters that youenter in the system exactly asthey appear in thedocumentation.

<Exampletext>

Variable user entry. Anglebrackets indicate that youreplace these words andcharacters with appropriateentries to make entries in thesystem.

EXAMPLE TEXT Keys on the keyboard, forexample, F2 or ENTER.

Icons

Icon Meaning

Caution

Example

Note

Recommendation

Syntax

Additional icons are used in SAPLibrary documentation to help youidentify different types of information ata glance. For more information, seeHelp on Help General InformationClasses and Information Classes forBusiness Information Warehouse onthe first page of any version of SAPLibrary.

Page 4: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

4 April 2007

Contents

Database Administration Using the DBA Cockpit: IBM DB2 forLinux, UNIX, and Windows ................................................................ 8

1 The DBA Cockpit ................................................................................. 91.1 Central System Data ............................................................................ 111.2 Maintenance Actions in the DBA Cockpit .......................................... 121.3 Configuration of Systems for Remote Monitoring ............................ 13

1.3.1 Configuring Systems for Remote Monitoring Using Remote DatabaseConnections .................................................................................................................... 14

1.3.1.1 Configuration of Database Connections ........................................................... 161.3.1.1.1 Adding a Database Connection.................................................................... 161.3.1.1.2 Changing a Database Connection .............................................................. 181.3.1.1.3 Testing a Database Connection ................................................................... 181.3.1.1.4 Deleting a Database Connection.................................................................. 19

1.3.2 Configuring Systems for Remote Monitoring Using the System LandscapeDirectory (SLD) ............................................................................................................... 19

2 Performance ...................................................................................... 212.1 Performance: Partitions ....................................................................... 212.2 Performance: Database ....................................................................... 22

2.2.1 Database: Buffer Pool ............................................................................................ 232.2.2 Database: Cache.................................................................................................... 252.2.3 Database: Asynchronous I/O .................................................................................. 262.2.4 Database: Direct I/O .............................................................................................. 272.2.5 Database: SQL Workspace .................................................................................... 282.2.6 Database: Locks and Deadlocks............................................................................. 292.2.7 Database: Logging ................................................................................................. 302.2.8 Database: Calls ..................................................................................................... 322.2.9 Database: Sorts .................................................................................................... 342.2.10 Database: XML Storage ...................................................................................... 35

2.3 Performance: Schemas ...................................................................... 362.4 Performance: Buffer Pools .................................................................. 37

2.4.1 Buffer Pool ............................................................................................................. 382.4.2 Buffer Pools: Asynchronous I/O .............................................................................. 412.4.3 Buffer Pools: Direct I/O .......................................................................................... 422.4.4 Buffer Pools: XML Storage ..................................................................................... 43

2.5 Performance: Tablespaces .................................................................. 442.5.1 Tablespaces: Buffer Pool ....................................................................................... 452.5.2 Tablespaces: Asynchronous I/O ............................................................................. 482.5.3 Tablespaces: Direct I/O .......................................................................................... 492.5.4 Tablespaces: XML Storage .................................................................................... 49

2.6 Performance: Tables ............................................................................ 502.7 Performance: Application .................................................................... 52

2.7.1 Applications ............................................................................................................ 532.7.2 Applications: Agents ............................................................................................... 562.7.3 Applications: Buffer Pool......................................................................................... 58

Page 5: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 5

2.7.4 Applications: Direct I/O .......................................................................................... 592.7.5 Applications: XML Storage ..................................................................................... 602.7.6 Applications: Locks and Deadlocks ......................................................................... 612.7.7 Applications: Calls .................................................................................................. 632.7.8 Applications: Sorts ................................................................................................. 642.7.9 Applications: Cache ................................................................................................ 652.7.10 Applications: Unit of Work .................................................................................... 662.7.11 Applications: Statement ........................................................................................ 672.7.12 Applications: Statement Text ................................................................................ 682.7.13 Applications: SQL Workspace............................................................................... 70

2.8 Performance: SQL Cache .................................................................... 712.9 Performance: Lock Waits and Deadlocks .......................................... 752.10 Performance: Inplace Table Reorganization .................................... 772.11 Performance: History - Database ...................................................... 792.12 Performance: History – Tables.......................................................... 81

3 Space .................................................................................................. 833.1 Space: Tablespaces ............................................................................. 83

3.1.1 Maintaining Tablespaces ........................................................................................ 863.2 Space: Containers ................................................................................ 913.3 Space: Tables and Indexes.................................................................. 913.4 Space: Single Table Analysis .............................................................. 933.5 Space: History - Overview ................................................................. 1033.6 Space: History - Database and Tablespaces ................................... 1043.7 Space: History - Tables and Indexes ................................................ 106

4 Backup and Recovery ..................................................................... 1084.1 Backup and Recovery: Backup Overview ........................................ 1084.2 Backup and Recovery: Logging Parameters ................................... 108

5 Configuration ................................................................................... 1095.1 Configuration: Database Manager .................................................... 1095.2 Configuration: Database .................................................................... 110

5.2.1 Maintaining the Database Configuration ............................................................... 1125.2.2 Comparing Database Configuration Parameters for Several Database Partitions .. 113

5.3 Configuration: Registry Variables .................................................... 1135.4 Configuration: Parameter Changes .................................................. 1145.5 Configuration: Database Partition Groups....................................... 115

5.5.1 Maintaining Database Partition Groups ................................................................. 1165.6 Configuration: Buffer Pools .............................................................. 120

5.6.1 Maintaining Buffer Pools ....................................................................................... 1205.7 Configuration: Special Tables Regarding RUNSTATS .................... 1235.8 Configuration: File Systems .............................................................. 1255.9 Configuration: Data Classes ............................................................. 126

5.9.1 Maintaining Data Classes ..................................................................................... 1275.10 Configuration: Monitoring Settings ................................................ 1285.11 Configuration: Automatic Maintenance Settings .......................... 130

5.11.1 Configuring General Maintenance Settings ......................................................... 1315.11.2 Configuring Automatic Backup Settings .............................................................. 132

Page 6: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

6 April 2007

5.11.3 Configuring Automatic RUNSTATS Settings ....................................................... 1345.11.4 Configuring Automatic REORG Settings ............................................................. 136

6 Jobs .................................................................................................. 1396.1 Central Calendar ................................................................................. 139

6.1.1 Using the Central Calendar .................................................................................. 1406.2 The DBA Planning Calendar .............................................................. 142

6.2.1 Setting Up the DBA Planning Calendar ................................................................. 1456.2.1.1 1 Configuring the Back End of the DBA Planning Calendar ............................. 1486.2.1.2 Scheduling an Action ...................................................................................... 1486.2.1.3 Changing an Action ......................................................................................... 1506.2.1.4 Deleting an Action ........................................................................................... 1516.2.1.5 Executing an Action ........................................................................................ 1516.2.1.6 Displaying the Status of a Day’s Actions ......................................................... 1516.2.1.7 Displaying Scheduled Actions ......................................................................... 1526.2.1.8 Troubleshooting .............................................................................................. 1536.2.1.9 Updating Statistics .......................................................................................... 1536.2.1.10 Scheduling a REORGCHK for All Tables ....................................................... 1546.2.1.11 Reorganizing Tables ..................................................................................... 1556.2.1.12 Database Backup .......................................................................................... 1566.2.1.13 Archiving Log Files To Tape .......................................................................... 1596.2.1.14 Scheduling Scripts ........................................................................................ 160

6.3 The DBA Log....................................................................................... 1606.4 The SQL Script Maintenance ............................................................. 161

7 Alerts ................................................................................................ 1647.1 Alerts: Database System Monitoring in CCMS ................................ 1647.2 Alerts: Configuring Database System Monitoring ........................... 1657.3 Alerts: Alert Monitor ........................................................................... 1667.4 Alerts: Alert Message Log ................................................................. 1687.5 Alerts: Alert Configuration ................................................................ 169

8 Diagnostics ..................................................................................... 1728.1 Diagnostics: Displaying the Audit Log ............................................. 1728.2 Diagnostics: Missing Tables and Indexes ....................................... 1738.3 Diagnostics: Deadlock Monitor ......................................................... 174

8.3.1 Creating the Deadlock Monitor ............................................................................ 1758.3.2 Deadlock Monitor Analysis ................................................................................... 176

8.4 Diagnostics: SQL Commands ........................................................... 1798.5 The EXPLAIN Function ...................................................................... 180

8.5.1 EXPLAIN Options ................................................................................................. 1818.6 Diagnostics: The Index Advisor ................................................. 185

8.6.1 Retrieving Index Recommendations ..................................................................... 1868.6.2 Defining Virtual User-Defined Indexes .................................................................. 1888.6.3 Validating Indexes Using the EXPLAIN Function ................................................. 1898.6.4 Creating Indexes in the ABAP Dictionary ............................................................. 189

8.7 Diagnostics: Cumulative SQL Trace ................................................. 1908.8 Diagnostics: DBSL Trace Directory .................................................. 1918.9 Diagnostics: Trace Status ................................................................. 191

Page 7: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 7

8.10 Diagnostics: Database Notification Log ........................................ 1938.11 Diagnostics: Database Diag Log .............................................. 194

8.12 Diagnostics: Dump Directory .......................................................... 1968.13 Diagnostics: DB2 Help Center......................................................... 196

9 Wizards: BI Data Distribution ........................................................ 197

Page 8: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

8 April 2007

Database Administration Using theDBA Cockpit: IBM DB2 for Linux, UNIX,and WindowsUse

This document explains how you administer your database within CCMS using the DBACockpit, which allows you to monitor, control and configure your database. The DBA Cockpit[Page 9] provides you with access to all the functions and indicators for monitoring andadministration:

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 ordatabase 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

See also:

For general information on CCMS, see the SAP Library at http://help.sap.com.

For DB2-specific information, see the IBM documentation IBM DB2 UniversalDatabase System Monitor Guide and Reference and the IBM DB2 UniversalDatabase Administration Guide: Performance.

Page 9: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 9

1 The DBA CockpitUse

The DBA Cockpit is a platform-independent tool that you can use to monitor and administeryour database. It provides a graphical user interface (GUI) for all actions and covers allaspects of handling a database system landscape.

You access the DBA Cockpit by calling transaction DBACOCKPIT. Then, the initial screenDBA Cockpit: System Configuration Maintenance appears.

FeaturesThe entry screen of the DBA Cockpit is divided into the following areas:

Action area

Action message window

Navigation frame

Framework message window

System landscapetoolbar

Application toolbar

Central system data

Application toolbar

Provides a minimum of functions, for example, to display or hide the areas on the leftside.

System landscape toolbar

Provides central functions to manage the system landscape, for example:

Access to system configuration where you configure and set up your systemlandscape

Management of database connections

Lets you choose the system to monitor. Also, additional information about adistributed database system is displayed if available.

Navigation frame

Displays a tree structure divided at the top level into the main task areas of databaseadministration. These are, for example, performance monitoring, space management,and job scheduling. Within each task area, there is a set of related action nodes.

Page 10: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

10 April 2007

Central system data

This area is common to most actions. It provides, for example, the following data:

Time of last refresh

Database startup time

Name of database

It is not available for all database platforms. For more information, see thecorresponding database-specific section.

Action area

Displays the details of the currently selected action.

Action message window

Only appears with certain actions and displays additional information that is related tothe selected action.

Framework message window

Displays the message window provided by the framework. Unlike the classic SAP GUImessaging process, the framework message window contains a complete history of allmessages sent during the session. In addition, you can:

Clean up the window by choosing Delete.

Collapse or expand or the window by choosing Minimize Message Window orShow Message Window.

Check if a long text for a message is available by double-clicking the messageor by choosing Show Longtext.

Changes to the screen area sizes are user-specific and are restored when younext start the DBA Cockpit.

ActivitiesYou can use the DBA Cockpit to:

Navigate between different actions

Change to another action without closing the previous action and still hold all dataretrieved by this action

You can return to this action without data loss by double-clicking the previous action inthe navigation frame or by choosing Back.

Handle central configuration

Monitor remote systems using remote database connections

To use the functions offered for remote monitoring, you must configure the system youwant to monitor. The local system is configured automatically when you start the DBACockpit for the first time.

After having configured the connection and depending on the database, more actionsare required to configure the database monitor and to set up database administration.

Page 11: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 11

Constraints

For systems that are monitored using a remote database connection, constraints depend onwhether:

The database release of the remote system is compatible to the database release ofthe local system.

You want to monitor an ABAP-only or a Java-only SAP system.

1.1 Central System Data Most of the DBA Cockpit screens provide a unique subscreen area displaying the centralsystem data of the selected screen:

Field Description

Last Refresh Date and time when the screen data was last refreshed

DB Name Name of database of the selected system

Started Date and time when the database engine started

DB Release Database release

LastReset/Checkpoint

Date and time of last reset or checkpoint of the monitored data

Note

This field is available only for actions that support Reset/Since Reset orSet Checkpoint/Delta to Checkpoint.

End of the note.

Current Selection

The currently selected set of data. This is available for actions thatsupport Reset/Since Reset:

Since DBM Start

Reset

Since Reset

And for actions supporting checkpoints:

Current Configuration

Checkpoint Set

Delta to Checkpoint

System

Currently selected system

Note

This field is only available if the navigation frame has been grayed outusing the Full Screen on/off function. In this case, you can select the

Page 12: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

12 April 2007

Field Description

required system in this field.

End of the note.

Partition

Partition of currently selected system

Note

This field is only available if the navigation frame has been grayed outusing the Full Screen on/off function. In this case, you select the requiredpartition in this field.

End of the note.

1.2 Maintenance Actions in the DBA CockpitThe DBA Cockpit provides a set of actions to monitor and to maintain the database. To beable to perform these actions, the SAP user requires some additional authorizations.

The maintenance actions provided in the DBA Cockpit set locks to prevent parallelprocessing. All changes to the database are recorded in an audit log file.

Authorization Check

When you start the DBA Cockpit or change to another system in the DBA Cockpit, anauthorization check is performed.

Granting of Database Permissions

To be able to access the database, the user used for remote monitoring must at least havesufficient authorizations.

Local systems use the connect user for monitoring tasks. This user already hassufficient permissions. If more authorizations are required for administrative actions, asecond connection using the database administration user is used.

Systems monitored via remote database connections use the user specified for thedatabase 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 forthe system being monitored. All locks are released when you exit the DBA Cockpit or whenyou change to another system.

Auditing of Maintenance Actions

The following only applies to Oracle and IBM DB2 for Linux, UNIX, andWindows.

When you make changes that affect database objects such as database configurationparameters or tablespaces, an audit log is written. You can display this audit log in the DBACockpit.

For more information, see Displaying the Audit Log.

Page 13: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 13

1.3 Configuration of Systems for RemoteMonitoringTo be able to use the DBA Cockpit to monitor remote systems, you have to configure thosesystems in the DBA Cockpit. You can configure your database system either using databaseinformation that is stored in the system landscape directory (SLD) for automatic generationand update of system entries or manually using database connections and system entries.

You access the screen The DBA Cockpit: System Configuration Maintenance by choosingSystem Configuration in the DBA Cockpit. A list of all monitored systems is displayed with anicon showing the current status of a system. You can change the status of a system bychoosing Stop or Go.

In the event of severe errors, we recommend that you disable your system toprevent further problems. After you have investigated and corrected the error,you have to enable your system again.

Normally, when you start the DBA Cockpit, the local system is set as default system. Tochange this setting, select a system from the list and choose Default System.

This setting only applies to the user currently logged on to the system. It is not asystem-wide setting.

You use one of the following methods to monitor a system remotely:

Remote database connections

This method uses additional connections. It is the main access method for monitoringand administration tasks and is mandatory. You can specify remote connections forany database and maintain the connections using the DBA Cockpit. For moreinformation, see Maintaining Database Connections.

RFC connection

For this method you have to assign an RFC connection to your system. RFCconnections are available for SAP ABAP systems only. You can use RFC connections:

As an optional access path for ABAP-related monitoring functions, forexample, for the consistency check of the ABAP Dictionary. That is, the DBACockpit uses the RFC connection in parallel to the database connection for thesame system.

MS SQL Server only:

For a database connection that is localized in another ABAP system. That is,the DBA Cockpit can use the RFC connection together with the databaseconnection.

You can only maintain RFC connections with transaction SM59, not with theDBA Cockpit.

See also:Configuring Systems for Remote Monitoring Using Remote Database Connections

Configuring Systems for Remote Monitoring Using the System Landscape Directory (SLD)

Page 14: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

14 April 2007

1.3.1 Configuring Systems for Remote MonitoringUsing Remote Database ConnectionsUse

You use this procedure to configure systems that you want to monitor using remote databaseconnections.

Depending on the database platform of the selected system, some optionsmight not be available. In this case you cannot enter any data in thecorresponding fields.

Prerequisites

The system(s) you want to monitor must have a database release that is compatiblewith the database release of your local database.

The user for the database connection must have sufficient database permissions. Formore information, see Maintenance Actions in the DBA Cockpit.

Procedure

Adding a System...

1. Call the DBA Cockpit.

The screen DBA Cockpit: System Configuration Maintenance appears. It displays a listof all systems available with a Stop, Go, or Inactive icon, which shows the currentsystem status.

When you start the DBA Cockpit for the first time, the local system isautomatically added to the list of all systems available. At least one system entryis displayed.

2. Choose Add.

The screen Configuration: System Administration – Add System Entry appears.

3. Specify the connection data as follows:

a. In the System field, enter the name of the system you want to monitor.

This name is a unique ID and does not need to be the SAP system ID. You canchoose any name except the SAP system ID of the local system, which isreserved for the local system entry.

Except for the local system entry, Remote Database is already selected.

b. Select Database Connection.

c. Enter the name of the database connection. If the database connection does notyet exist, you are directed to the System Administration Details screen whereyou can specify all relevant data for the new connection.

After you have saved your entries, you are redirected to the screen DBConnections: Add Connection Entry.

For more information, see Maintaining the Database Connection.

Page 15: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 15

d. If an additional RFC destination is used for special ABAP monitoring functionsor if the connection is initially routed using an RFC connection (MS SQL Serveronly), select RFC Destination, too.

e. If required, enter the name of the RFC connection.

After the connection data has been completed, it is displayed on the System Data tabpage. You can enter additional data on the Administration Data tab page as follows:

Enter a description of your system.

Depending on the database platform, select the options for how you want tocollect monitoring data:

If alerts are to be provided for the RZ20 alert monitor, select CollectAlert Data.

If data about the performance or the size of database objects is to becollected, select Collect History Data.

If the task of collecting monitoring data is running on the remotesystem, select Data Collection by Remote System.

If data for the central planning calendar is to be provided, select CollectCentral Planning Calendar Data.

4. Save your changes.

Changing the Connection Parameters of a System...

1. Perform step 1 as described above under Adding a System.

2. Select a system.

3. Choose Edit.

The screen Configuration: System Administration – Change System Entry appears.

4. Enter your changes in the corresponding fields.

5. Save your changes.

Deleting a System Entry...

1. Perform step 1 as described above under Adding a System.

2. Select a system.

3. Choose Delete.

Page 16: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

16 April 2007

1.3.1.1 Configuration of Database ConnectionsPurpose

This section describes how you set and maintain technical attributes for remote databaseconnections. The DBA Cockpit uses these connections for administration and monitoring orfor application programs that use secondary connections to external databases.

Process Flow...

1. You call the DBA Cockpit and choose DB Connections in the system landscapetoolbar.

The screen DBA Cockpit: Database Connections appears displaying a list of allavailable database connection definitions grouped by database platform:

Column Description

Remote DatabaseConnections

Name of database connection

This is a unique name that you canfreely choose.

DB Name Name of database

DB Host Name of database host

DB Schema Name of the database schema to be monitored

User Name of the connection user

Permanent Specifies whether the connect user must bepermanently available

Max. Connections Maximum allowed number of open connections

Opt. Connections Optimal number of connections

By default, the database connections that are defined in the local system are displayed.

2. You are able to perform one of the following tasks:

You add database connections.

You change an existing database connection.

You delete a database connection.

You test a database connection.

See also:

Adding a Database Connection

Changing a Database Connection

Deleting a Database Connection

Testing a Database Connection

1.3.1.1.1 Adding a Database Connection...

1. Call the DBA Cockpit.

2. In the system landscape toolbar, choose DB Connections.

Page 17: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 17

3. Choose Add.

The screen DB Connections – Add Connection Entry appears.

4. In the Connection Name field, specify the name of the connection.

This name is a unique ID that you can choose freely except for names that arereserved by SAP for generated connections. These can be, for example,administrator connections or connections that are used by systems from thesystem landscape directory (SLD).

5. Specify the database connection attributes as follows:

a. In the Database System field, specify the name of the database platform.

b. In the Connection Maximum field, enter an appropriate value. This value limitsthe number of database connections that are currently held by the SAP system.The SAP system does not let you exceed this limit.

c. In the Connection Optimum field, enter an appropriate value. This value is amore flexible limit that can be exceeded.

d. If you want the connection to be mandatory for the SAP system, selectPermanent Connection. This parameter defines the availability of the databaseconnection.

It is then handled like the local default connection, that is, if this databaseconnection is not available for a work process, the work process of the SAPsystem cannot run.

You should set this parameter only if this connection is absolutely required torun your SAP system.

e. In the User Name field, enter the name of the connect user. Make sure that youchoose a user with the appropriate authorizations. For more information, seeMaintenance Actions in the DBA Cockpit.

f. In the Password field, enter a password for the connect user.

6. In the Connection Parameters table, specify the following additional database-specificattributes:

Attribute Description

Database Name Name of database

Service Name Name or number of the service

This value corresponds to the parameterSVCENAME of the database manager configuration(DBM) of the remote database.

Page 18: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

18 April 2007

Database Host Name of the remote database server

Schema Name Name of schema to be monitored

If you omit this field, the name of theSAP connect user is used as schema.

To support new connection parameters and for support scenarios, you mighthave to add connection parameters in an unchecked raw format. To be able todo so, choose Guided Mode <-> Expert Mode and switch to the expert mode. Inthe expert mode, you can enter connection parameters as a string instead ofusing the guided mode. However, we do not recommend that you use the expertmode.

7. To confirm your entries, choose Save.

Result

As soon as the connection has been specified, the DBA Cockpit connects automatically to thenewly added database system and displays data on the System Data tab page.

1.3.1.1.2 Changing a Database ConnectionC...

1. Call the DBA Cockpit.

2. In the system landscape toolbar, choose DB Connections.

3. Select a database connection entry and choose Edit.

The screen DB Connections – Change Connection Entry appears.

4. Enter your changes in the appropriate fields as described in Adding a DatabaseConnection.

5. Save your changes.

1.3.1.1.3 Testing a Database Connection

Use

You test a database connection to make sure that, for example, you entered the correct userand password information as well as the correct technical connection data, such as hostname.

Procedure...

1. Call the DBA Cockpit.

2. In the system landscape toolbar, choose DB Connections.

3. Select a system and choose Test.

The result is displayed in the message window below.

Page 19: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 19

1.3.1.1.4 Deleting a Database Connection...

1. Call the DBA Cockpit.

2. In the system landscape toolbar, choose DB Connections.

3. Select a system and choose Delete.

If the selected database connection is still in use by a system that is registeredin the DBA Cockpit, you cannot delete it.

1.3.2 Configuring Systems for Remote MonitoringUsing the System Landscape Directory (SLD)Use

The system landscape directory (SLD) contains data from all database systems available inyour system landscape. You can use this data to set up the system configuration in the DBACockpit instead of setting it up manually.

When you set up the DBA Cockpit for the first time, you use this procedure to import theappropriate data from the SLD. During production operation, you use the procedure tosynchronize the data between the SLD and the DBA Cockpit periodically.

Procedure...

1. To import database connection data from the SLD, call the DBA Cockpit.

2. In the system landscape toolbar, choose System Configuration.

The screen The DBA Cockpit: System Configuration Maintenance appears.

3. Choose SLD System Import.

The SLD System Import screen appears. Depending on the system landscape, one ormore of the following nodes are displayed:

New Database Systems in the SLD

All database systems registered in the SLD that are so far unknown to the DBACockpit are displayed.

Changed Systems From Earlier SLD Imports

All database systems for which the main data differs between the SLD and theDBA Cockpit are displayed.

Systems No Longer Registered in the SLD

All systems that were originally imported from the SLD into the DBA Cockpit butthat are no longer registered in the SLD are displayed.

Systems Identical in the SLD and in the DBA Cockpit

All systems that are registered in the SLD and that are identical in the DBACockpit are displayed.

Page 20: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

20 April 2007

Unsupported Database Systems in the SLD

All database systems that are registered in the SLD but not supported by theDBA Cockpit are displayed.

Each database system is described as follows:<Name (system ID) of the database system> on <main databasehost> ( <database platform> )

The actions allowed for each database system are displayed in the secondcolumn of the tree.

4. To import database system data, select the actions that you want to execute for theselected database systems and choose Import. By default, only the import of newdatabase systems is selected.

The selected actions are executed. A short message for each executed action isdisplayed in the message window below.

Connection data that is retrieved from the SLD might not be complete for one ofthe following reasons:

Depending on the data provided by a system to the SLD, some connectiondata can be incomplete.

User or password data is generally not available via SLD.

When you establish the connection to an imported system, the DBA Cockpitchecks the completeness of a configured system. That is, if necessary, you areprompted for user, password and connection information.

If additional connection information is required, enter the required dataaccording to the maintenance dialog that is described in Configuration ofDatabase Connections.

Page 21: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 21

2 PerformanceThe following sections provide information on performance:

Performance: Partitions [Page 21]

Performance: Database [Page 22]

Performance: Schemas [Page 36]

Performance: Buffer Pools [Page 37]

Performance: Tablespaces [Page 44]

Performance: Tables [Page 50]

Performance: Application [Page 52]

Performance: SQL Cache [Page 71]

Performance: Lock Waits and Deadlocks [Page 75]

Performance: Inplace Table Reorganization [Page 77]

Performance: History – Database [Page 79]

Performance: History – Tables [Page 81]

2.1 Performance: PartitionsIn multi-partition database systems this overview screen provides a selection of performancedata 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.

You can access the Partition Overview screen by calling the DBA Cockpit and choosingPerformance Partitions in the navigation frame of the DBA Cockpit.

For each partition of your database system, the following information is displayed:

Column Description

Partition Number of the partition (only displayed in a multi-partition database)

No. Buffer Pools Number of buffer pools used for a partition

Total Size Buffer Pools Total size in KB of all buffer pools used for a partition

Data Logical Reads Number of read accesses to data in the buffer pool

Index Logical Reads Number of read accesses to index data in the buffer pool

Page 22: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

22 April 2007

Data PhysicalReads

Number of read accesses to data on disk (I/O)

The value includes the number of physical reads that were performedsynchronously (by the database manager agents) and asynchronously (bythe I/O servers).

Index PhysicalReads

Number of read accesses to index data on disk (I/O)

Since index data is read only by the database manager agents, this valueincludes the number of synchronously read index pages.

Avg. Phys. ReadTime (ms)

Average time in milliseconds required to read data from disk into the bufferpool

Avg. Phys. WriteTime (ms)

Average time in milliseconds required to write data from the buffer pool todisk

Executed SQLStatements

Number of executed SQL statements (SELECT, INSERT, UPDATE,DELETE)

Package CacheSize

Amount of application heap memory to be used for caching a package’sstatic and dynamic SQL statements

As of DB2 Version 5, each database agent accesses a global cache.

Package CacheQuality (%)

Tells you whether or not the package or catalog cache is being usedeffectively. If the hit ratio of the package or catalog cache is greater than95%, the cache is performing well.

Note

If you double-click a line, database snapshot data is retrieved and displayed as described inPerformance: Database [Page 22].

End of the note.

2.2 Performance: Database The Database Snapshot screen provides an overview of the following critical databaseperformance indicators:

Buffer Pool [Page 23]

Cache [Page 25]

Asynchronous I/O [Page 26]

Direct I/O [Page 27]

SQL Workspace [Page 28]

Locks and Deadlocks [Page 29]

Page 23: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 23

Logging [Page 30]

Calls [Page 32]

Sorts [Page 34]

XML Storage [Page 35]

You can access the Database Snapshot screen by calling the DBA Cockpit and choosingPerformance Database in the navigation frame of the DBA Cockpit.

The Database Snapshot screen is the initial screen of the SAP database monitor for DB2 forLinux, UNIX and Windows. The system displays values collected since the database wasstarted. If the database is shut down, the values are deleted.

Note

The values displayed are not really meaningful until the database has been running for sometime. The longer the database has been running, the more useful the values.

End of the note.

2.2.1 Database: Buffer PoolTo display an overview of buffer pool information, call the DBA Cockpit.

1. In the navigation frame, choose Performance Database .

The Database Snapshot screen appears.

2. Choose Buffer Pool.

Field Description

Buffer Pools

Number Number of buffer pools

Total Size Total size in KB of all buffer pools

Buffer Quality

Overall BufferQuality

Indicates percentage at which the data is read from the buffer pool, ratherthan directly from the hard disk

This is calculated using the following formula: (logical reads - physicalreads) / (logical reads) * 100

Data Hit Ratio Indicates percentage at which data (without index data) is read from thebuffer pool, rather than directly from the hard disk

Index Hit Ratio Indicates the frequency as a percentage at which index data is read fromthe buffer pool, rather than directly from the hard disk

Page 24: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

24 April 2007

Field Description

Average Time

Physical Reads Average time in milliseconds required to read data from disk into thebuffer pool

Physical Writes Average time in milliseconds required to write data from the buffer pool todisk

Data

Logical Reads Number of read accesses to data in the buffer pool

Physical Reads

Number of read accesses to data on disk (I/O)

The value includes the number of physical reads that were performedsynchronously (by the database manager agents) and asynchronously(by the I/O servers).

Physical Writes

Number of write accesses to data on disk (I/O)

The value includes the number of physical writes that were performedsynchronously (by the database manager agents) and asynchronously(by the I/O cleaners).

SynchronousReads Number of read accesses to data on disk (by agents)

SynchronousWrites Number of write accesses to data on disk (by agents)

Temporary LogicalReads

Number of logical read requests that required I/O to get data pages intothe temporary tablespace

TemporaryPhysical Reads

Number of physical read requests that required I/O to get data pages intothe temporary tablespace

Index

Logical Reads Number of read accesses to index data in the buffer pool

Physical ReadsNumber of read accesses to index data on disk (I/O)

Since index data is read only by the database manager agents, this valueincludes the number of synchronously read index pages.

Physical Writes

Number of write accesses to index data on disk (I/O)

The value includes the number of physical writes that were performedsynchronously (by the database manager agents) and asynchronously(by the I/O cleaners).

Page 25: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 25

Field Description

SynchronousReads Number of read accesses to index data on disk (by agents)

SynchronousWrites Number of write accesses to index data on disk (by agents)

Temporary LogicalReads

Number of logical read requests that required I/O to get index pages intothe temporary tablespace

TemporaryPhysical Reads

Number of physical read requests that required I/O to get index pagesinto the temporary tablespace

Note

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 asynchronousaccesses.

End of the note.

2.2.2 Database: CacheTo display information on the cache, call the DBA Cockpit.

1. In the navigation frame, choose Performance Database .

The Database Snapshot screen appears.

2. Choose Cache.

Field Description

Catalog Cache

Size

Maximum allowed size in KB for the catalog cache

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 configurationparameter CATALOGCACHE_SZ.

Quality

Indicates percentage at which the data is read from the catalog cache,rather than directly from the hard disk

This is calculated using the following formula: (catalog cache lookups -catalog cache inserts) / catalog cache lookups * 100

Page 26: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

26 April 2007

Lookups Number of times that the catalog cache was referenced to obtain tabledescriptor information

Inserts Number of times that the system tried to insert table descriptorinformation into the catalog cache

Overflows Number of times that an insert into the catalog cache failed due to thecatalog cache being full

High-Water Mark Largest size reached by package cache

Package Cache

Size

Maximum allowed size in KB for the package cache

The package cache contains access plans. The maximum allowed size isdetermined by database configuration parameter PCKCACHESZ.

Quality

Indicates percentage at which the data is read from the package cache,rather than directly from the hard disk

This is calculated using the following formula: (package cache lookups -package cache inserts) / package cache lookups *100

Lookups Number of times an application looked for a section in the package cache

Inserts Total number of times that an access plan was not available for use andhad to be loaded into the package cache

Overflows Number of times that the package cache overflowed the bounds of itsallocated memory

High-Water Mark Largest size reached by the package cache

2.2.3 Database: Asynchronous I/OTo display information on I/O servers and I/O cleaners, call the DBA Cockpit....

1. In the navigation frame, choose Performance Database.

The Database Snapshot screen appears.

2. Choose Asynchronous I/O.

Page 27: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 27

Field Description

I/O

Number of I/O Servers Number of I/O servers that read dataasynchronously from the hard disk into thebuffer pool

Number of I/O Cleaners Number of I/O cleaners that write dataasynchronously from the buffer pool to thehard disk

Average Time

Asynchronous PhysicalReads

Average time in milliseconds required bythe I/O servers to read a page from diskand write it to the buffer pool

Asynchronous PhysicalWrites

Average time in milliseconds required bythe I/O cleaners to read a page from thebuffer pool and write it to the hard disk

Data

Asynchronous PhysicalReads

Number of data pages that were readasynchronously from disk and written to thebuffer pool by the I/O servers (prefetch)

Asynchronous PhysicalWrites

Number of data pages that were writtenasynchronously from buffer pool to disk (I/Ocleaners)

Asynchronous ReadRequests

Number of asynchronous data readrequests

Index

Asynchronous PhysicalReads

Number of index pages that were readasynchronously from disk and written to thebuffer pool by the I/O servers (prefetch)

Asynchronous PhysicalWrites

Number of index pages that were writtenasynchronously from buffer pool to disk (I/Ocleaners)

Asynchronous ReadRequests

Number of asynchronous index readrequests

Data is read or written in pages. A page can be 4 KB, 8 KB, 16 KB, or 32 KB insize.

2.2.4 Database: Direct I/OTo display information on direct I/O, call the DBA Cockpit....

1. In the navigation frame, choose Performance Database.

The Database Snapshot screen appears.

2. Choose Direct I/O.

Page 28: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

28 April 2007

Field Description

Average Time

Direct Reads Average time in milliseconds required toread directly from disk

Direct Writes Average time in milliseconds required towrite directly to disk

I/O

Direct Reads Read accesses from disk that do not usethe buffer pool (LONG VARCHAR fields,backup)

Direct Writes Write accesses to disk that do not use thebuffer pool (LONG VARCHAR fields,restore, load)

Average I/O per Request

Direct Reads Average number of requests to readdirectly from disk

Direct Writes Average number of requests to writedirectly to disk

2.2.5 Database: SQL WorkspaceTo display information on SQL workspace, call the DBA Cockpit.

1. In the navigation frame, choose Performance Database .

The Database Snapshot screen appears.

2. Choose SQL Workspace.

Field Description

PrivateWorkspace

Lookups Number of times an application looked for an SQL section in the agent'sprivate workspace

Inserts Inserts of SQL sections by an application into the private workspace

Overflows Number of times that the private workspace overflowed the bounds of itsallocated memory

High-Water Mark Largest size reached by the private workspace

SharedWorkspace

Page 29: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 29

Field Description

Lookups Number of times an application looked for an SQL section in the agent'sshared workspace

Inserts Inserts of SQL sections by an application into the shared workspace

Overflows Number of times that the shared workspace overflowed the bounds of itsallocated memory

High-Water Mark Largest size reached by the shared workspace

2.2.6 Database: Locks and DeadlocksTo display information on locks and deadlocks, call the DBA Cockpit.

1. In the navigation frame, choose Performance Database .

The Database Snapshot screen appears.

2. Choose Locks and Deadlocks.

Field Description

Lock List

SizeDatabase locks are managed in a list. This parameter determines themaximum length of the list (database configuration parameter LOCKLIST).The lock list is allocated dynamically.

In Use Current size of the lock list

Lock Waits

Total Total number of times that applications or connections waited for locks

Time Waited Total amount of elapsed time in milliseconds that applications waited for alock to be granted

Average TimeWaited Average time in milliseconds waited for a lock

Page 30: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

30 April 2007

Escalations

Lock Escalations

Number of times that locks have been escalated from several row locks toa table lock

If the maximum allowed length of the lock list is reached, row locks areconverted to table locks to save space in the lock list. This process iscalled lock escalations

Exclusive LockEscalations

Number of times that locks have been escalated from several row locks toone exclusive table lock, or the number of times an exclusive lock on arow caused the table lock to become an exclusive lock

Exclusive locks are important to track since they can impact theconcurrency of your data because other applications cannot access dataheld by an exclusive lock.

Locks

Locks CurrentlyHeld Total number of locks currently held by the applications

DeadlocksDetected

Number of deadlocks that have occurred

Deadlock situations are recognized and resolved automatically by thedatabase. The database configuration parameter lock escalationsdetermines when a lock wait situation is resolved.

Lock Timeouts

Number of times that a request to lock an object timed out instead ofbeing granted

Parameter lock escalations determines when a lock wait situation isresolved.

2.2.7 Database: LoggingTo display information on log files, call the DBA Cockpit.

1. In the navigation frame, choose Performance Database .

The Database Snapshot appears.

2. Choose Logging.

Page 31: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 31

Field Description

Log Files

PrimaryNumber of primary log files

The database configuration parameter LOGPRIMARY determines thisvalue.

Secondary

Number of secondary log files

The database configuration parameter LOGSECOND determines thisvalue.

SizeNumber of pages in each log file

The database configuration parameter LOGFILSIZ determines thisvalue. Each page has 4 KB.

Total Log

Available to Database Amount of primary log space in bytes in the database that is not beingused by uncommitted transactions

Used by Database Total amount of primary log space in bytes currently used in thedatabase

Maximum SpaceUsed Maximum amount of primary log space used in bytes

Node with LeastAvailable Space

Node with the least amount of available log space in Bytes

Note

This field is only displayed for global snapshots over all partitions.

End of the note.

Application withOldest Transaction

Application ID (that corresponds to the agent_id value from theapplication snapshot) of the application that has the oldest transaction

Secondary Log

Logs CurrentlyAllocated

Total number of secondary log files that are currently being used forthe database

Maximum SpaceUsed Maximum amount of secondary log space used in bytes

Page 32: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

32 April 2007

Log Pages

Read Number of log pages read from disk

Written Number of log pages written to disk

Log BufferConsumption

LSN Gap Percentage of log space held by dirty pages in relation to log spacespecified by parameter SOFTMAX

Restart Range Percentage of log space held that will have to be redone for crashrecovery pages in relation to log space specified by parameter SOFTMAX

Log Buffer Quality

Log Buffer HitRatio Ratio of log data read from the buffer in relation to log data read from disk

Log BufferOverflows

Number of times that agents have to wait for log data to write to disk whilecopying log records into the log buffer

This value is incremented per agent per incident. For example, if twoagents attempt to copy log data while the buffer is full, then this value isincremented by two.

Log Buffer I/O

Average WriteTime/Page Average time per page in microseconds required to write log data to disk

Average WriteTime/IO Average time per I/O in microseconds required to write log data to disk

Average ReadTime/Page

Average time per page in microseconds required to read log data fromdisk

Average ReadTime/IO Average time per I/O in microseconds required to read log data from disk

2.2.8 Database: CallsTo display information on calls, call the DBA Cockpit.

1. In the navigation frame, choose Performance Database .

The Database Snapshot screen appears.

2. Choose Calls.

Page 33: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 33

Field Description

Rows

Read Number of data records that were read

Deleted Number of data records that were deleted

Inserted Number of data records that were inserted

Selected Number of data records that were selected

Updated Number of data records that were updated

Statements Executed

SELECT SQL Number of SELECT statements that were executed

UPDATE/INSERT/DELETE Number of UPDATE, INSERT, and DELETE statements thatwere executed

DDLNumber of Data Definition Language (DDL) statements that wereexecuted, for example, CREATE TABLE, CREATE VIEW,ALTER TABLE, and DROP INDEX

Elapsed Time (sec) Sum of the host execution times in seconds for all the statementsthat were executed

Elapsed Time (microsec) Remaining part of the above elapsed time in microseconds

Statements Attempted

COMMITs Number of COMMIT statements that have been attempted

RollbacksNumber of ROLLBACK statements that have been attempted

Automatic rollbacks caused by error situations or deadlocks arenot included.

Dynamic SQL Number of dynamic SQL statements attempted

Static SQL Number of static SQL statements attempted

Failed SQL Number of attempted SQL statements that failed

Hash Joins

Total Total number of hash joins executed

Total Hash Loops Total number of times that a single partition of a hash join waslarger that the available sort heap space

Page 34: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

34 April 2007

Field Description

Overflows Number of times that hash join data exceeded the available sortheap space

Small Overflows Number of times that hash join data exceeded the available sortheap space by less than 10 %

Post Threshold

Total number of hash joins that were throttled back by the sortmemory throttling algorithm

A throttled hash join is a hash join that was granted less memorythan requested by the sort memory manager. A hash join isthrottled back when the memory allocation from the shared sortheap is close to the limit set by database configuration parametersheapthres_shr.

This throttling significantly reduces the number of overflows overthesheapthres_shr limit in a system that is not properlyconfigured. The data reported in this element only reflects hashjoins using memory allocated from the shared sort heap.

2.2.9 Database: SortsTo display information on sorts, call the DBA Cockpit.

1. In the navigation frame, choose Performance Database .

The Database Snapshot screen appears.

2. Choose Sorts.

Field Description

Sort Heap

Total Size Amount of memory in KB available for each sort as defined in the databaseconfiguration parameter SORTHEAP (in pages)

Allocated Total number of allocated space of sort heap space for all sorts at the levelchosen and at the time the snapshot was taken

Sort Time

Total Total time in milliseconds required for all sort processes

Average Average sort time in milliseconds

Sorts

Page 35: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 35

Field Description

Total Sorts Total number of sorts that have been executed

SortOverflows

If the storage area allocated for sorting is not large enough, a sort overflowoccurs. The hard disk is then used temporarily.

Active Sorts Number of sorts in the database that currently have a sort heap allocated

PostThresholdSorts

Total number of sorts that were throttled back by the sort memory throttlingalgorithm. A throttled sort is a sort that was granted less memory thanrequested by the sort memory manager. A sort is throttled back when thememory allocation for sorts is close to the limit set by database configurationparameter sheapthres_shr. This throttling significantly reduces the numberof overflows over sheapthres_shr limit in a system that is not properlyconfigured.

The data reported in this element only reflects sorts using memory allocatedfrom the shared sort heap.

2.2.10 Database: XML StorageTo display information on XML storage accesses, call the DBA Cockpit

1. In the navigation frame, choose Performance Database .

The Database Snapshot screen appears.

2. Choose XML Storage.

Field Description

Pool Data

Logical ReadsIndicates the number of data pages for XML storage objects (XDAs)that have been requested from the buffer pool (logical reads) forregular and large tablespaces

PhysicalReads

Indicates the number of data pages for XML storage objects (XDAs)that have been read from the tablespace containers (physical reads)for regular and large tablespaces

WriteAccesses

Indicates the number of times a buffer pool data page for an XMLstorage object (XDA) was physically written to disk

TemporaryData

Logical Reads Indicates the number of pages for XML storage objects (XDA) thathave been requested from the buffer pool (logical reads) for

Page 36: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

36 April 2007

Field Description

temporary tablespaces.

PhysicalReads

Indicates the number of pages for XML storage objects that havebeen (XDA) read from the tablespace containers (physical reads) fortemporary tablespaces

AsynchronousI/O

PhysicalReads

Indicates the number of XML storage object (XDA) data pages thathave been read in from the tablespace containers (physical reads) byasynchronous engine dispatchable units (EDUs) for all types oftablespaces.

PhysicalWrites

Indicates the number of times a buffer pool data page for an XMLstorage object (XDA) was physically written to disk by either anasynchronous page cleaner, or a prefetcher

A prefetcher may have written dirty pages to disk to create space forthe pages being prefetched.

ReadRequests

Indicates the number of asynchronous read requests for XMLstorage object (XDA) data

2.3 Performance: SchemasIf more than one SAP component is installed within the same database, this overview screenprovides a selection of performance data that is related to these components. You can usethe information displayed to identify performance-critical components and the workloaddistribution among the components.

You can access the Performance: Schema Overview screen by calling the DBA Cockpit andchoosing Performance Schemas in the navigation frame of the DBA Cockpit.

Page 37: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 37

For each component (and partition if you are using a multi-partition database), the followinginformation is displayed:

Column Description

User Name of connect user to identify the component

Partition Number of the partition (only displayed in a multi-partition database)

SAP Component Indicates if the connect user is related to a SAP component or anotheruser that is just connected to the database

Data LogicalReads Number of read accesses to data in the buffer pool

Data LogicalReads (%)

Indicates the percentage of logical data read accesses for the component(and partition if you are using a multi-partition database)

Index LogicalReads Number of read accesses to index data in the buffer pool

Index LogicalReads (%)

Indicates the percentage of index logical data read accesses for thecomponent (and partition if you are using a multi-partition database)

Data PhysicalReads

Number of read accesses to data on disk (I/O)

The value includes the number of physical reads that were performedsynchronously (by the database manager agents) and asynchronously (bythe I/O servers).

Data PhysicalReads (%)

Indicates the percentage of physical data read accesses for thecomponent (and partition if you are using a multi-partition database)

Index PhysicalReads

Number of read accesses to index data on disk (I/O)

Since index data is only read by the database manager agents, this valueincludes the number of synchronously read index pages.

Index PhysicalReads (%)

Indicates the percentage of index physical read accesses for thecomponent (and partition if you are using a multi-partition database)

2.4 Performance: Buffer PoolsThe Buffer Pool Snapshot screen provides an overview of the following important keyindicators of the buffer pool activity of your database and enables you to compare these keyindicators:

Buffer Pool Name

Buffer Pool Size (KB)

Automatic Size (Yes or No)

Buffer Quality (%)

Page 38: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

38 April 2007

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

You can access the Buffer Pool Snapshot screen by calling the DBA Cockpit and choosingPerformance Buffer Pools in the navigation frame of the DBA Cockpit.

You can display more detailed information by selecting one or more buffer pools andchoosing Details. A detail Buffer Pool Snapshot screen appears with information on:

Buffer Pools [Page 38]

Asynchronous I/O [Page 41]

Direct I/O [Page 42]

XML Storage [Page 43]

Displaying the History of the Buffer Pool Quality

To retrieve information about the past changes to the size and quality of the selected bufferpool, choose History.

Caution

To be able to display a value history, the function must be switched on first by selectingCollect History Data when you configured your database for remote monitoring. For moreinformation, see Configuring Systems for Remote Monitoring Using Remote DatabaseConnections.

End of the caution.

The result for a parameter is displayed in a separate window. By default, the value historyinformation is displayed as a chart. By choosing List, you can switch to a tabular view. To limitthe history time frame, choose From or To.

2.4.1 Buffer PoolTo display information on buffer pool activity for your selected buffer pool(s), call the DBACockpit.

1. In the navigation frame, choose Performance Buffer Pools .

The Buffer Pool Snapshot screen appears.

Page 39: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 39

2. To display more detailed information, select one or more buffer pools and chooseDetails.

A detail Buffer Pool Snapshot screen appears.

3. Choose Buffer Pool.

If you have selected more than one buffer pool, you can use the page buttons on the screento navigate between them.

Field Description

Buffer Pool

Name Name of the buffer pool

Current Size

Size of the buffer pool in KB and in pages

Caution

If Automatic is selected, the buffer pool is automatically tuned (if DB2'sself tuning memory management (STMM) was activated).

End of the caution.

New Size Size of the buffer pool in pages after a database restart

Pages Left toRemove Number of pages that are still to be removed

Tablespace UseCount Number of tablespaces that belong to this buffer pool

Buffer Quality

Overall BufferQuality

Indicates percentage at which the data is read from the buffer pool, ratherthan directly from the hard disk

This is calculated using the following formula: (logical reads - physicalreads) / (logical reads) * 100

Data Hit Ratio Indicates percentage at which only data (without index data) is read fromthe buffer pool, rather than directly from the hard disk

Index Hit Ratio Indicates percentage at which index data is read from the buffer pool,rather than directly from the hard disk

Average Time

Physical Reads Average time in milliseconds required to read data from disk into thebuffer pool

Physical Writes Average time in milliseconds required to write data from the buffer pool todisk

Page 40: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

40 April 2007

Field Description

Data

Logical Reads Number of read accesses to data in the buffer pool

Physical Reads

Number of read accesses to data on disk (I/O)

The value includes the number of physical reads that were performedsynchronously (by the database manager agents) and asynchronously(by the I/O servers).

Physical Writes

Number of write accesses to data on disk (I/O)

The value includes the number of physical writes that were performedsynchronously (by the database manager agents) and asynchronously(by the I/O cleaners).

SynchronousReads Number of read accesses to data on disk (by agents)

SynchronousWrites Number of write accesses to data on disk (by agents)

Temporary LogicalReads

Number of logical read requests that required I/O to get data pages intothe temporary tablespace

TemporaryPhysical Reads

Number of physical read requests that required I/O to get data pages intothe temporary tablespace

Index

Logical Reads Number of read accesses to index data in the buffer pool

Physical ReadsNumber of read accesses to index data on disk (I/O)

Since index data is read only by the database manager agents, this valueincludes the number of synchronously read index pages.

Physical Writes

Number of write accesses to index data on disk (I/O)

The value includes the number of physical writes that were performedsynchronously (by the database manager agents) and asynchronously(by the I/O cleaners).

SynchronousReads Number of read accesses to index data on disk (by agents)

SynchronousWrites Number of write accesses to index data on disk (by agents)

Temporary LogicalReads

Number of logical read requests that required I/O to get index pages intothe temporary tablespace

Page 41: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 41

Field Description

TemporaryPhysical Reads

Number of physical read requests that required I/O to get index pagesinto the temporary tablespace

2.4.2 Buffer Pools: Asynchronous I/OTo display information on asynchronous I/O for your selected buffer pool(s), call the DBACockpit....

1. In the navigation frame, choose Performance Buffer Pools.

The Buffer Pool Snapshot screen appears.

2. To display more detailed information, select one or more buffer pools and chooseDetails.

A detail Buffer Pool Snapshot screen appears.

3. Choose Asynchronous I/O.

If you have selected more than one buffer pool, you can use the page buttons on the screento navigate between them.

Field Description

Average Time

Asynchronous PhysicalReads

Average time in milliseconds required by the I/Oservers to read a page from disk and write it to thebuffer pool

Asynchronous PhysicalWrites

Average time in milliseconds required by the I/Ocleaners to read a page from the buffer pool andwrite it to the hard disk

Page 42: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

42 April 2007

Data

Asynchronous PhysicalReads

Number of data pages that were readasynchronously from disk and written to the bufferpool by the I/O servers (prefetch)

Asynchronous PhysicalWrites

Number of data pages that were writtenasynchronously from buffer pool to disk (I/Ocleaners)

Asynchronous ReadRequests

Number of asynchronous data read requests

Index

Asynchronous PhysicalReads

Number of index pages that were readasynchronously from disk and written to the bufferpool by the I/O servers (prefetch)

Asynchronous PhysicalWrites

Number of index pages that were writtenasynchronously from buffer pool to disk (I/Ocleaners)

Asynchronous ReadRequests

Number of asynchronous index read requests

Data is read or written in pages. A page can be 4 KB, 8 KB, 16 KB, or 32 KB insize.

2.4.3 Buffer Pools: Direct I/OTo display information on direct I/O for your selected buffer pool(s), call the DBA Cockpit....

1. In the navigation frame, choose Performance Buffer Pools.

The Buffer Pool Snapshot screen appears.

2. To display more detailed information, select one or more buffer pools and chooseDetails.

A detail Buffer Pool Snapshot screen appears.

3. Choose Direct I/O.

If you have selected more than one buffer pool, you can use the page buttons on the screento navigate between them.

Field Description

Average Time

Direct Reads Average time in milliseconds required to readdirectly from disk

Direct Writes Average time in milliseconds required to writedirectly to disk

Page 43: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 43

I/O

Direct Reads Read accesses from disk that do not use thebuffer pool (LONG VARCHAR fields, backup)

Direct Writes Write accesses to disk that do not use thebuffer pool (LONG VARCHAR fields, restore,load)

Average I/O per Request

Direct Reads Average number of requests to read directlyfrom disk

Direct Writes Average number of requests to write directlyto disk

2.4.4 Buffer Pools: XML StorageTo display information on XML storage accesses for the selected buffer pool(s), call the DBACockpit

1. In the navigation frame, choose Performance Buffer Pools .

The Buffer Pool Snapshot screen appears.

2. To display more detailed information, select one or more buffer pools and chooseDetails.

A detail Buffer Pool Snapshot screen appears.

3. Choose XML Storage.

If you have selected more than one buffer pool, you can use the page buttons on thescreen to navigate between them.

Field Description

Pool Data

Logical ReadsIndicates the number of data pages for XML storage objects (XDAs)that have been requested from the buffer pool (logical reads) forregular and large tablespaces

PhysicalReads

Indicates the number of data pages for XML storage objects (XDAs)that have been read from the tablespace containers (physical reads)for regular and large tablespaces

WriteAccesses

Indicates the number of times a buffer pool data page for an XMLstorage object (XDA) was physically written to disk

TemporaryData

Page 44: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

44 April 2007

Field Description

Logical ReadsIndicates the number of pages for XML storage objects (XDA) thathave been requested from the buffer pool (logical reads) fortemporary tablespaces.

PhysicalReads

Indicates the number of pages for XML storage objects that havebeen (XDA) read from the tablespace containers (physical reads) fortemporary tablespaces

AsynchronousI/O

PhysicalReads

Indicates the number of XML storage object (XDA) data pages thathave been read in from the tablespace containers (physical reads) byasynchronous engine dispatchable units (EDUs) for all types oftablespaces.

PhysicalWrites

Indicates the number of times a buffer pool data page for an XMLstorage object (XDA) was physically written to disk by either anasynchronous page cleaner, or a prefetcher

A prefetcher may have written dirty pages to disk to create space forthe pages being prefetched.

ReadRequests

Indicates the number of asynchronous read requests for XMLstorage object (XDA) data

2.5 Performance: TablespacesThe Tablespace Snapshot screen provides an overview of the following tablespace activitiesof your database:

Tablespace Name

Partition (DPF systems only)

Buffer Quality (%)

Avg. Physical Read Times (ms)

Avg. Physical Write Time (ms)

Data Logical Reads

Data Physical Reads

Index Logical Reads

Index Physical Reads

Page 45: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 45

You can access the Tablespace Snapshot screen by calling the DBA Cockpit and choosingPerformance Tablespaces in the navigation frame of the DBA Cockpit.

The screen displays buffer pool activity and direct access information for each tablespacedefined for the SAP database.

You can display more detailed information by selecting one or more tablespaces andchoosing Details. A detail Tablespace Snapshot screen appears with information on:

Buffer Pool [Page 45]

Asynchronous I/O [Page 48]

Direct I/O [Page 42]

XML Storage [Page 49]

Buffer Pool and Asynchronous I/O provide information on buffer pool access.

Direct I/O and XML Storage provide information on direct accesses, in other words, I/Oactivity that does not use the buffer pool (for example, access to LONG VARCHAR columnsor backup).

2.5.1 Tablespaces: Buffer PoolTo display information on buffer pool activity for your selected tablespace(s), call the DBACockpit.

1. In the navigation frame, choose Performance Tablespaces .

The Tablespace Snapshot screen appears.

2. To display more detailed information, select one or more tablespaces and chooseDetails.

A detail Tablespace Snapshot screen appears.

3. Choose Buffer Pool.

If you have selected more than one tablespace, you can use the page buttons on the screento navigate between them.

Field Description

Tablespace

Name Name of the tablespace

Buffer Quality

Buffer Pool Name of the buffer pool that is associated with the selected tablespace

Overall BufferQuality

Indicates percentage at which the data is read from the buffer pool, ratherthan directly from the hard disk

Page 46: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

46 April 2007

Field Description

This is calculated using the following formula: (logical reads - physicalreads) / (logical reads) * 100

Data Hit Ratio Indicates percentage at which data (without index data) is read from thebuffer pool, rather than directly from the hard disk

Index Hit Ratio Indicates percentage at which index data is read from the buffer pool,rather than directly from the hard disk

No Victim Buffer Number of times an agent did not have a preselected victim bufferavailable

Average Time

Physical Reads Average time in milliseconds required to read data from disk into the bufferpool

Physical Writes Average time in milliseconds required to write data from the buffer pool todisk

Data

Logical Reads Number of read accesses to data in the buffer pool

Physical Reads

Number of read accesses to data on disk (I/O)

The value includes the number of physical reads that were performedsynchronously (by the database manager agents) and asynchronously(by the I/O servers).

Physical Writes

Number of write accesses to data on disk (I/O)

The value includes the number of physical writes that were performedsynchronously (by the database manager agents) and asynchronously(by the I/O cleaners).

SynchronousReads Number of read accesses to data on disk (by agents)

SynchronousWrites Number of write accesses to data on disk (by agents)

Temporary LogicalReads

Number of logical read requests that required I/O to get data pages intothe temporary tablespace

TemporaryPhysical Reads

Number of physical read requests that required I/O to get data pages intothe temporary tablespace

Index

Page 47: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 47

Logical Reads Number of read accesses to index data in the buffer pool

Physical ReadsNumber of read accesses to index data on disk (I/O)

Since index data is read only by the database manager agents, this valueincludes the number of synchronously read index pages.

Physical Writes

Number of write accesses to index data on disk (I/O)

The value includes the number of physical writes that were performedsynchronously (by the database manager agents) and asynchronously(by the I/O cleaners).

SynchronousReads Number of read accesses to index data on disk (by agents)

SynchronousWrites Number of write accesses to index data on disk (by agents)

Page 48: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

48 April 2007

Temporary LogicalReads

Number of logical read requests that required I/O to get index pagesinto the temporary tablespace

Temporary PhysicalReads

Number of physical read requests that required I/O to get index pagesinto the temporary tablespace

2.5.2 Tablespaces: Asynchronous I/OTo display information on asynchronous I/O for your selected tablespace(s), call the DBACockpit....

1. In the navigation frame, choose Performance Tablespaces.

The Tablespace Snapshot screen appears.

2. To display more detailed information, select one or more tablespaces and chooseDetails.

A detail Tablespace Snapshot screen appears.

3. Choose Asynchronous I/O.

If you have selected more than one tablespace, you can use the page buttons on the screento navigate between them.

Field Description

Average Time

Asynchronous Physical Reads Average time in milliseconds required by the I/Oservers to read a page from disk and write it intothe buffer pool

Asynchronous Physical Writes Average time in milliseconds required by the I/Ocleaners to read a page from the buffer pool andwrite it to the hard disk

Data

Asynchronous Physical Reads Number of data pages that were readasynchronously from disk and written to the bufferpool by the I/O servers (prefetch)

Asynchronous Physical Writes Number of data pages that were writtenasynchronously from buffer pool to disk (I/Ocleaners)

Asynchronous Read Requests Number of asynchronous data read requests

Index

Asynchronous Physical Reads Number of index pages that were readasynchronously from disk and written to the bufferpool by the I/O servers (prefetch)

Asynchronous Physical Writes Number of index pages that were writtenasynchronously buffer pool to disk (I/O cleaners)

Asynchronous Read Requests Number of asynchronous index read requests

Page 49: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 49

2.5.3 Tablespaces: Direct I/OTo display information on direct I/O for your selected tablespace(s), call the DBA Cockpit....

1. In the navigation frame, choose Performance Tablespaces.

The Tablespace Snapshot screen appears.

2. To display more detailed information, select one or more tablespaces and chooseDetails.

A detail Tablespace Snapshot screen appears.

3. Choose Direct I/O.

If you have selected more than one tablespace, you can use the page buttons on the screento navigate between them.

Field Description

Average Time

Direct Reads Average time in milliseconds required to readdirectly from disk

Direct Writes Average time in milliseconds required to writedirectly to disk

I/O

Direct Reads Read accesses from disk that do not use thebuffer pool (LONG VARCHAR fields, backup)

Direct Writes Write accesses to disk that do not use the bufferpool (LONG VARCHAR fields, restore, load)

Average I/O per Request

Direct Reads Average number of requests to read directlyfrom disk

Direct Writes Average number of requests to write directly todisk

2.5.4 Tablespaces: XML StorageTo display information on XML storage for the selected tablespace(s), call the DBA Cockpit

1. In the navigation frame, choose Performance Tablespaces .

A detail Tablespace Snapshot screen appears.

2. To display more detailed information, select one or more tablespaces and chooseDetails.

A detail Tablespace Snapshot screen appears.

3. Choose XML Storage.

Page 50: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

50 April 2007

If you have selected more than one tablespace, you can use the page buttons on thescreen to navigate between them.

Field Description

Pool Data

Logical ReadsIndicates the number of data pages for XML storage objects (XDAs)that have been requested from the buffer pool (logical reads) forregular and large tablespaces

PhysicalReads

Indicates the number of data pages for XML storage objects (XDAs)that have been read from the tablespace containers (physical reads)for regular and large tablespaces

WriteAccesses

Indicates the number of times a buffer pool data page for an XMLstorage object (XDA) was physically written to disk

TemporaryData

Logical ReadsIndicates the number of pages for XML storage objects (XDA) thathave been requested from the buffer pool (logical reads) fortemporary tablespaces.

PhysicalReads

Indicates the number of pages for XML storage objects that havebeen (XDA) read from the tablespace containers (physical reads) fortemporary tablespaces

AsynchronousI/O

PhysicalReads

Indicates the number of XML storage object (XDA) data pages thathave been read in from the tablespace containers (physical reads) byasynchronous engine dispatchable units (EDUs) for all types oftablespaces.

PhysicalWrites

Indicates the number of times a buffer pool data page for an XMLstorage object (XDA) was physically written to disk by either anasynchronous page cleaner, or a prefetcher

A prefetcher may have written dirty pages to disk to create space forthe pages being prefetched.

ReadRequests

Indicates the number of asynchronous read requests for XMLstorage object (XDA) data

2.6 Performance: TablesThe Table Snapshot screen displays information on all tables of the database, such as thenumber of rows read, the number of rows written, the number of accesses to rows that have

Page 51: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 51

been moved out of the page due to overflow (Overflow Access) and page reorganizations(Page Reorgs).

You can access the Table Snapshot screen by calling the DBA Cockpit and choosingPerformance Tables in the navigation frame of the DBA Cockpit.

The following information is displayed:

Column Description

TableSchema Name of the schema

TableName Name of the table

Partition Number of the partition (only displayed in a multi-partition database)

Table FileID File ID (FID) of the table

Table Type Type of table for which information is displayed, for example, user, system ortemp

RowsWritten Number of rows changed (inserted, deleted or updated) in the table

RowsRead Number of rows read from the table

OverflowAccess

Number of accesses (reads and writes) to overflowed rows of the table

Overflowed rows indicate that data fragmentation has occurred. If this number ishigh, you may be able to improve table performance by reorganizing the tableusing the REORG utility, which cleans up this fragmentation.

Note

Pay particular attention to this column. If the value in this column is very high,you should consider reorganizing the table.

End of the note.

PageReorgs

Number of page reorganizations executed for the table

Too many page reorganizations can result in less than optimal insertperformance. You can use the REORG TABLE utility to reorganize a table andeliminate fragmentation.

Page 52: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

52 April 2007

Note

If you double-click a line, detailed table analysis data is displayed as described in Space:Single Table Analysis [Page 93].

End of the note.

2.7 Performance: ApplicationThe Application Snapshot screen displays the following performance data for every DB2application, that is, for every SAP work process. The information displayed helps you todetermine which work processes are placing the highest load on the database:

Partition (only DPF systems)

User

Application Handle

Agent PID

Application Name

Application PID

Application Host Name

Application Status

Buffer Quality (%)

Data Logical Reads

Index Logical Reads

Temporary Index Logical Reads

Temporary Index Physical Reads

You can access the Application Snapshot screen by calling the DBA Cockpit and choosingPerformance Applications in the navigation frame of the DBA Cockpit.

You can display more detailed information by selecting one or more applications andchoosing Details. A detail Application Snapshot screen appears with information on:

Applications [Page 53]

Agents [Page 56]

Buffer Pool [Page 58]

Direct I/O [Page 59]

XML Storage [Page 60]

Page 53: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 53

Locks and Deadlocks [Page 61]

Calls [Page 63]

Sorts [Page 64]

Cache [Page 65]

Unit of Work [Page 66]

Statement [Page 67]

Statement Text [Page 68]

SQL Workspace [Page 70]

2.7.1 ApplicationsTo display information on applications, call the DBA Cockpit.

1. In the navigation frame, choose Performance Applications .

The Application Snapshot screen appears.

2. To display more detailed information, select one or more applications and chooseDetails.

A detail Application Snapshot screen appears.

3. Choose Application.

If you have selected more than one application, you can use the page buttons on the screento navigate between them.

Field Description

Application

PID Process ID of the database process belonging to a SAP work process

Handle

A system-wide unique ID for the application

On multi-partition database systems, this ID will be the same on every partitionwhere the application may make a secondary connection. Several agentprocesses (DB2 agent) can be assigned to an application handle.

ConnectStart Start time when the application connected to the database

Platform Operating system on which the client application is running

Host Host name of the application server where the application server is running

Name Name of application running at the client as known to the database manager orDB2 connect

Page 54: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

54 April 2007

Field Description

Status

Current status of the application. Possible values are:

Database Connect Pending

The application has initiated a database connection but the request hasnot yet completed.

Database Connect Completed

The application has initiated a database connection and the request hascompleted.

Unit of Work Executing

The database manager is executing requests on behalf of the unit ofwork.

Unit of Work Waiting

The database manager is waiting on behalf of the unit of work in theapplication. This status typically means that the system is executing inthe application's code.

Lock Wait

The unit of work is waiting for a lock. After the lock is granted, the statusis restored to its previous value.

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 precompilinga 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 commandhas not yet completed executing. The application may not haveexplicitly executed the database disconnect command. The databasemanager will disconnect from a database if the application ends withoutdisconnecting.

Page 55: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 55

Field Description

Transaction prepared

The unit of work is part of a global transaction that has entered theprepared phase of the two-phase commit protocol.

Transaction Heuristically

Committed The unit of work is part of a global transaction that has beenheuristically committed.

Transaction Heuristically Rolled Back

The unit of work is part of a global transaction that has beenheuristically rolled-back.

Transaction Ended

The unit of work is part of a global transaction that has ended but hastnot 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 requesthas not yet completed.

Restarting Database

The application is restarting a database in order to perform crashrecovery.

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 aparticular tablespace. The application has to wait for all other activetransactions on the tablespace to complete before it can disable thetablespace.

Page 56: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

56 April 2007

Field Description

Quiescing a Tablespace

The application is performing a QUIESCE TABLESPACE request.

Wait for Remote Partition The application is waiting for aresponse from a remote partition in a partitioned database instance.

Agent

PID Process ID of an SAP work process that made the connection to the database

ClientInformation

User IDClient user ID that is generated by the transaction manager and provided to theserver, if the sqleseti API is used.

For ABAP systems: Name of the SAP user

Workstation Identifies the client’s system or workstation (for example, CICS EITERMID), ifthe sqleseti API was used in this connection.

ApplicationIdentifies the server transaction program performing the transaction, if thesqleseti API was used in this connection.

For ABAP systems: Name of the SAP transaction

Accounting

The data passed to the target database for logging and diagnostic purposes, ifthe sqleseti API was used in this connection.

For ABAP systems: Name of the program executing the SQL statement

2.7.2 Applications: AgentsTo display information on agents for your selected application(s), call the DBA Cockpit.

1. In the navigation frame, choose Performance Applications .

The Application Snapshot screen appears.

2. To display more detailed information, select one or more applications and chooseDetails.

A detail Application Snapshot screen appears.

3. Choose Agents.

If you have selected more than one application, you can use the page buttons on the screento navigate between them.

Page 57: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 57

Field Description

Agents

Coordinator AgentPID

Process ID (UNIX systems) or thread ID (OS2 or Windows systems)of the coordinator agent for the application

Currently Associated Number of agents currently associated with the application

Associated with ThisAppl. Number of agents participating in this application (high-water mark)

Stolen fromApplication

Number of agents removed from this application and subsequentlyused by another application

This only happens if the agent was not busy.

Times Used byAgent(s)

User CPU Time Total user CPU time in seconds consumed by agent(s)

System CPU Time Total system CPU time in seconds consumed by agent(s)

Idle Time Total idle time in seconds

Waited for Prefetch Total time in milliseconds waited for prefetch

Memory PoolsAllocated to Agent

This is a table with only one entry per memory pool allocated to thisapplication. The table contains the following columns:

Partition

Partition number

PID

Process ID (UNIX) or thread ID (Windows) of the agent

Pool ID

Type of memory pool

Current Size in 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

Page 58: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

58 April 2007

2.7.3 Applications: Buffer PoolTo display information on buffer pool activity for your selected application(s), call the DBACockpit.

1. In the navigation frame, choose Performance Applications .

The Application Snapshot screen appears.

2. To display more detailed information, select one or more applications and chooseDetails.

A detail Application Snapshot screen appears.

3. Choose Buffer Pool.

If you have selected more than one application, you can use the page buttons on the screento navigate between them.

Field Description

Buffer Quality

Overall BufferQuality

Indicates percentage at which the data is read from the buffer pool, rather thandirectly from the hard disk

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 bufferpool, rather than directly from the hard disk

Index HitRatio

Indicates percentage at which index data is read from the buffer pool, ratherthan directly from the hard disk

Average Time

PhysicalReads

Average time in milliseconds required to read data from disk into the bufferpool

PhysicalWrites Average time in milliseconds required to write data from the buffer pool to disk

Data

LogicalReads Number of read accesses to data in the buffer pool

PhysicalReads

Number of read accesses to data on disk (I/O)

The value includes the number of physical reads that were performedsynchronously (by the database manager agents) and asynchronously (by theI/O Servers).

Page 59: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 59

PhysicalWrites

Number of write accesses to data on disk (I/O)

It includes the number of physical writes that were performed synchronously(by the database manager agents) and asynchronously (by the I/O Cleaners).

TemporaryLogical Reads

Number of logical read requests that required I/O to get data pages into thetemporary tablespace

TemporaryPhysicalReads

Number of physical read requests that required I/O to get data pages into thetemporary tablespace

Index

Logical Reads Number of read accesses to index data in the buffer pool

PhysicalReads

Number of read accesses to index data on disk (I/O)

Since index data is read only by the database manager agents this valuecontains the number of synchronously read index pages.

PhysicalWrites

Number of write accesses to index data on disk (I/O)

The value includes the number of physical writes that were performedsynchronously (by the database manager agents) and asynchronously (by theI/O Cleaners).

TemporaryLogical Reads

Number of logical read requests that required I/O to get index pages into thetemporary tablespace

TemporaryPhysicalReads

Number of physical read requests that required I/O to get index pages into thetemporary tablespace

2.7.4 Applications: Direct I/OTo display information on direct I/O for your selected application(s), call the DBA Cockpit....

1. In the navigation frame, choose Performance Applications.

The Application Snapshot screen appears.

2. To display more detailed information, select one or more applications and chooseDetails.

A detail Application Snapshot screen appears.

3. Choose Direct I/O.

Page 60: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

60 April 2007

If you have selected more than one application, you can use the page buttons on the screento navigate between them.

Field Description

Average Time

Direct Reads Average time in milliseconds required to readdirectly from disk

Direct Writes Average time in milliseconds required to writedirectly to disk

I/O

Direct Reads Read accesses from disk that do not use thebuffer pool (LONG VARCHAR fields, backup)

Direct Writes Write accesses to disk that do not use the bufferpool (LONG VARCHAR fields, restore, load)

Average I/O per Request

Direct Reads Average number of requests to read directlyfrom disk

Direct Writes Average number of requests to write directly todisk

2.7.5 Applications: XML StorageTo display information on XML storage for the selected application(s), call the DBA Cockpit.

1. In the navigation frame, choose Performance Applications .

The Application Snapshot screen appears.

2. To display more detailed information, select one or more applications and chooseDetails.

A detail Application Snapshot screen appears.

3. Choose XML Storage.

Field Description

Pool Data

Logical ReadsIndicates the number of data pages for XML storage objects (XDAs)that have been requested from the buffer pool (logical reads) forregular and large tablespaces

PhysicalReads

Indicates the number of data pages for XML storage objects (XDAs)that have been read from the tablespace containers (physical reads)for regular and large tablespaces

Page 61: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 61

WriteAccesses

Indicates the number of times a buffer pool data page for an XMLstorage object (XDA) was physically written to disk

TemporaryData

Logical ReadsIndicates the number of pages for XML storage objects (XDA) thathave been requested from the buffer pool (logical reads) fortemporary tablespaces.

PhysicalReads

Indicates the number of pages for XML storage objects that havebeen (XDA) read from the tablespace containers (physical reads) fortemporary tablespaces

AsynchronousI/O

PhysicalReads

Indicates the number of XML storage object (XDA) data pages thathave been read in from the tablespace containers (physical reads) byasynchronous engine dispatchable units (EDUs) for all types oftablespaces.

PhysicalWrites

Indicates the number of times a buffer pool data page for an XMLstorage object (XDA) was physically written to disk by either anasynchronous page cleaner, or a prefetcher

A prefetcher may have written dirty pages to disk to create space forthe pages being prefetched.

ReadRequests

Indicates the number of asynchronous read requests for XMLstorage object (XDA) data

2.7.6 Applications: Locks and DeadlocksTo display information on locks and deadlocks for your selected application(s), call the DBACockpit.

1. In the navigation frame, choose Performance Applications .

The Application Snapshot screen appears.

2. To display more detailed information, select one or more applications and chooseDetails.

A detail Application Snapshot screen appears.

3. Choose Locks and Deadlocks.

If you have selected more than one application, you can use the page buttons on the screento navigate between them.

Page 62: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

62 April 2007

Fields Description

Lock Waits

Total Total number of times that this application requested a lock, but had to waitbecause another application was already holding a lock on the data

Time Waited Total amount of elapsed time in milliseconds that this application has waitedfor a lock to be granted

Average TimeWaited Average time in milliseconds waited for a lock

Escalations

LockEscalations

Number of times that locks have been escalated from several row locks to atable lock

If the maximum allowed length of the lock list is reached, row locks areconverted to table locks to save space in the lock list. This process is called"lock escalation".

ExclusiveLockEscalations

Number of times that locks have been escalated from several row locks to oneexclusive table lock, or the number of times an exclusive lock on a row causedthe table lock to become an exclusive lock

Exclusive locks are important to track since they can impact the concurrencyof your data because other applications cannot access data held by anexclusive lock.

Locks

LocksCurrentlyHeld

Total number of locks currently held by the application

DeadlocksDetected

Number of deadlocks that have occurred. Deadlock situations are recognizedand resolved automatically by the database

The database configuration parameter DLCHKTIME determines when a lockwait situation is resolved.

LockTimeouts

Number of times that a request to lock an object timed out instead of beinggranted

The database configuration parameter LOCKTIMEOUT determines when a lockwait situation is resolved.

Lock TimeoutValue Value of the database configuration parameter LOCKTIMEOUT

Page 63: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 63

DeadlockEvent Monitor

StatementHistory ListSize

When a detailed deadlock event monitor with history is running, this elementreports the number of bytes being used from the database monitor heap(HON_HEAP_S) to keep track of the statement history list entries.

2.7.7 Applications: CallsTo display information on calls for your selected application(s), call the DBA Cockpit.

1. In the navigation frame, choose Performance Applications .

The Application Snapshot screen appears.

2. To display more detailed information, select one or more applications and chooseDetails.

A detail Application Snapshot screen appears.

3. Choose Calls.

If you have selected more than one application, you can use the page buttons on the screento navigate between them.

Field Description

Rows

Deleted Number of data records that were deleted

Inserted Number of data records that were inserted

Selected Number of data records that were selected

Updated Number of data records that were updated

Statements Executed

SELECT SQL Number of SELECT statements that were executed

UPDATE/INSERT/DELETE Number of UPDATE, INSERT, and DELETE statements thatwere executed

DDLNumber of Data Definition Language (DDL) statements that wereexecuted, for example, CREATE TABLE, CREATE VIEW,ALTER TABLE, and DROP INDEX.

Page 64: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

64 April 2007

StatementsAttempted

COMMITs Number of COMMIT statements that have been attempted

RollbacksNumber of ROLLBACK statements that have been attempted

Automatic rollbacks caused by error situations or deadlocks are notincluded.

Dynamic SQL Number of dynamic SQL statements attempted

Static SQL Number of static SQL statements attempted

Failed SQL Number of attempted SQL statements that failed

Hash Joins

Total Total number of hash joins executed

Total Hash Loops Total number of times that a single partition of a hash join was larger thanthe available sort heap space

Overflows Number of times that hash join data exceeded the available sort heapspace

Small Overflows Number of times that hash join data exceeded the available sort heapspace by less than 10 %

2.7.8 Applications: SortsTo display information on sorts for your selected application(s), call the DBA Cockpit....

1. In the navigation frame, choose Performance Applications.

The Application Snapshot screen appears.

2. To display more detailed information, select one or more applications and chooseDetails.

A detail Application Snapshot screen appears.

3. Choose Sorts.

Page 65: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 65

If you have selected more than one application, you can use the page buttons on the screento navigate between them.

Field Description

Sort Time

Total Total time in milliseconds required for all sort processes

Average Average sort time in milliseconds

Sorts

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 usedtemporarily.

2.7.9 Applications: CacheTo display information on cache for your selected application(s), call the DBA Cockpit.

1. In the navigation frame, choose Performance Applications .

The Application Snapshot screen appears.

2. To display more detailed information, select one or more applications and chooseDetails.

A detail Application Snapshot screen appears.

3. Choose Cache.

If you have selected more than one application, you can use the page buttons on the screento navigate between them.

Field Description

CatalogCache

Quality

Indicates percentage at which the data is read from the catalog cache, ratherthan directly from the hard disk

This is calculated using the following formula: (catalog cache lookups - catalogcache insert) / catalog cache lookups * 100

Lookups Number of times that the catalog cache was referenced to obtain tabledescriptor information

Inserts Number of times that the system tried to insert table descriptor information intothe catalog cache

Overflows Number of times that an insert into the catalog cache failed due to the catalogcache being full

Page 66: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

66 April 2007

Field Description

Heap Full Number of times that an insert into the catalog cache failed due to thedatabase heap being full

PackageCache

Quality

Indicates percentage at which the data is read from the package cache, ratherthan directly from the hard disk

This is calculated using the following formula: (package cache lookups -package cache inserts) / package cache lookups * 100

Lookups Number of times an application looked for a section in the package cache

Inserts Total number of times that a request section was not available for use and hadto be loaded into the package cache

2.7.10 Applications: Unit of WorkTo display information on units of work for your selected application(s), call the DBA Cockpit....

1. In the navigation frame, choose Performance Applications.

The Application Snapshot screen appears.

2. To display more detailed information, select one or more applications and chooseDetails.

A detail Application Snapshot screen appears.

3. Choose Unit of Work.

If you have selected more than one application, you can use the page buttons on the screento navigate between them.

Field Description

Unit of Work

Start Time Time that unit of work first required database resources

Stop Time Time that the most recent unit of work completed, whichoccurs when the database changes are committed orrolled back

Elapsed Time (s) Duration of unit of work in seconds

Elapsed Time (µs) Duration of unit of work in microseconds

Log Space Used Log space used in bytes in most recent unit of work

Completion Status Completion status of last transaction

Page 67: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 67

Previous Unit of Work

Stop Time Previous time that the most recent unit of workcompleted, which occurs when the database changes arecommitted or rolled back

2.7.11 Applications: StatementTo display information on performance data of the current SQL statements for your selectedapplication(s), call the DBA Cockpit....

1. In the navigation frame, choose Performance Applications.

The Application Snapshot screen appears.

2. To display more detailed information, select one or more applications and chooseDetails.

A detail Application Snapshot screen appears.

3. Choose Statement.

If you have selected more than one application, you can use the page buttons on the screento navigate between them.

Field Description

Statement

Start Time Date and time when unit of work starts, thestatement starts or a deadlock is detected

Stop Time Date and time when the statement stoppedexecuting

Elapsed Time(s) Duration of unit of work in seconds

Elapsed Time (µsec) Duration of unit of work in microseconds

Rows

Rows Read Number of rows read from the table

Rows Written Number of rows changed (inserted, deleted orupdated) in the table

Sort

Sort Overflow If the storage area allocated for sorting is notlarge enough, a sort overflow occurs. The harddisk is then temporarily used.

Total Sort Time Total time for all sort processes

Number of Statement Sorts Total number of sorts that have been executed

Page 68: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

68 April 2007

Data

Logical Reads Number of read accesses to data in the bufferpool

Physical Reads Number of read accesses to data on disk

Temporary Logical Reads Number of logical read requests that requiredI/O to get data pages into the temporarytablespace

Temporary Physical Reads Number of physical read requests that requiredI/O to get data pages into the temporarytablespace

Index

Logical Reads Number of read accesses to data in the bufferpool

Physical Reads Number of read accesses to data on disk

Temporary Logical Reads Number of logical read requests that requiredI/O to get index pages into the temporarytablespace

Temporary Physical Reads Number of physical read requests that requiredI/O to get index pages into the temporarytablespace

2.7.12 Applications: Statement TextTo display information on the current SQL statements for your selected application(s), call theDBA Cockpit.

1. In the navigation frame, choose Performance Applications .

The Application Snapshot screen appears.

2. To display more detailed information, select one or more applications and chooseDetails.

A detail Application Snapshot screen appears.

3. Choose Statement Text.

Page 69: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 69

If you have selected more than one application, you can use the page buttons on the screento navigate between them.

Field Description

Statement

Type

Type of statement processed

Possible types are:

Static SQL statement

Dynamic SQL statement

An operation other than an SQL statement, for example, a bind orprecompile operation

Operation

Operation currently being processed or most recently processed (if none iscurrently running)

Possible operations are:

SELECT

PREPARE

EXECUTE

EXECUTE IMMEDIATE

OPEN

FETCH

CLOSE

DESCRIBE

STATIC COMMIT

STATIC ROLLBACK

FREE LOCATOR

PREP_COMMIT

CALL

PREP_OPEN

PREP_EXEC

COMPILE

BlockingCursor

Indicates if the statement that is executed is using a blocking cursor (YES) ornot (NO)

If data is transferred in blocks and not row by row, the performance of the

Page 70: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

70 April 2007

corresponding query will be improved.

Statement

Text of dynamic SQL statement that was being processed when the snapshotwas taken

It can also be the text of the statement that was most recently processed, if nostatement 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 statementexecution. This function provides a detailed analysis of expensive SQL statements.

Note

To display the ABAP source program where the statement was defined, choose Source. Aneditor screen appears, which contains the related source.

However, this function is not available for systems monitored using a remote databaseconnection.

End of the note.

More Information

The EXPLAIN Function [Page 180]

2.7.13 Applications: SQL WorkspaceTo display information about the current SQL workspace for your selected application(s), callthe DBA Cockpit.

1. In the navigation frame, choose Performance Applications .

The Application Snapshot screen appears.

2. To display more detailed information, select one or more applications and chooseDetails.

A detail Application Snapshot screen appears.

3. Choose SQL Workspace.

Field Description

PrivateWorkspace

Lookups Number of times an application looked for an SQL section in theagent's private workspace

Inserts Inserts of SQL sections by an application into the privateworkspace

Page 71: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 71

Overflows Number of times that the private workspace overflowed the boundsof its allocated memory

High-WaterMark Largest size reached by the private workspace

SharedWorkspace

Lookups Number of times an application looked for an SQL section in theagent's shared workspace

Inserts Inserts of SQL sections by an application into the sharedworkspace

Overflows Number of times that the shared workspace overflowed the boundsof its allocated memory

High-WaterMark Largest size reached by the shared workspace

2.8 Performance: SQL CacheThe SQL Cache Snapshot displays information on SQL statements that are executed veryoften and stored in the SQL cache of your system. This information helps you to identifythose SQL statements that consume a large number of resources. You can also determinewhether fine-tuning of those statements is necessary to improve the performance of thedatabase.

You can access the SQL Snapshot screen by calling the DBA Cockpit and choosingPerformance SQL Cache in the navigation frame of the DBA Cockpit.

Page 72: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

72 April 2007

Depending on your system, the snapshot can give you a wide range of information, whichmight lead to a very large result set. After the snapshot has been taken and before the resultsare displayed, the Selection Criteria dialog box appears where you can limit the result setdisplayed according to the following selection criteria:

Field Description

Executions Number of times a statement has been executed

Total ExecutionTime Total execution time in milliseconds for a statement

Avg. ExecutionTime Average execution time in milliseconds for a statement

Rows Read Number of rows read for a statement

Rows Written Number of rows written by a statement

SQL Text (Case-Sensitive)

Search using either the wild card "*" or using a text string, for example,INSERT, to limit the number of statements displayed

When you have made your selections and chosen Continue, the result set is determined byfiltering the snapshot results according to the selection criteria and the following information isdisplayed:

Field Description

Total Cache Sum

Execution Time Total execution time in milliseconds for an SQL statement

Rows Read Total number of rows read

Rows Written Total number of rows written

Note

The data displayed under Total Cache Sum table refers to the entire SQL cache and not onlyto the currently selected result set.

End of the note.

Page 73: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 73

The result set is displayed in a table:

Column Description

SQL Text Text of a dynamic SQL statement that was in the SQL cache at the time of thesnapshot

Executions

Number of times a statement was executed

This value helps you to identify which statements are executed very often. Ahigh number of executions does not necessarily mean that a statement isusing an excessive amount of resources. You should also check the numberof rows read and rows written. If you find relatively high values here, chooseEXPLAIN to check whether indexes are not being efficiently used or whetherindexes are missing.

Note

To display the ABAP source program where the statement was defined,choose Source. An editor screen appears, which contains the related source.

However, this function is not available for system monitored with a remotedatabase connection.

End of the note.

TotalExecutionTime

Total execution time in milliseconds for a statement

You can use this value together with Executions to identify the statements thatwould benefit from further analysis.

TotalExecutionTime ( %)

Total Execution Time (milliseconds) divided by Total Cache Sum ExecutionTime (milliseconds)

AverageExecutionTime (ms)

Total Execution Time (in milliseconds) divided by Executions

Buffer Quality(%) Buffer quality for this statement in percent

Total UserCPU Time(ms)

Total user CPU time in milliseconds for a statement

This value together with the total execution time gives you information on thelongest running statements.

Total SystemCPU Time(ms)

Total system CPU time in milliseconds for a statement

This value together with total execution time and total user CPU time helpsyou to identify statements that use an excessive number of resources.

Page 74: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

74 April 2007

Rows Read

Number of rows read

You can use this value to identify statements that would benefit fromadditional indexes. Use EXPLAIN to analyze the statement. The given valuedoes not necessarily correspond to the number of rows of the result set of theSQL statement. The Rows Read value shows the number of rows that needsto be read in order to obtain the result set.

Rows Read(%) Rows Read divided by Total Cache Sum Rows Read

Rows WrittenNumber of rows that were changed (inserted, deleted or modified) in a table

High values might indicate that you should update statistics using RUNSTATS.

Rows Written(%) Rows Written divided by Total Cache Sum Rows Written

SQL Sorts

Number of sorts that were necessary to execute the statement

You can use this value to determine whether new indexes are needed. UseEXPLAIN to check whether and which indexes were used when the selectedstatement was executed.

SortOverflows Number of sort overflows

Total Sorts Total number of sorts

Note

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:

Refresh

Set Selection Criteria …

When you choose Set Selection Criteria, the Selection Criteria dialog box appearsagain and you can make further evaluations based on the already taken snapshotdata.

Source

To display the ABAP source program where the statement was defined, chooseSource. An editor screen appears, which contains the related source.

Page 75: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 75

Note

This function is not available for systems monitored with a remote databaseconnection.

End of the note.

EXPLAIN

To display detailed performance analysis, you can display the access plan for theSQL statement by choosing EXPLAIN. For more information, see The EXPLAINFunction [Page 180].

Index Advisor

To improve the performance of a query, you can retrieve recommendations aboutuseful indexes using the index advisor. In addition, you are able to design new virtualindexes that can be validated before they are actually created. For more information,see The Index Advisor [Page 185].

2.9 Performance: Lock Waits and DeadlocksThe system searches for lock waits indicating that at least one process is locked by the lockon another process. A request waits for a resource (a database table or a row of a table) thatis locked exclusively by another user.

You can access the Lock Waits and Deadlocks screen by calling the DBA Cockpit andchoosing Performance Lock Waits and Deadlocks in the navigation frame of the DBACockpit.

All recorded lock waits and deadlocks are displayed in a tree structure. For each lock wait ordeadlock situation that has been detected, the Lock Wait or Deadlock node is displayed aswell as the date and time when the lock wait or deadlock situation occurred. If you open thesubnodes of a deadlock or lock wait node, a hierarchical structure appears displaying thefollowing information:

<Lock wait or deadlock>

o Agent <Agent ID> (<Application Name>) waiting for Agent <Agent ID>

Client Process ID: <Process ID>

Host: <Host>

Lock Agent is waiting for:

Table: <Schema>.<Table>

Lock Object Type: <Lock Object Type>

Current Lock Mode: <Lock Mode>

Requested Lock Mode: <Lock Mode>

Page 76: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

76 April 2007

To display the last SQL statement that was executed by one of the agents, choose Last SQLStatement. The last SQL statement of the respective agent is displayed in the editor windowat the bottom of the screen.

Tree Node Description

<Agent ID> Agent handle of the application waiting for the lock to be released

<Application Name> Name of the application waiting for the lock to be released

<Client Process ID> Process ID of the application requesting the lock

<Host> Host name of the server requesting the lock

Requested Lock Mode

Lock modes that the waiting application would like to set

The following lock modes are possible:

IS: intention share lock

IX: intention exclusive lock

S: share lock

SIX: share with intention exclusive lock

X: exclusive lock

IN: intent none

Z: super exclusive lock

U: update lock

NS: next key share lock

NX: next key exclusive lock

W: weak exclusive lock

NW: next key weak exclusive lock

Current Lock Mode Lock mode held

Lock Object Type Type of object to be locked

Table Table on which/on whose record the lock is held

Caution

Lock wait situations are recognized by DB2. Database parameter LOCKTIMEOUT specifieshow many seconds the system must wait before automatically resolving a lock wait situation.

If LOCKTIMEOUT is set to -1, lock wait situations are not resolved.

Page 77: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 77

End of the caution.

Caution

DB2 recognizes deadlocks automatically using parameter DLCHKTIME that specifies the timeperiod during which the system analyzes lock situations or deadlocks.

End of the caution.

2.10 Performance: Inplace Table ReorganizationInplace table reorganization allows you to access tables while they are being reorganized.

To get an overview of inplace table reorganizations that are currently running or that havebeen interrupted, call the DBA Cockpit and choose Performance Inplace TableReorganization . The Performance: Active Inplace Table Reorganizations screen appears.

The information is displayed in the following table:

Column Description

Table Schema Table schema of the table that is currently being reorganized

Table Name Name of the table that is currently being reorganized

Partition Number of the partition (only displayed in a multi-partition database)

REORG Status

Status of the inplace table reorganization

Possible values are:

Running

Paused

Suspended

Completed

Progress % Progress of the reorganization

Start Date Start date of the inplace table reorganization

Start Time Start time of the inplace table reorganization

Page 78: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

78 April 2007

Access Mode

Access mode for other users while the table reorganization isrunning

The following access modes are possible:

READ

WRITE

NO ACCESS

Tablespace Name of the tablespace where the reorganization is performed

Note

If no active inplace table reorganization was found, the system displays the followingmessage: No Inplace Table Reorganizations are running. Only the REORGactivities since the database start are displayed. REORGs that were active before thedatabase start are not displayed.

End of the note.

Depending on your requirements, you can customize the view on the Performance: ActiveInplace Table Reorganizations screen using the following functions:

Pushbutton Function

Choose View

Active Only

Only inplace table reorganizations with the status Started or Pausedare displayed.

All

All inplace table reorganizations are displayed including those withstatus Completed or Suspended.

Choose DataSource

Since DB Start

Only inplace table reorganization that have been started after the lastrestart of the database manager are displayed.

Incl. History File

This option additionally reads the DB2 history file. Thus, the data ofinplace table reorganizations that were started before the last restartof the database manager is also retrieved.

Page 79: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 79

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.

2.11 Performance: History - Database Note

History data is only available if you have selected Collect History Data when you configuredyour database for remote monitoring. For more information, see Configuring Systems forRemote Monitoring Using Remote Database Connections.

End of the note.

The system provides a day-by-day trend analysis of database activity. You can check theworkload of the days and display the workload peak of a single day.

You can access the Performance History – Database screen by calling the DBA Cockpit andchoosing Performance History Database in the navigation frame of the DBA Cockpit.

An overview of all days monitored is displayed:

Column Description

Partition Monitored partition (only displayed if you are using a multi-partitiondatabase)

Date Day when monitoring was performed

Avg. Phys. ReadTime (ms)

Average physical read time

If you have chosen Total Day, this is the average of all measured averageread times. If you have chosen Peak, this is the worst measured read time.

Avg. Phys. WriteTime (ms)

Average physical write time

If you have chosen Total Day, this is the average of all measured averagewrite times. If you have chosen Peak, this is the worst measured write time.

Page 80: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

80 April 2007

Data LogicalReads Number of read accesses to data in the buffer pool

Data PhysicalReads

Number of read accesses to data on disk (I/O)

The value includes the number of physical reads that were performedsynchronously (by the database manager agents) and asynchronously (bythe I/O servers).

Data PhysicalWrites

Number of write accesses to data on disk (I/O)

The value includes the number of physical writes that were performedsynchronously (by the database manager agents) and asynchronously (bythe I/O cleaners).

Index LogicalReads Number of read accesses to index data in the buffer pool

Index PhysicalReads

Number of read accesses to index data on disk (I/O)

Since index data is read only by the database manager agents, this valueincludes the number of synchronously read index pages.

Index PhysicalWrites

Number of write accesses to index data on disk (I/O)

The value includes the number of physical writes that were performedsynchronously (by the database manager agents) and asynchronously (bythe I/O cleaners).

COMMITStatements Total number of COMMIT statements that have been attempted

ROLLBACKStatements

Total number of ROLLBACK statements that have been attempted

Automatic ROLLBACKs caused by error situations or deadlocks are notincluded.

Lock Waits Total number of times that applications or connections waited for locks

Lock Wait Time(ms) Total elapsed time in milliseconds waited for a lock

Deadlocks Total number of deadlocks that have occurred

Lock Escalations Number of times that locks have been escalated from several row locks to atable lock

Exclusive LockEscalations

Number of times that locks have been escalated from several row locks toone exclusive table lock, or the number of times an exclusive lock on a rowcaused the table lock to become an exclusive lock

If you choose Total Day in the field Workload in the Performance History - Database groupbox, the total workload of this day is displayed. The value displayed is calculated usingformula maximum value - minimum value. Database restarts are taken into consideration.

Page 81: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 81

If you choose Peak in the field Workload in the Performance History - Database group box,the maximum of all measured values is displayed.

You can display details for one specific day by double-clicking a field or selecting a row andchoosing Details. A detail screen appears with the following information:

Snapshot

The measured values of the selected day are displayed.

Interval

The delta values of the measurements, which are provided under Snapshot, aredisplayed.

If you select a particular day, snapshots of the database activity are displayed in a two-hourcycle.

Note

If the database is restarted during one day, the interval displayed after the restart does notequal the delta of two measurements because the counter was reset during the restart. In thiscase the absolute value of the last measurement is displayed.

End of the note.

2.12 Performance: History – Tables Note

History data is only available if you have selected Collect History Data when you configuredyour database for remote monitoring. For more information, see Configuring Systems forRemote Monitoring Using Remote Database Connections.

End of the note.

The system provides a day-by-day trend analysis of table activity. You can access thePerformance: History – Tables screen by calling the DBA Cockpit and choosing

Performance History Tables in the navigation frame.

An overview of the monitored days is displayed:

Column Description

Table Schema Name of the schema to which the table belongs

Table Name Name of the table

Rows Written Number of rows written

Rows Read Number of rows read

Page 82: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

82 April 2007

OverflowAccesses

Number of read accesses to tables that resulted in overflow pages, thatis, to records, which have been swapped from their original page.

Note

If there is a high number of overflow accesses in comparison to total readaccesses, the table is a candidate for reorganization.

End of the note.

Page Reorgs Number of internal page reorganizations during INSERT operations

Note

If you want to display history data that is cumulated by day, week or month, choose theappropriate option from the drop-down list in the Statistics field.

End of the note.

Page 83: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 83

3 SpaceThe following sections provide information on space:

Space: Tablespaces [Page 83]

Space: Containers [Page 91]

Space: Tables and Indexes [Page 91]

Space: Single Table Analysis [Page 93]

Space: History - Overview [Page 103]

Space: History - Database and Tablespaces [Page 104]

Space: History - Tables and Indexes [Page 106]

3.1 Space: TablespacesYou can access information on space for tablespaces by calling the DBA Cockpit andchoosing Space Tablespaces in the navigation frame of the DBA Cockpit. The Space:Tablespace Configuration screen appears.

During the installation of your SAP system you specified one of the following options for themaintenance 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 thecorresponding containers can be performed either manually or automatically.

Depending on your choice, the corresponding screen(s) appear(s) in the DBA Cockpit.

Automatic Storage

If you have chosen automatic storage management by DB2 during the SAP systeminstallation, the following tabs are available:

Tablespaces

Storage Paths

Page 84: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

84 April 2007

Tablespaces

The following table displays information about all tablespaces that are part of automaticstorage management:

Column Description

TablespaceName Name of the tablespace

Partition Number of the database partition (only displayed in a multi-partitiondatabase)

Contents Contents of tablespace, for example, any data or temporary data

TS State Status of tablespace, for example, normal or load pending

KB Total Total space in KB used by the tablespace

Page Size Size of a page in bytes

No. Containers Number of containers

KB Free Total amount of free space

High-Water Mark Indicates the maximum value of used pages reached

Percent Used Used space in relation to available space

Storage Paths

On the Storage Paths tab, all the storage paths are listed that are available for the database’sstorage management. For each storage path, the complete path name of the file system isdisplayed.

To add a new storage path for a tablespace, proceed as follows:

1. Choose Add.

2. Enter the complete path name of the storage path.

3. Choose Execute.

Note

In the lower half of the Space: Tablespace Configuration screen, an editor isdisplayed that shows the generated SQL statement(s) that will be executed. Thisarea is automatically filled and refreshed if any changes were applied correctly.

End of the note.

Page 85: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 85

DMS/SMS Tablespaces

Regardless whether you have chosen automatic storage management tablespaces or manualmaintenance of DMS/SMS tablespaces during the SAP system installation, the followinginformation is displayed:

Column Description

Tablespace Name Name of the tablespace

Partition Number of the partition (only displayed in a multi-partition database)

TS Type Type of tablespace, for example, DMS or SMS

Contents Contents of tablespace, for example, any data or temporary data

TS State Status of tablespace, for example, normal or load pending

KB Total Total space in KB used by the tablespace

Page Size Size of a page in bytes

No. Containers Number of containers

KB Free Total amount of free space

High-Water Mark Indicates the maximum value of used pages reached

Percent Used Used space in relation to the available space

AUTORESIZE Indicates if the tablespace is enabled for automatic resizing

Displaying Tablespace Details

Note

The following information applies to automatic storage management and DMS/SMStablespaces.

End of the note.

To display more information on the tables or indexes of a tablespace, select one or moretablespaces and choose Contents. The Space: Tablespace Content screen appearsdisplaying the following information:

Column Description

Tablespace Name Name of the tablespace

Schema Name of the schema

Name Name of the table or index

Page 86: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

86 April 2007

Column Description

Type Type of object, for example, index, primary index or table

Maintaining Tablespaces

In addition, you can maintain tablespaces, that is Change, Add or Delete them. For moreinformation, see Maintaining Tablespaces [Page 86].

3.1.1 Maintaining TablespacesUsing the tablespace list on the Space: Tablespace Configuration screen, you can maintaintablespace entries as follows:

Change tablespace settings and containers

Add new tablespaces

Delete tablespaces

Changing Tablespaces

1. On the Space: Tablespace Configuration screen, choose Change. The Space:Tablespace Maintenance – Change Tablespace screen appears. The followinginformation is displayed:

Field Description

TablespaceMaintenance

Name Name of the tablespace

Database PartitionGroup

Name of the partition group where the selected tablespacesis defined

A partition group defines a set of partitions.

Space

TotalTotal space in KB

This information is not displayed when creating tablespaces.

UsedFill level of the selected tablespace as a percentage

This information is not displayed when creating tablespaces.

FreeFree space in KB

This information is not displayed when creating tablespaces.

Page 87: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 87

Technical Settings

The following are fixed values that cannot be changed:

Field Description

ContentsDescribes, which kind of data will be stored in the tablespace, forexample, regular data, large objects, temporary user objects ortemporary system objects

Size of I/O Units

Page Size Page size in KB

Extent Size Extent size in KB

SpaceManagement by

Database (DMS) The space of the tablespace containers is managed by thedatabase.

System (SMS) The space of the tablespace containers is managed by the filesystem.

AutoStorage All the tablespace space is managed by the automatic storagemanagement.

You can enter values in the following fields:

Field Description

Size of I/O Units

Prefetch Size Number of pages to be prefetched

DiskPerformance

Overhead

Displays I/O controller overhead and disk seek and latency time inmilliseconds

This value is used to determine the cost of I/O during queryoptimization.

Transfer RateTime to read one page into memory in milliseconds

This value is used to determine the cost of I/O during queryoptimization.

Page 88: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

88 April 2007

Recovery

Dropped TablesDropped tables in the specified tablespace may be recovered usingthe RECOVER TABLE ON option of the ROLLFORWARDcommand.

AUTORESIZEenabled

Tablespace containers are automatically extended by using the filesystems where the containers are located.

Buffer Pool

NameBy default, the buffer pools are displayed that match the page sizeof the tablespace. If required, you can add a new buffer pool. Formore information, see Maintaining Buffer Pools [Page 120].

For more information on the technical settings, see the IBM documentation SQLReference.

Note

By default, DB2 9 for Linux, UNIX, and Windows uses large object tablespaces. Afteryou have upgraded your database from DB2 Version 8 to DB2 9, you might also wantto convert your regular tablespaces into large object tablespaces. To do so, select atablespace and choose Convert to LOB. The job is scheduled as a background job.

End of the note.

Storage Parameters

For tablespaces that are completely managed by automatic storage management orthat have at least AUTORESIZE enabled, the following fixed values are displayed:

Field Description

Settings

Initial Size Initial space allocated when a tablespace is created

Size

Current Size Displays the current size

Last Resize Date and time of last automatic resize

Last Resize Terminatedwith SQL Error

Note

This field only appears if the last automatic resize failed.Date and time when the automatic resize failed.

End of the note.

The SQL error is displayed in the lower half of the Space:Tablespace Maintenance screen.

Page 89: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 89

You can enter values in the following fields:

Settings

Increase Size Size in KB or in percent by which the tablespace isextended if it has become full.

Maximum Size

You can enter one of the following:

NONE

If there is no maximum size limit

Absolute value

If an upper threshold is specified that shall not beexceeded by automatic extensions

If you specify NONE, you allow DB2 to extend containersuntil they occupy all file systems where the containers arelocated.

Containers

If a tablespace is not managed by automatic storage management, you can add ordelete containers:

o To add containers, choose Add.

The system automatically suggests a default path where the container islocated. However, you can modify that path by manually editing the line.

Caution

Adding or changing containers might result in rebalancing, which has a heavyimpact on system performance.

End of the caution.

At least one container must be available for each partition. If you are using amulti-partition database, you need to add containers for all partitions of thecorresponding partition group. If you have to change container sizes, werecommend that you use Resize all containers to ensure a balanceddistribution 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 chooseDelete.

2. To apply changes, choose either Technical Settings or Containers.

3. To confirm your entries, choose Execute.

Page 90: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

90 April 2007

Adding Tablespaces

1. On the Space: Tablespace Configuration screen, choose Add.

The Space: Tablespace Maintenance – Add Tablespace screen appears.

2. Specify a name and a partition group.

Recommendation

We recommend that you use uppercase letters for the tablespace name. Usinglowercase letters or special characters makes accessing the selected tablespace withthe DB2 command line processor less comfortable.

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 partitionsof the corresponding database partition group.

Caution

This step does not apply to tablespaces managed by automatic storagemanagement.

End of the caution.

5. To confirm your entries, choose Add.

Deleting Tablespaces

1. On the Space: Tablespace Configuration screen, select a tablespace.

2. Choose Delete.

The Space: Tablespace Maintenance – DeleteTablespace screen appears.

3. To delete the selected tablespace, choose Delete.

Caution

You cannot delete tablespaces that are still used by the SAP system, that is, if theyare related to some data class. You must delete the data class before deleting thetablespace.

End of the caution.

SQL Statements

In the lower half of the Space: Tablespace Maintenance screen, an editor is displayed thatshows the generated SQL statement(s) that will be executed. This area is automatically filledand refreshed if any changes were applied correctly.

More Information

Configuration: Data Classes [Page 126]

Page 91: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 91

3.2 Space: ContainersYou can access information on containers by calling the DBA Cockpit and choosing SpaceContainers in the navigation frame of the DBA Cockpit. The Container Configuration

screen appears.

The following information is displayed:

Column Description

Tablespace Name Name of the tablespace

Partition Number of the partition (only displayed in a multi-partition database)

Stripe Set Number of the strip set the container belongs to

Container Name Name of the container in which the tablespace is located

Type Type of the container, for example, disk or file

KB Total Total size of the container in KB

Pages Total Total amount of pages

Accessible Indicates whether the container is accessible (YES) or not (NO)

FS ID File system ID

FS Free Size (KB) Free space in the file system in KB

Maintaining Containers

You can maintain tablespace containers by selecting a line in the table on the ContainerConfiguration screen and choosing Change, Add or Delete. The Tablespace Maintenancescreen appears.

For more information, see Maintaining Tablespaces [Page 86].

3.3 Space: Tables and IndexesYou can access information on space for tables and indexes by calling the DBA Cockpit andchoosing Space Tables and Indexes in the navigation frame of the DBA Cockpit.

A Selection Criteria dialog box appears in which you can limit the result set displayedaccording to the following criteria:

Field Description

Filters

Tablespace Name Indicates the location of the table

Page 92: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

92 April 2007

Field Description

Table Name Name of the table

Table Size Size of the table

Flagged Tables If this flag is not set, only tables are displayed that have arecommendation for table or index reorganization.

Large RIDs If this flag is set, only tables are displayed that are located in large RIDtablespaces but that have not been enabled for large RIDs.

Not Available If this flag is set, only tables are displayed that have the status notavailable.

REORG Pending If this flag is set, only tables are displayed that have the status REORGPENDING.

Index Type-1 If this flag is set, only tables are displayed that still have Type–1indexes.

Load Status If this flag is set, only tables are displayed that have the status LOADPENDING.

Row Compression If this flag is set, only tables are displayed that have been recommendedfor row compression.

Display Options

Sort by Sorts the tables by Size or Name

Maximum Numberof Rows Number of rows to be displayed

Example

To display the first hundred tables with the largest size, choose Size in the Display Optionsgroup box and enter 100 in the Maximum Number of Rows field.

End of the example.

When you have made your selections and chosen OK, the Space: Table and Indexes screenappears with the following information:

Column Description

Schema Schema of the table, usually the user who created the table

Table Name Name of the table

TablespaceName Tablespace to which the table currently belongs

Page 93: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 93

Column Description

F1 Overflows rows as a percentage

F2 Table size divided by allocated space as a percentage

F3 Full pages divided by allocated pages as a percentage

Table Flagged Indicates that table reorganization is recommended

Index Flagged Indicates that table reorganization is recommended because of REORGCHKrecommendations for at least one of the table indexes

Size (KB) Table size

REORG CheckDate

Date of the last REORG check, for example, the date when RUNSTATS ranusing program dmdb6srp

REORG CheckTime

Time of the last REORG check, for example, the time when RUNSTATS ranusing program dmdb6srp

If you want to change the selection, choose Set Selection Criteria. The Selection Criteriadialog box appears and you can make your new selection.

To display detailed information on tables and indexes, double-click a table or choose Details.A detail screen is displayed with information on tables, indexes and table structures. You candirectly access this screen by choosing Space Single Table Analysis in the navigationframe of the DBA Cockpit. For more information, see Space: Single Table Analysis [Page 93].

Note

The data displayed is based on a set of database tables that have been filled by the jobREORGCHK for all Tables. This job must have been scheduled using the DBA PlanningCalendar. If the job is not running, no current data is available.

End of the note.

3.4 Space: Single Table AnalysisYou can access detailed information on a single table and maintain table statistics by callingthe DBA Cockpit and choosing Space Single Table Analysis in the navigation frame ofthe DBA Cockpit. The Space: Tables and Indexes Details screen appears.

The following information is displayed:

Table and Index Details

Field Description

Name Name of the table

Schema Schema of table, that is usually the user who created the table

Page 94: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

94 April 2007

Table

Field Description

REORG CheckStatistics

Last REORG Check Date and time of the last REORG check, for example, the date and timewhen RUNSTATS ran using program dmdb6srp

Total Table Size Size of table in KB

Total Index Size Size of all indexes of the table in KB

Free SpaceReserved

Percentage of free space reserved in the tables’ allocated pages

This free space is taken into account by LOAD and REORG.

F1: Overflow Rows Overflow rows as a percentage

F2: Table Size /Allocated Space Table size divided by allocated space as a percentage

F3: Full Pages /Allocated Pages Full pages divided by allocated pages as a percentage

Last REORG ofTable Date and time when the last REORG ran

Runtime of LastREORG Runtime of the last REORG

System Catalog

Last RUNSTATS Date and time when the last RUNSTATS ran

Tablespace Name of the tablespace to which the table belongs

Cardinality Number of data records in the table

Counted RowsNumber of rows that have been counted by a SELECT(*) statement

This information is only displayed if you choose Count.

Deviation

Deviation of the number of rows provided by RUNSTATS in the systemcatalog from the number of rows provided by a SELECT COUNT(*)statement

This information is only displayed if you choose Count.

Page 95: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 95

Overflow RecordsNumber of records that have overflowed

Records overflow when a data record is updated and the new datarecord is larger than the old one or when a column is added to a table.

No. of Pages withData Number of pages containing data

Total Number ofPages Total number of pages in the table

Pooled, Cluster orImport/Export Table

Caution

This information only applies to SAP systems (ABAP only).

End of the caution.

Indicates whether this table is defined as a pooled table, a cluster oran import/export table in the ABAP Dictionary.

VOLATILE

Indicates whether the table is flagged as VOLATILE in the systemcatalog or not

If the table is flagged as VOLATILE, statistics are not gathered byDB2’s automatic RUNSTATS. In addition, statistics data, if available, isnot used by the optimizer.

Note

Newly created tables and tables that were dropped or recreated duringan upgrade or a table conversion are always marked as VOLATILE aslong as there are not yet valid statistics available.

End of the note.

Row Compression Indicates whether the table is compressed or not

Distributed Statistics Indicates whether the table has a distributed statistics or not

Indexes

Field Description

Index

Name Name of the index

Schema Schema of the index, that is usually the user who created the index

Tablespace Name of the tablespace to which the index belongs

Page 96: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

96 April 2007

REORG CheckStatistics

Last REORG Check Date and time of the last REORG check, for example, the date andtime when RUNSTATS ran using program dmdb6srp

Indexes RequireRebuild Indicates whether an index requires rebuild or not

Cardinality Number of entries in the index

Free Space ReservedPercentage of free space reserved in the index pages

This free space is taken into account by LOAD and REORG.

F4: Cluster Ratio Cluster ratio as a percentage

F5: Index Size /Allocated Space Index size divided by allocated space as a percentage

F6: No. Entries / No.Poss. Entries

Number of entries divided by the number of possible entries as apercentage

F7: Ratio of DeletedIndex Entries Number of deleted entries in relation to total entries in index

F8: Ratio of DeletedIndex Leafs

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

System Catalog

Last RUNSTATS Date and time when the last RUNSTATS ran

Number of Leaves Number of index leaves

Number of Levels Number of index levels

Sequential Pages Number of index leaves physically located on the hard disk sorted byindex without large intervals between them

DensityRelative density of the sequential pages as a proportion of the totalnumber of index pages

100 % is the optimum value.

Cluster Ratio Degree of fragmentation of the index (100 % means nofragmentation and is the optimum value)

Cluster FactorNot currently calculated

The value is set to –1.

Page 97: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 97

First Key Cardinality Number of different values in the first column of the index

First 2 Key Cardinality Number of different values in the first two columns of the index

First 3 Key Cardinality Number of different values in the first three columns of the index

First 4 Key Cardinality Number of different values in the first four columns of the index

Full Key Cardinality Number of different values in all columns of the index

Note

If the value displayed in field Full Key Cardinality is the same as the one displayed in fieldCardinality, the index is a unique index. Every record in the table can be accessed using thatindex.

End of the note.

If several indexes are defined on a table, you can use the page buttons on Index to navigatebetween the different indexes.

Table Structure

Column Description

DB Column No. Number of the column in the database

DB Column Name Name of the column in the database

DB Type Data type of the column in the database

DB Length Length of the column in the database

The following information is only displayed forthe local system and if the table is defined as atransparent table in the ABAP Dictionary:

Column Description

SAP Column Name Name of the column defined in the ABAPDictionary

SAP Key Column is part of primary key defined in theABAP Dictionary

Page 98: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

98 April 2007

SAP Type Data type of the column defined in the ABAPDictionary

SAP Length Length of the column defined in the ABAPDictionary

Index Structures

Column Description

Position Position of the column within the key

Order

Sort order of the column:

A = ascending order

D = descending order

DB Column Number Number of the column in the database

DB Column Name Name of the column in the database

DB Type Data type of the column in the database

DB Length Length of the column in the database

The following information is only displayed forthe local system and if the table is defined as atransparent table in the ABAP Dictionary:

Column Description

SAP Column Name Name of the column defined in the ABAPDictionary

SAP Type Data type of the column defined in the ABAPDictionary

SAP Length Length of the column defined in the ABAPDictionary

If several indexes are defined on a table, you can use the page buttons on Index Structuresto navigate between them.

RUNSTATS Control

For RUNSTATS Control, you have to take the following into consideration:

Scheduling of RUNSTATS for a table

Which types of statistics are gathered

Page 99: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 99

Both scheduling and profiling depend on the configuration of automatic RUNSTATS. Ifautomatic RUNSTATS is enabled, the following scheduling options are available:

Field Description

Statistics Attributes

Not VOLATILE(AutoRUNSTATS included)

The VOLATILE attribute is not set for this table and thereforethe table will get statistics controlled by automatic RUNSTATS.

VOLATILE (AutoRUNSTATSexcluded)

The VOLATILE attribute is set for this table. automaticRUNSTATS does not take this table into account.

If automatic RUNSTATS is not enabled, the following options are available instead:

Field Description

Scheduling

Automatically Statistics and REORGCHK calculations are gathered by CCMS jobsthat are scheduled in the DBA Planning Calendar [Page 142].

On User Request CCMS jobs do not process these tables automatically, that isRUNSTATS and REORGCHK must be explicitly scheduled by the user.

Statistics is out-of-date

Due to the monitored number of update activities, the statistics mightbe out-of-date. As a consequence, a RUNSTATS is recommended.

DeviationDeviation of the current size (cardinality) in the table statistics fromthe size that was estimated based on the monitored number of updateactivities

Collect Data forApplication Monitor The table is monitored by the application monitor ST07.

Statistics Attributes

StatisticsStatistics are gathered for this table. As soon as there are validstatistics the table will be marked as NOT VOLATILE in the systemcatalog.

No Statistics andVolatile The table is marked as VOLATILE and has no statistics.

Page 100: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

100 April 2007

If you want to execute a RUNSTATS, you can use the following options to determine how thestatistics will be gathered:

Table Analysis Method

Basic Basic statistics for the table

Distributed Statistics Distributed statistics for the table

None

No statistics for the table

Caution

Selecting this option does only freeze already existing old tablestatistics but not delete or invalidate them.

End of the caution.

Sampling of [ ] %ofentries

Percentage of entries to be used for sampling

Caution

This field is only active if you are using DB2 UDB for UNIX andWindows Version 8, FixPak 2 or higher.

End of the caution.

System (Page, Sampling)

The data to be sampled is selected page by page.

Caution

This field is only active if you are using DB2 UDB for UNIX andWindows Version 8, FixPak 2 or higher.

End of the caution.

BERNOULLI (RowSampling)

The data to be sampled is selected row by row.

Caution

This field is only active if you are using DB2 UDB for UNIX andWindows Version 8, FixPak 2 or higher.

End of the caution.

Analyze Key Columnsonly Table statistics are gathered only for key columns of the table

Index Analysis Method

Basic Basic statistics for the index

Detailed Statistics Detailed statistics for the index

Detailed Sampled Detailed statistics for the index using sampling

Page 101: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 101

Table Analysis Method

Statistics

None

No statistics for the index

Caution

Selecting this option does only freeze already existing old indexstatistics but not delete or invalidate them.

End of the caution.

RUNSTATS Profile

If a RUNSTATS was executed using the PROFILE option, this profile is stored in the systemcatalog and is displayed on the screen. The profile is the same as the RUNSTATS command.

Checking and Updating the Statistics

You can check the quality of the statistical information in the system catalog by choosingCount. This counts the current number of rows in the table. Afterwards two additional fields,Counted Rows and Deviation in %, are displayed on the Table tab page. If the deviation ismore than 15%, you should perform a RUNSTATS on this table. You can do this by choosingeither of the following options:

RUNSTATS in Dialog

RUNSTATS in the Background

In this case, you switch to the DBA Planning Calendar with a planning proposal for asingle table RUNSTATS and with all parameters preset according to the RUNSTATScontrol parameters. For more information, see The DBA Planning Calendar [Page142].

Recommendation

For larger tables, we strongly recommend that you run RUNSTATS in the background.

Caution

Be aware that running RUNSTATS might have an impact on the system performance.

End of the caution.

Page 102: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

102 April 2007

In case of RUNSTATS in dialog and RUNSTATS in the background, the RUNSTATS can beperformed based on the changeable parameters that you specified on the RUNTSTATSControl tab page. If you have modified any of the control parameters, the RUNSTATSExecution dialog box appears. You can choose one of the following options:

Use modified parameters

Caution

Be aware when choosing this option, you have to take into account that the statisticswill be overwritten by an automatically triggered RUNSTATS job if you had previouslyselected Automatically by CCMS on the RUNSTATS Control tab page.

End of the caution.

Use active parameters

Use modified parameters and save (If automatic RUNSTATS is enabled, this option isnot available.)

Applying Permanent Changes to RUNSTATS Settings

You can apply changes to settings of the following RUNSTATS types:

CCMS RUNSTATS

If you want to save modified RUNSTATS settings, choose Save. All subsequentCCMS RUNSTATS jobs using transaction DB13 will gather statistics accordingly.

If you want to reset modified RUNSTATS control parameters to the standard ones, youchoose Reset RUNSTATS Control.

Caution

The SAP system is shipped with several tables whose settings differ from thestandard settings. These tables are tables for which No Statistics and Volatile waschosen.

If you choose Reset RUNSTATS Control, these special settings will be lost. This losscan result in considerable performance problems.

End of the caution.

Automatic RUNSTATS

You cannot explicitly save RUNSTATS parameters in the DBA Cockpit. If you want tohave special RUNSTATS settings, you can only set them by setting RUNSTATS profilesusing DB2 means.

Page 103: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 103

3.5 Space: History - Overview Note

This function is only available if you have selected Collect History Data when you configuredyour database for remote monitoring. For more information, see Configuring Systems forRemote Monitoring Using Remote Database Connections.

End of the note.

You can access the History - Overview screen by calling the DBA Cockpit and choosingSpace History Overview in the navigation frame of the DBA Cockpit. The History –

Overview screen appears.

The following information is displayed:

Databases and Tablespaces

Field Description

Tablespaces

Last Analysis Date and time of the last analysis

Total Number Total number of tablespaces in the database

Total Size Total size of all tablespaces in KB

Free Space Free space in all tablespaces in KB

Used Space Used space of all tablespaces as a percentage

Minimum Free Space in aTablespace

Free space of the tablespace with the lowest amount of freespace in KB

Maximum Used Space in aTablespace

Used space of the tablespace with the highest fill level as apercentage

Database Partitions

Total NumberNumber of database partitions

The value displayed is only higher than 1 if you are using amulti-partition database.

Tables and Indexes

Field Description

Last Analysis Date and time of the last analysis

Total Number of Tables Total number of tables defined in the database

Page 104: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

104 April 2007

Field Description

Total Size of Tables Total amount of used space of all tables defined in the database

Total Number ofIndexes Total number of indexes defined in the database

Total Size of Indexes Total amount of used space of all indexes defined in the database

Oldest REORG Check Date and time of the oldest execution of the job REORGCHKfor alltables

Latest REORG Check Date and time of the latest execution of the job REORGCHK for alltables

The job to collect the database and tablespace history and the job to collect tables andindexes history are triggered by the standard performance collector jobSAP_COLLECTOR_FOR_PERFMONITOR. You can display the schedule of these two jobsin the DBA Planning Calendar by choosing Jobs DBA Planning Calendar in the DBACockpit. In the Category group box you can choose DB Collectors. The default setting is DBAActions.

Caution

Calculating table values with outdated statistics can result in inaccurate values. To calculateupdate statistics including the calculation of table sizes, use the DBA Planning Calendar[Page 142].

End of the caution.

3.6 Space: History - Database and Tablespaces Note

This function is only available if you have selected Collect History Data when you configuredyour database for remote monitoring. For more information, see Configuring Systems forRemote Monitoring Using Remote Database Connections.

End of the note.

You can access history data on the database and tablespaces by calling the DBA Cockpitand choosing Space History Database and Tablespaces in the navigation frame of theDBA Cockpit. The History – Database and Tablespaces screen appears. By default, thedatabase history is displayed.

Page 105: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 105

To switch to the tablespace history, select Tablespaces in the Object Selection field. Thefollowing information is displayed:

Space

Column Description

Tablespace Name Name of the tablespace (only displayed if you have selectedTablespaces in the Object Selection field)

Partition Monitored partition - displayed only if you are using a multi-partitiondatabase

KB Total Amount of space in KB allocated

Changes (KB Total)Average change of KB Total

The average value depends on your selection in the Statistics field.

KB Used Used space in KB of the allocated space

Changes (KB Used) Average change of used space

% Used Percentage used of allocated space

KB Free Free space in KB of allocated space

Containers Number of containers belonging to the tablespace

Changes Containers Average change of number of containers

Tables and Indexes

Column Description

Tablespace Name Name of the tablespace (only displayed if you have selectedTablespaces in the Object Selection field)

Tables Number of tables

Changes Tables Average change of number of tables

Table (KB) Space used by tables

Changes Table (KB) Average change of space used by tables

Indexes Number of indexes

Changes Indexes Average change of number of indexes

Index (KB) Space used by indexes

Page 106: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

106 April 2007

Column Description

Changes Index (KB) Average change of space used by indexes

If you want to display delta values between available measurements, select a row andchoose Details. Alternatively, you can double-click the selected row. The table will bedisplayed again with the following difference: Columns with the heading Changes... arerenamed with Delta...

3.7 Space: History - Tables and Indexes Note

This function is only available if you have selected Collect History Data during theconfiguration of your database for remote monitoring. For more information, see ConfiguringSystems for Remote Monitoring Using Remote Database Connections.

End of the note.

You can access history data on tables and indexes by calling the DBA Cockpit and choosingSpace History Tables and Indexes in the navigation frame of the DBA Cockpit.

A Set Selection Criteria dialog box appears in which you can limit the result set displayedaccording to the following criteria:

Field Description

Filters

Tablespace Name Name of the tablespace

Table or Index Name Name of the table or index

Table or Index Size Size of the table or index

Display Options

Sort by Sorts the tables or indexes by Growth, Size orName

Maximum Number of Rows Number of rows to be displayed

Page 107: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 107

Example

To display the first hundred tables or indexes with the highest growth, choose Growth in theDisplay Options group box and enter 100 in the Maximum number of rows field.

End of the example.

When you have made your selections and chosen OK, the History – Table and Index screenappears with the following information:

Column Description

Object Name Name of the table or index

Object Type Table or index

Tablespace Name Tablespace to which the objects belong

Size (KB) Size of the table or index

Changes Size (KB) Average change of space used by table or indexes

REORG CheckDate

Date of the last REORG check, for example, the date when RUNSTATSran using program dmdb6srp

REORG CheckTime

Time of the last REORG check, for example, the time when RUNSTATSran using program dmdb6srp

If you want to display delta values between available measurements, select a row andchoose Details. Alternatively, you can double-click the selected row. The table will bedisplayed again with the following difference: Columns with the heading Changes... arerenamed with Delta...

If you want to change the selection criteria, choose Set Selection Criteria.

Caution

The values displayed on the History – Tables and Indexes screen are sometimes not correct.The reason is that these values are calculated based on DB2 system catalog information. Toachieve good results, we recommend that you run RUNSTATS weekly.

If database tables contain VARCHAR or LOB columns, the specification of the size may betoo small because the consumed space for VARCHAR and LOB columns can only beestimated.

History data is only retrieved for tables and indexes of schema SAPR3.

Caution

The date and time of the last REORG check and the last RUNSTATS should be the same. If thisis not the case, you should update the statistics using the DBA Planning Calendar.

Page 108: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

108 April 2007

4 Backup and RecoveryThe following sections provide information on backup and recovery:

Backup and Recovery: Backup Overview [Page 108]

Backup and Recovery: Logging Parameters [Page 108]

4.1 Backup and Recovery: Backup OverviewYou can access the Overview screen by calling the DBA Cockpit and choosing Backup andRecovery Backup Overview in the navigation frame of the DBA Cockpit.

The following information is displayed:

Tab Description

DatabaseBackups

Contains information on database backups

The screen is divided into two frames. The left frame provides information ondatabase backups done in the past. If you want to display detailed informationon a database backup, double-click the field. The details are displayed in theright frame.

Log Files Contains information on log files that have been moved from the log directory tothe log archive or to a storage product, such as Tivoli Storage Manager (TSM)

If you want to display older information on database backups, change the value in the DisplayDays field in the Backup and Recovery: Overview group box.

4.2 Backup and Recovery: Logging ParametersYou can access information on logging parameters by calling the DBA Cockpit and choosing

Backup and Recovery Logging Parameters in the navigation frame of the DBA Cockpit.The Logging Parameters screen appears.

This screen provides information on the logging parameters configured, such as size of logfiles, log retain status or user exit status. Furthermore, you can check the available space ofthe file systems where your database logs and the archived database logs are stored.

However, these directories are only displayed in the lower half of the screen if the monitoredsystems 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 ifserious database problems occur.

Page 109: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 109

5 ConfigurationThe following sections provide information on configuration:

Configuration: Database Manager [Page 109]

Configuration: Database [Page 110]

Configuration: Registry Variables [Page 113]

Configuration: Parameter Changes [Page 114]

Configuration: Database Partition Groups [Page 115]

Configuration: Buffer Pools [Page 120]

Configuration: Special Tables Regarding RUNSTATS [Page 123]

Configuration: File Systems [Page 125]

Configuration: Data Classes [Page 126]

Configuration: Monitoring Settings [Page 128]

Configuration: Automatic Maintenance Settings [Page 130]

5.1 Configuration: Database ManagerYou can access information about the configuration of the database manager by calling theDBA Cockpit and choosing Configuration Database Manager in the navigation frame ofthe DBA Cockpit. The Configuration: Database Manager screen appears.

The following information is displayed as a tree structure:

Tree node Description

Common Common information about the database manager, for example,release level and CPU speed

Diagnostics Information about diagnostics

Default MonitorSwitches Information about the default monitor switches of the database

Security - Groups Information about user groups of the database manager

Security –Authentication

Information about authentications of the database manager and onclients

Memory Information about the memory of the database manager

Agents Information about agents

Page 110: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

110 April 2007

Tree node Description

Application RemoteInterface Information about the database application remote interface (DARI)

Sync Point Manager Information about the configuration of the synchronization manager andthe transaction manager

TransactionManager Information about the transaction manager

Network Information about network characteristics such as communicationprotocols

FastCommunicationManager

Information about the Fast Communication Manager (FCM), that is, theconfigured communication in a multi-partition database

DB2 Discovery Information about the configuration of the discovery mode

OthersSingle parameters that are not accessible to the groups describedabove as well as parameters that are not known by the DBA Cockpit,for example, those of new database release

The database manager parameters are displayed with a short description and the technicalname that was defined by DB2. If you need to change a parameter, use the followingcommand:

UPDATE DATABASE MANAGER CONFIGURATION using <keyword> <value>

Note

In a multi-partition environment, the database manager parameters are the same for allpartitions. Therefore, All is displayed in the Partition field in the Database ManagerConfiguration group box.

End of the note.

For more detailed information about these parameters, see the IBM DB2 onlinedocumentation.

In addition, you can maintain the database configuration parameters. For more information,see Maintaining the Database Configuration [Page 112].

5.2 Configuration: DatabaseYou can access information on database configuration by calling the DBA Cockpit andchoosing Configuration Database in the navigation frame of the DBA Cockpit. TheConfiguration: Database screen appears.

The following information is displayed as a tree structure:

Tree node Description

Page 111: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 111

Tree node Description

Common Common information about the database, for example, release level andcountry code

AutomaticMaintenance Information about the automatic maintenance switches

Optimization Information about optimization

I/O Information about I/O

Self-TuningMemory Manager Information about the self-tuning memory manager

Database SharedMemory Information about the memory that is available for the database

ApplicationMemory Information about the memory that is available for the application

Logging Information about log files and logging parameters

Log FileManagement Information about log file management parameters

Backup &Recovery Information about recovery availability and backups

TSM Information about Tivoli Storage Management (TSM)

Locks Information about locks, for example, the percentage of lock lists perapplication

Space Information about containers and tablespaces

Applications Information about applications that connect to the database

DB2 Data LinksManager Information about the DB2 Data Links Manager (DB2 Version 8 only)

High Availability Information about the system configuration is only displayed if you arerunning a high availability system.

OthersSingle parameters that are not accessible to the groups described aboveas well as parameters that are not known by the DBA Cockpit, forexample, those of a new database release

The database parameters are displayed with a short description and the technical name thatwas defined by DB2. If you need to change a parameter, use the following command:

UPDATE DATABASE CONFIGURATION for <system> using <keyword> <value>

Page 112: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

112 April 2007

Note

In multi-partition environment, the parameters can vary for each partition. For moreinformation about how to compare the configuration of several database partitions, seeComparing Database Configuration Parameters For Several Database Partitions [Page 113 ].

End of the note.

Caution

Depending on your database release level, some tree nodes might not be visible or mightadded to the view.

End of the caution.

In addition, you can maintain the database configuration parameters. For more information,see Maintaining the Database Configuration [Page 112].

For more detailed information on these parameters, see the IBM DB2 online documentation.

Displaying the Parameter Value History

Caution

To be able to display a value history, the function must be switched on first by selectingCollect History Data when you configured your database for remote monitoring. For moreinformation, see Configuring Systems for Remote Monitoring Using Remote DatabaseConnections.

End of the caution.

For parameters that are affected by the self-tuning memory manager, you can display a valuehistory by choosing Show Value History on the Configuration: Database screen.

The result for a parameter is displayed in a separate window. By default, the value historyinformation is displayed as a chart. By choosing List, you can switch to a tabular view. To limitthe history time frame, choose From or To.

5.2.1 Maintaining the Database ConfigurationOn the Configuration: Database or Configuration: Database Manager screen, you canmaintain configuration parameters as follows:

1. Double-click the parameter that you want to change.

Detailed information about this parameter is displayed in a new group box in thelower part of your screen.

Note

If a parameter cannot be changed, the Display <-> Change icon is not displayed.

End of the note.

2. Choose Display <-> Change and enter the new configuration parameter values.

Note

Page 113: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 113

Some configuration parameters are enabled for automatic value adjustment. In thiscase, the checkbox AUTOMATIC is displayed. If you select AUTOMATIC, the valuewill automatically be maintained by DB2.

End of the note.

3. To check your entries, choose Check Input.

In the lower half of the Configuration: Database – Maintain or Configuration:Database Manager – Maintain screen, an editor is displayed that shows thegenerated CLP commands that are based on your input. This area is automaticallyfilled and refreshed whenever you choose Check Input.

4. To confirm your entries, choose Execute.

5.2.2 Comparing Database Configuration Parametersfor Several Database Partitions

1. On the Configuration: Database screen, choose Compare Partitions.

The Select Partitions dialog box appears.

2. Select the database partitions that you want to compare and choose Compare.

The database configuration parameters for the selected database partitions aredisplayed in a table. The values that differ from one another are marked blue.

Note

By default, only the parameters that differ from one another are displayed. If you wantto display all parameters, choose Filter.

End of the note.

5.3 Configuration: Registry VariablesYou can access information about DB2 registry variables by calling the DBA Cockpit andchoosing Configuration Registry Variables in the navigation frame of the DBA Cockpit.The Configuration: Registry Variable screen appears displaying the information as a treestructure. Aggregate variables are displayed as a folder that contain all the registry variablesaffected 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 ismarked 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:

Page 114: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

114 April 2007

Instance

Global

Environment

5.4 Configuration: Parameter ChangesThis screen displays current and previous settings of the DB2 database managerconfiguration parameters and the DB2 database configuration parameters, together with therespective date of change.

You can access information on parameter changes by calling the DBA Cockpit and choosingConfiguration Parameter Changes in the navigation frame of the DBA Cockpit. The

Configuration: Parameter Changes screen appears.

In the Parameter Changes group box, you can select from the following options:

Option Description

Parameter Active Displays the current values of the parameters

Parameter History Displays all recorded parameter changes made in the past

Parameter Type All Displays both database manager and database parameters

Parameter Type Database Displays database parameters only

Page 115: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 115

Parameter Type DB Manager Displays database manager parameters only

Parameter Type Registry Displays registry variables only

When you have made your selection, the following information is displayed:

Column Description

Parameter Type Defines whether the parameter is a database manager parameter ora database parameter

Parameter NameParameters in upper case indicate that the parameter is modifiableusing DB2 CLP. Parameters in lower case indicate that theparameter is maintained by DB2 (read-only).

Partition Monitored partition – displayed only if you are using a multi-partitiondatabase

Date Date of the change

Time Time of the change

Parameter Value Value of the parameter currently set or set in the past

5.5 Configuration: Database Partition GroupsYou can access information on available database partition groups by calling the DBACockpit and choosing Configuration Database Partition Groups in the navigation frameof the DBA Cockpit. The Configuration: Database Partition Groups screen appears.

The following information is displayed:

Column Description

Database Partition Group Name of the database partition group

Partition Number of the partition

Page 116: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

116 April 2007

Status

Current status of the partition

The following values are possible:

Status information not available

Displayed for database partition group IBMTEMPGROUP orif the status cannot be determined

Partition not in partitioning map;containers not yet created

Partition has been created without containers and is notyet referenced in the partitioning map.

Partition not in partitioning map;containers created

Partition and containers have been created, but partition isnot yet referenced in the partitioning map.

Partition in partitioning map; containerscreated

Partition will be dropped after nextredistribution

For more information, see the DB2 Administration Guide.

The list of database partition groups contains all database partition groups of which theselected partition is a member. If you choose All in the Partition field, all available databasepartition groups will be displayed.

In addition, you can maintain database partition groups, that is change, add or delete them.For more information, see Maintaining Database Partition Groups [Page 116].

5.5.1 Maintaining Database Partition GroupsUsing the list of database partition groups on the Configuration: Database Partition Groupsscreen, you can maintain database partition group entries 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

Page 117: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 117

Changing Database Partition Groups

1. On the Configuration: Database Partition Groups screen, choose Edit.

The Configuration: Database Partition Group– Change screen appears.

The following information is displayed:

Partitions

This tab page contains a list of all partitions of the database partition group.

Field Description

Partition Number of the partition

Status

Current status of the partition

The following values are possible:

Status information not available

Displayed for database partition group IBMTEMPGROUP or ifthe status cannot be determined

Partition not in partitioning map; containersnot yet created

Partition has been created without containers and is not yetreferenced in the partitioning map.

Partition not in partitioning map; containerscreated

Partition and containers have been created, but partition is notyet referenced in the partitioning map.

Partition in partitioning map; containerscreated

Partition will be dropped after nextredistribution

For more information, see the DB2 Administration Guide.

Page 118: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

118 April 2007

Buffer Pools

This tab page contains a list of all buffer pools that have been defined for the selecteddatabase partition group.

Column Description

Buffer Pool NameTotal space in KB

If you create tablespaces, this information is not displayed.

Buffer Pool Size(KB)

Size of the buffer pool in KB

A value of –1 indicates that the default buffer pool size parameterfrom the database configuration is used (parameter BUFFPAGE).

Page Size Size of one buffer pool page in bytes

For detailed information on buffer pools, double-click the corresponding buffer pool.

Tablespaces

This tab page contains a list of all tablespaces that have been defined for theselected database partition group.

Field Description

Tablespace Name Name of the tablespace

Page Size Size of one tablespace pagein bytes

For detailed information on tablespaces, double-click the corresponding tablespace.

1. To confirm your entries, choose Execute.

2. To apply changes, choose Partitions.

3. You can now add or delete partitions:

o To add partitions, choose Add Partition.

The system automatically suggests a new partition that has not yet beendefined in the database partition group. You can modify this suggestion bymanually selecting another partition.

o To delete partitions, select one or more lines in the table and choose DeletePartition.

4. To confirm your entries, choose Execute.

Adding Database Partition Groups

1. On the Configuration: Database Partition Groups screen, choose Add.

The Configuration: Database Partition Group– Add screen appears.

Page 119: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 119

Note

By default, all available partitions are listed to be part of the new database partitiongroup. Choose Delete Partition if you want to reduce this list.

End of the note.

2. Specify a name for the new database partition group.

Recommendation

We recommend that you use uppercase letters for the database partition groupname. Using lowercase letters or special characters makes accessing the selecteddatabase partition group with the DB2 command line processor less comfortable.

3. To confirm your entries, choose Add.

Deleting Database Partition Groups

1. On the Configuration: Database Partition Groups screen, select a database partitiongroup.

2. Choose Delete.

The Configuration: Database Partition Group– Delete screen appears.

3. To delete the selected database partition group, choose Delete.

Caution

You cannot delete database partition groups that contain tablespaces that are stillbeing used by the SAP system.

You must delete the tablespaces first.

End of the caution.

Redistributing Database Partition Groups

Note

You can only redistribute database partition groups that have the status Partition not inpartitioning map; containers created.

End of the note.

1. On the Configuration: Database Partition Groups screen, select a database partitiongroup.

2. Choose Redistribute.

A scheduling screen of the DBA Planning Calendar appears.

3. Define if you want to redistribute the database partition group immediately or at alater point in time.

Page 120: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

120 April 2007

SQL Statements

In the lower half of the Configuration: Database Partition Group screen, an editor is displayedthat shows the generated SQL statement(s) that will be executed. This area is automaticallyfilled and refreshed if any changes were applied correctly.

5.6 Configuration: Buffer PoolsYou can access information on available buffer pools by calling the DBA Cockpit andchoosing Configuration Buffer Pools in the navigation frame of the DBA Cockpit. TheConfiguration: Buffer Pools screen appears.

The following information is displayed:

Column Description

Buffer PoolName Name of the buffer pool

Partition Number of the partition (only displayed if you are using a multi-partitiondatabase)

Size(Pages)

Size of the buffer pool in KB. A value of –1 indicates that the default buffer poolsize parameter from the database configuration is used (parameter BUFFPAGE).

AUTOMATIC indicates that the selected buffer pool is tuned by DB2's self tuningmemory management (STMM).

If one of these special values is displayed and you want to see the real size ofthe buffer pool, you should use the buffer pool snapshot [Page 37].

Page Size(Byte) Size of one buffer pool page in bytes

The list of buffer pools contains all buffer pools that have been defined for the selectedpartition. If you choose ALL in the Partitions field, all available buffer pools will be displayed.

In addition, you can maintain buffer pools, that is change, add or delete them. For moreinformation, see Maintaining Buffer Pools [Page 120].

5.6.1 Maintaining Buffer PoolsUsing the buffer pool list on the Configuration: Buffer Pools screen, you can maintain bufferpool entries as follows:

Change buffer pools, that is add or remove partitions, resize or control the use ofextended storage

Add new buffer pools

Delete buffer pools

Page 121: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 121

Changing Buffer Pools

1. On the Configuration: Buffer Pools screen, choose Edit.

The screen Configuration: Buffer Pool Maintenance – Change Buffer Pool appears.

The following information is displayed:

Technical Settings

This tab page provides a set of all technical attributes:

Column Description

Partition

Partitions that have been defined for the selected bufferpool. The list depends on the selection of database partitiongroups. You can modify the size of the buffer pool onselected partitions or set the size for all partitions by usingthe field Set size on all partition to.

Caution

In a multi-partitioned environment, you can define exceptionentries by which the size of the buffer pool on this partition isdifferent from its size for all other partitions. To remove thisentry, choose Remove Exception Entry next to theImmediate checkbox.

End of the caution.

Buffer Pool Size(Pages)

Displays the buffer pool size in pages or the valueAUTOMATIC

Immediate Indicates that the buffer pool is created or changedimmediately and not after the next system restart.

Field Description

Set size of all partitionsto... (Pages)

Specifies the buffer pool size on all partitions

Note

This function is not supported for buffer pools that areenabled for DB2's self–tuning memory management

End of the note.

Page Size Size of one page in the buffer pool

Block Size Size of one block for blocked I/O in pages – displayed only ifyou are using DB2 Version 8

Number of BlockPages

Number of pages that are reserved for block I/O usage –displayed only if you are using DB2 Version 8

Page 122: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

122 April 2007

Use automatic bufferpool size on alldatabase partitionsstarting with

Specifies that the buffer pool size is automaticallymaintained by DB2. You are able to specify a starting valueregardless if the automatic buffer pool size was enabledbefore or if you are only switching this feature on.

Database Partition Groups

This tab page contains a list of all database partition groups to which the buffer poolis related. A buffer pool can be related to all available partitions or to a set ofpartitions defined by database partition groups. If the buffer pool is not alreadydefined on all partitions, you can select further database partition groups.

For detailed information on database partition groups, double-click the correspondingdatabase partition group.

For more information about the maintenance of database partition groups, seeMaintaining Database Partition Groups [Page 116].

Tablespaces

This tab page contains a list of all tablespaces that use this buffer pool.

Column Description

Tablespace Name Name of the tablespace

Page Size Size of one tablespace page in bytes

For detailed information on tablespaces, double-click the corresponding tablespace.

For more information about tablespace maintenance, see Maintaining Tablespaces[Page 86].

2. To confirm your entries, choose Execute.

3. To apply changes, choose Technical Settings or Database Partition Groups.

Adding Buffer Pools

1. On the Configuration: Buffer Pools screen, choose Add.

The Configuration: Buffer Pool Maintenance – Add Buffer Pool screen appears.

Note

By default, all available partitions are listed to be related to the new buffer pool. If youwant to reduce this list, go to the Database Partition Groups tab page and selectoption On Selected Database Partition Groups and choose database partition groupsfrom the list.

End of the note.

Page 123: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 123

2. Specify a name for the new buffer pool.

Recommendation

We recommend that you use uppercase letters for the buffer pool name. Usinglowercase letters or special characters makes accessing the selected databasepartition group with the DB2 command line processor less comfortable.

3. Enter the technical settings such as the page size.

4. To confirm your entries, choose Add.

Deleting Buffer Pools

1. On the Configuration: Buffer Pools screen, select a buffer pool.

2. Choose Delete.

The Configuration: Buffer Pool Maintenance– Delete Buffer Pool screen appears.

3. To delete the selected buffer pool, choose Delete.

SQL Statements

In the lower half of the Configuration: Buffer Pool screen, an editor is displayed that showsthe generated SQL statement(s) that will be executed. This area is automatically filled andrefreshed if any changes were applied correctly.

5.7 Configuration: Special Tables RegardingRUNSTATSYou can access information on tables with special RUNSTATS characteristics by calling theDBA Cockpit and choosing Configuration Special Tables Regarding RUNSTATS in thenavigation frame of the DBA Cockpit.

There are two categories of tables that are treated by the optimizer in a special way due totheir characteristics:

Tables marked as VOLATILE in the system catalog

A volatile table is a table whose content can vary from a few entries to very largeamount of entries at lifetime, that is, statistics data is often out-of-date and may resultin wrong access plans by the optimizer. These tables should be marked asVOLATILE and should have no statistics at all.

Tables with RUNSTATS control parameters that are not in accordance with the CCMSstandards, for example, special scheduling pattern, different kind of RUNSTATS ortables that have a profile that may influence automatic RUNSTATS

Page 124: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

124 April 2007

On the basis of the list displayed, you can check system catalog-related information againstthe DBSTATC control table.

The following information is displayed on the Configuration: Special RUNSTATS Settings andVolatile Tables screen:

Column Description

Table Schema Name of the schema to which the table belongs

Table Name Name of the database table

VOLATILE

Indicates whether the table is flagged as VOLATILE in the system catalogor not

If the table is flagged as VOLATILE, statistics are not used by theoptimizer.

Active

Type of entry in control table DBSTATC

The following entries are displayed:

N

No RUNSTATS is run by any CCMS program. This statuscorresponds to the VOLATILE attribute of a database table, whichprevents the query optimizer from using statistics.

R

No RUNSTATS is run by any CCMS program. The only exception isthat you use program dmdb6srp and explicitly specify the table.

A

RUNSTATS may be run by CCMS programs.

This information is only relevant if CCMS RUNSTATS is enabled.

Profile Indicates whether a RUNSTATS profile was set for the table

RUNSTATS Date Date of the last RUNSTATS in the system catalog table

RUNSTATSTime Time of the last RUNSTATS in the system catalog table

Cardinality Number of rows as calculated by the last RUNSTATS (–1 indicates thatthere are no statistics available)

Page 125: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 125

Note

If automatic RUNSTATS is not enabled, proceed as follows:

To receive correct results, the RUNSTATS and REORGCHK for all Tables job should haverun at least once.

End of the note.

5.8 Configuration: File Systems Note

This function is not available for systems monitored using a remote database connection.

End of the note.

The information displayed on this screen helps you to determine how much free space isavailable in your file systems to extend tablespaces.

You can access the information by calling the DBA Cockpit and choosing ConfigurationFile Systems in the navigation frame of the DBA Cockpit. The Configuration: File Systems

screen appears.

The following information is displayed:

Column Description

Partition Number of the partition (only displayed if you are using a multi-partitiondatabase)

File System NameName of the file system

Both local and NFS file systems are displayed.

KB Total Total size of the file system in KB

KB Used Total amount used of the file system in KB

Percentage Used Used percentage of total size of the file system

KB Free Total amount free of the file system in KB

Percentage Free Free percentage of total size of the file system in KB

Page 126: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

126 April 2007

Inodes UsedNumber of inodes used

Inodes are needed to save files in the file system. For each directory offiles a minimum of one inode is used.

Inodes Used (%) Percentage of inodes used

5.9 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 databasetablespaces.

You can access the list of available data classes by calling the DBA Cockpit and choosingConfiguration Data Classes in the navigation frame of the DBA Cockpit. The

Configuration: Data Classes screen appears.

The following information is displayed:

Column Description

State

Green:

No action required

Yellow:

Indicates warnings

Recommendation

We strongly recommend that you take immediate action.

Red:

Indicates errors

Immediate action required

The following errors are checked:

Is there a related tablespace for data?

Does the data tablespace exist in the database?

Page 127: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 127

Column Description

Is there a related tablespace for indexes?

Does the index tablespace exist in the database?

Does the name of the tablespace comply with the namingconventions for the customer namespace?

Is there a description for the data class?

Data Class Name of the data class known to the ABAB Dictionary

Data Tablespace Name of the tablespace where table data is stored

Index Tablespace Name of the tablespace where table indexes are stored

No. of Tables Number of tables within the related data tablespace

No. of Indexes Number of indexes within the related index tablespace

Category Category of the data class

Description Description of the data class

In addition, you can maintain data classes, that is change, add or delete them. For moreinformation, see Maintaining Data Classes [Page 127].

5.9.1 Maintaining Data ClassesUsing the data class list on the Configuration: Data Classes screen, you can maintain dataclasses as follows:

Change data classes

Add new data classes

Delete data classes

Changing Data Classes

1. On the Configuration: Data Classes screen, choose Edit.

The Change Data Class dialog box appears.

2. If required, change the description.

3. Change the tablespace assignment.

4. To confirm your changes, choose Save.

Page 128: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

128 April 2007

Caution

Changing the related tablespaces does not affect already existing tables. It will onlyinfluence new tables.

End of the caution.

Adding Data Classes

1. On the Configuration: Data Classes screen, choose Add.

The Add Data Class dialog box appears.

2. Specify a name for the data class using the naming conventions for customer-defineddata classes. If you do not follow these naming conventions, you might get an errormessage.

Caution

Keep in mind that not defining data classes according to the naming conventions hasan impact on future upgrades of your system.

Such entries will not be recognized as customer entries and will be lost during theupgrade.

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 meaningful description.

4. Select a data and index tablespace from the list box.

5. To confirm your entries, choose Add.

Deleting Data Classes

1. On the Configuration: Data Classes screen, choose Delete.

The Delete Data Class dialog box appears.

2. To confirm your entries, choose Delete.

Caution

A data class cannot be deleted if it is used by any table.

End of the caution.

5.10 Configuration: Monitoring SettingsUse

You can use this function to configure the monitoring tools themselves. The followingfunctions are available:

Page 129: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 129

You can check the user-defined function libraries (UDFs).

Normally, these are automatically configured when you start the DBA Cockpit for asystem for the first time. If the DBA Cockpit recognizes any problem with the UDFinstallation of the selected system during its initialization, an error message isdisplayed and the CCMS Configuration screen appears automatically.

You can change the retention periods for history data.

These settings are evaluated only if you have selected Collect History Data duringthe configuration of your database for remote monitoring. For more information, seeConfiguring Systems for Remote Monitoring Using Remote Database Connections[Page 14].

Checking the User-Defined Function Libraries

1. Call the DBA Cockpit.

2. In the navigation frame, choose Configuration Monitoring Settings .

The Configuration: Monitoring Tool Settings screen appears.

3. Choose UDF Configuration.

The cataloged path and version of the UDF library is displayed. The DBA Cockpitassumes that this path is the path to the executables of the SAP system as it wascreated during the standard installation procedure. The UDF version that is displayedcorresponds to the current patch number of the UDF library db6pmudf.

Caution

If you change the path, keep in mind that the DBA Cockpit only accepts paths thatcontain the SAP system ID or an empty path. If you do not indicate a path, DB2assumes that the UDFs are located in the DB2 UDF library. Any other path that doesnot comply with these rules will be automatically changed when you start the DBACockpit. The DBA Cockpit then assumes that the UDFs are located in the directorywhere the SAP kernel is located.

End of the caution.

4. To test the current path, choose Test.

In case of problems, error messages are displayed during the test. These aretypically some SQL error messages, which indicate, for example, that the UDFs werenot found under the specified path or that the user does not have the requiredauthorizations.

You must save your changes before you can run the next test.

Page 130: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

130 April 2007

Changing the Retention Periods for History Data

1. Call the DBA Cockpit.

2. In the navigation frame, choose Configuration Monitoring Settings .

The Configuration: Monitoring Tool Settings screen appears.

3. Choose History Data.

The values displayed are set by default.

4. To change the values, choose Display<->Change.

5. If you want to switch the DB2 diag log automatically to restrict the size of it to amanageable value, choose Switch Weekly.

The DB2 diag log is saved under a new name with a timestamp and a new DB2 diaglog is created.

6. If you want to collect history data on a dedicated background server, specify a serverin the Server for Data Collection field.

7. Save your changes.

5.11 Configuration: Automatic MaintenanceSettingsUsing DB2's automatic maintenance functions, you prepare the database for automaticadministration. In addition, you should check the settings from time to time to make sure thatthey meet the requirements of your production system.

Features

You can configure the following functions:

Automatic Backup

Automatic RUNSTATS

Automatic REORG

Activities

To use automatic maintenance for your database, call the DBA Cockpit and chooseConfiguration Automatic Maintenance Settings in the navigation frame of the DBA

Cockpit. The screen Configuration: Automatic Maintenance Settings appears.

By default, the General tab page is displayed where you specify the maintenance windowsduring which automatic maintenance is performed by DB2.

Page 131: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 131

Note

In this context, online and offline does not mean the state of the database itself but the timeframe with only low activity (online) or no activity (offline) on the database.

End of the note.

You can specify the following maintenance windows:

Online Maintenance Window

Time frame with only low activity on the database. For example, during an onlinemaintenance window, you can still be connected to the database.

Offline Maintenance Window

Time frame with no activity on the database. For example, during an offlinemaintenance window, neither connections to the database are allowed nor updatesfor tables and indexes while they are being reorganized.

Note

Since the tab pages for specifying the online and the offline maintenance windows areidentical, they are only described once. For more information, see Configuring GeneralMaintenance Settings.

End of the note.

Furthermore, you attach the required function, for example, Automatic REORG, to one of themaintenance windows. DB2 then decides if any action is required and triggers the correctaction automatically.

More Information

Configuring General Maintenance Settings [Page 131]

Configuring Automatic Backup Settings [Page 132]

Configuring RUNSTATS Settings [Page 134]

Configuring Automatic REORG Settings [Page 136]

5.11.1 Configuring General Maintenance Settings1. Call the DBA Cockpit.

2. Choose Configuration Automatic Maintenance Settings in the navigation frame.

The screen Configuration: Automatic Maintenance Settings appears.

Note

To be able to use the automatic maintenance function, Automatic maintenance isswitched on must be selected on the General tab page.

End of the note.

Page 132: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

132 April 2007

3. Specify the following parameters:

o Online maintenance window is enabled or Offline maintenance windows isenabled

o Time of Automatic Maintenance

(Specifies the maintenance window directly or inverted.)

o Time

o Day of Week

o Day of Month

o Month of Year

Caution

The definition of all time-related parameters is combined by AND. Therefore, a validmaintenance window must meet all definitions.

End of the caution.

In the footer of the maintenance window, the actions that are registered for this maintenancewindow are displayed as well as whether they are switched on or off.

5.11.2 Configuring Automatic Backup Settings1. Call the DBA Cockpit.

2. Choose Configuration Automatic Maintenance Settings in the navigation frame.

The screen Configuration: Automatic Maintenance Settings appears.

3. Choose Automatic Backup.

4. Specify the following parameters:

Parameter Description

General

Automatic backup isswitched on / off Enables or disables the automatic backup function

Backup OperationType

Specifies the type of backup (online or offline)

When performing an online backup, you are still able toaccess the database during the online maintenance window.When performing an offline backup within the offlinemaintenance window, you cannot access the database.

Page 133: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 133

Parameter Description

Priority

Specifies the priority of the automatic backup over the otherautomatic maintenance features such as AutomaticRUNSTATS or Automatic REORG

Note

1 means highest priority.

End of the note.

Starting Conditions

Optimize forDatabaseRecoverability

Backups are created more frequently. Therefore, less time isrequired to recover the database. The following limits apply:

Maximum time between backups: 1 day

Maximum log space used between backups: 10 MB

Balance BetweenRecoverability andPerformance

Indicates the balance between the number of backups and thetime for recovery.

The following limits apply:

Maximum time between backups: 7 days

Maximum log space used between backups: 25 MB

Optimize forDatabasePerformance

Fewer backups are created. Therefore, more time to recoverthe database is required. The following limits apply:

Maximum time between backups: 30 days

Maximum log space used between backups: 50 MB

Customize

When you choose this option, you are able to customize thefollowing parameters:

Number of full backups is less than

Minimum number of backups

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 fullbackups is less than

If the number of backups is less than the specified value, abackup is created.

Time since last fullbackup exceeds

If the time – since the last backup – exceeds the specifiedvalue, a backup is created.

Page 134: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

134 April 2007

Parameter Description

Log space used sincelast full backup ismore than

If the log space exceeds the specified value, a backup iscreated.

Backup Media

File SystemThe backup is created in the specified file systems.

If you choose File System, you also have to specify File Pathswhere the backup is to be created.

Tape DeviceThe backup is created on tape.

If you choose Tape Device, you also have to specify theNumber of Parallel Sessions.

TSMThe backup is created and stored in IBM Tivoli StorageManager (TSM).

If you choose TSM, you also have to specify File Paths.

XBSA

The backup is created using the XBSA API for storing thedata.

If you choose XBSA, you also have to specify the Number ofParallel Sessions.

Vendor Library

The backup is created and data is stored using a vendorlibrary.

If you choose Vendor Library, you also have to specify theLocation (that is, a path and file name of the library) and theOptions.

5.11.3 Configuring Automatic RUNSTATS Settings1. Call the DBA Cockpit.

2. Choose Configuration Automatic Maintenance Settings in the navigation frame.

The screen Configuration: Automatic Maintenance Settings appears.

3. Choose Automatic RUNSTATS.

4. You can set the following parameters:

Parameter Description

General

Page 135: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 135

Parameter Description

Automatic RUNSTATS isswitched on / off Enables or disables the automatic RUNSTATS function

Maintenance Window Specifies that automatic RUNSTATS can only be performedin the online maintenance window

Priority

Specifies the priority of the automatic RUNSTATS over theother automatic maintenance features, such as AutomaticREORG or Automatic Backup.

Note

1 means highest priority.

End of the note.

Parameters

SAP Default Criteria forTables Excluded byPolicy

If you select this checkbox, you enable the SAP defaultcriteria, that is that no tables are excluded from automaticRUNSTATS by the policy filter.

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

Tables Excludedfrom RUNSTATS

The excluded tables are divided into the following categories:

Volatile Tables

Volatile tables are always excluded from automatic RUNSTATS.When you expand this node, the volatile tables are displayed.

Tables Excluded by Policy

Within the policy, there are some filter criteria for tables to beexcluded from automatic RUNSTATS. When you expand thisnode, the excluded tables are displayed.

Schema Name of the schema to which the table belongs

Volatile

Indicates whether the table is flagged as VOLATILE in the systemcatalog or not

If the table is flagged as VOLATILE, statistics are not used by theoptimizer.

Page 136: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

136 April 2007

Column Description

Profile Indicates whether a RUNSTATS profile was set for the table

RUNSTATS Date Date of the last RUNSTATS in the system catalog table

RUNSTATS Time Time of the last RUNSTATS in the system catalog table

Cardinality Number of rows as calculated by the last RUNSTATS (–1 indicates thatthere are no statistics available)

5.11.4 Configuring Automatic REORG SettingsThe automatic REORG checks regularly if tables or indexes require reorganization. This checkis performed by the REORGCHK. The tables are always defragmented during the offlinemaintenance window. Only for indexes, you are able to specify if a reorganization is to beperformed during the online or offline maintenance window.

Procedure

1. Call the DBA Cockpit.

2. Choose Configuration Automatic Maintenance Settings in the navigation frame.

The screen Configuration: Automatic Maintenance Settings appears.

3. Choose Automatic REORG.

4. You can set the following parameters:

Parameter Description

General

Automatic REORG isswitched off Enables or disables automatic REORG function

Index Reorganization Mode

Specifies a maintenance window for indexreorganization.

Recommendation

We recommend that you reorganize indexes during theonline maintenance window.

PrioritySpecifies the priority of the automatic REORG over theother automatic maintenance features, such asAutomatic RUNSTATS or Automatic Backup.

Page 137: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 137

Parameter Description

Note

1 means highest priority.

End of the note.

Parameters

SAP Default Criteria forTables Excluded by Policy

Enables the SAP default filter criteria for tables that areto be excluded from automatic REORG

That is, all table filters in the policy are disabled and theparameters are changed according to the SAPrecommendations.

Note

A full editor for these filter criteria is not provided.

End of the note.

Use a System TemporaryTablespace with CompatiblePage Size

If you select this option, a copy of the table or index iscreated in the temporary tablespace and the table orindex is copied to the original tablespace.

Since temporary tablespaces in SAP systems are SMStablespaces, the required space for defragmentationwill be available after the reorganization.

Recommendation

We recommend that you use a system temporarytablespace.

Maximum Table Size

Specifies the tables that are excluded from theautomatic REORG because of their size

Recommendation

We recommend a maximum table size filter of1,000,000 KB.

Page 138: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

138 April 2007

Compression DataDictionary

Specifies if you want to keep or rebuild the compression datadictionary

A rebuild of the data dictionary could lead to a bettercompression ratio but means additional time duringreorganization.

Recommendation

We recommend that you rebuild the compression datadictionary.

In addition, the following information is displayed for tables that are excluded from anautomatic REORG:

Column Description

TablesExcluded fromREORG

The excluded tables are divided into the following categories:

Tables Excluded by Policy

Within the policy, there are some filter criteria for tables to beexcluded from the automatic REORG. When you expand this node,the excluded tables are displayed.

Tables Excluded by Size

When you expand this node, the tables with a size larger than thethreshold are displayed.

Determining the table sizes online is much too expensive. To getthe sizes of the tables, you have to schedule the job REORGCHKfor all Tables in the DBA Planning Calendar.

Schema Name of database schema to which the table belongs

Table Flagged Indicates the table to be reorganized

Index Flagged Indicates the indexes to be reorganized

Table Size (KB) Size of table in KB

REORG Date Date when table was last reorganized

REORG Time Time when table was last reorganized

Page 139: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 139

6 JobsThe following sections provide information on:

The Central Calendar [Page 139]

The DBA Planning Calendar [Page 142]

The DBA Log [Page 160]

The SQL Script Maintenance [Page 161]

6.1 Central CalendarUse

The Central Calendar is part of the DBA Cockpit in the SAP system. It gives you a singlepoint from which to manage database administration (DBA) actions in an integrated SAPenvironment. The actions available differ according to the database platform but the methodof use is the same. Examples of actions are backups, database system checks, and so on.

The Central Calendar is only for viewing DBA actions by system.

However, you can easily switch to the DBA Planning Calendar for any SAPsystem registered in the DBA Cockpit to plan – that is, schedule, change,delete, or execute – DBA actions.

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

Integration

The Central Calendar runs with all database platforms delivered as a standard part of theSAP system and supported by SAP (except DB2 for i5/OS, which has good equivalent tools).

Features

You can manage in real time systems directly administered from the system wherethe 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 haveexecuted successfully.

You can quickly check the number of actions and number of actions with the higheststatus severity for each system, as shown in the following example:

Page 140: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

140 April 2007

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 3actions planned, 2 of which had the highest status severity. For example, thehighest status severity might be “Warning”, in which case the entry is displayedwith a yellow background.

Activities...

1. On the system where you normally run the DBA Cockpit, you plan a regular job in theDBA Planning Calendar to update the results from remote systems using the actionCentral 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 flagCollect 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 DBAPlanning Calendar.

For more information, see Using the Central Calendar.

6.1.1 Using the Central CalendarUse

You can use the Central Calendar in the DBA Cockpit to view actions on all the databases ofyour SAP Systems.

Prerequisites

You have defined the systems to be displayed in the Central Calendar by double-clicking the required system in the screen DBA Cockpit: System ConfigurationMaintenance and selecting Collect Central Planning Calendar Data.

For more information, see Configuring Systems for Remote Monitoring Using RemoteDatabase Connections.

In the DBA Planning Calendar of the DBA Cockpit where you call the CentralCalendar, you have planned the action Central Calendar Log Collector to runregularly. This collects information from the defined remote systems for display in theCentral Calendar.

For more information, see Setting Up the DBA Planning Calendar.

Page 141: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 141

Procedure...

1. Start the Central Calendar from the DBA Cockpit by choosing Jobs CentralCalendar.

The Central Calendar is displayed. If you have already run or planned actions, you seeentries by day, one for each system.

Here is an example of entries for Thursday February, 08 affecting two systems, FUDand FIB:

3 FUD 2

4 FIB 1

On system FUD for Thursday 8th January, there were three actions planned, twoof which had the highest status severity. For example, the highest statusseverity for FUD might be “Finished with warning”, in which case the entry forFUD is displayed with a yellow background. This means that two actions endedwith a warning.

On system FIB for the same day, there were four actions planned, one of whichended with the highest severity. For example, the highest severity for FIB mightbe “Finished with error”, in which case the entry for FIB is displayed with a redbackground. This means that one action ended with an error.

The following table shows the color-coded statuses in the Central Calendar, which youcan also see by choosing Legend:

Color Status

Light blue Planned

Dark blue Running

Green Finished successfully

Yellow Finished with warning

Red Finished with error

Dark yellow No longer available

Dark red Scheduling failed

2. To see a summary of the actions for a day, double-click the day header.

The system displays a summary of the actions and status for each system on the dayyou selected, as in the following example:

System Total Nolongeravailable

Scheduled Running Finished

Warning Error

FUD 3 1 2

FIB 4 3 1

Page 142: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

142 April 2007

3. To see the individual actions for a system, double-click the entry for the system on therequired day.

You see the relevant day in the DBA Planning Calendar. You can perform all usualfunctions in the DBA Planning Calendar.

4. To refresh the display for the system from which you called the Central Calendar,choose Refresh.

5. To refresh the display for all systems, choose Remote Refresh.

You can remotely refresh the display as follows:

Method How the Refresh Runs

Run in Dialog Runs in dialog mode, which can take a long time, sonot normally recommended

Start immediately Runs immediately in the background as a job

Schedule at Runs in the background at the time that you specify

We recommend that you schedule action Central Calendar Log Collector to runregularly, as described above in “Prerequisites”.

6. If required, you can customize the calendar display as follows:

Specify a factory calendar in Calendar ID.

Holidays are displayed in the same background color as weekend days. This inno way restricts the planning of actions in the DBA Planning Calendar.

Switch to day, week, or month view by choosing Administration View Day,Administration View Week, or Administration View Month.

Choose Save Settings and change Number of Weeks or Entries per Day in thedisplay.

6.2 The DBA Planning CalendarYou use the DBA Planning Calendar to automate database administration actions that haveto be performed regularly. You are able to schedule operations such as online backups, havethem automatically performed, and then check that the operation was successful.

The main function of the DBA Planning Calendar is to define the start times and parametersfor database actions. Since these actions run without administrator interaction, you have tomake sure in advance that the necessary resources are available.

Integration

The DBA Planning Calendar is part of the Computing Center Management System (CCMS).You can start it from the DBA Cockpit.

Features

Initial Screen

The initial screen of the DBA Planning Calendar is divided into three frames that aredescribed in the following.

Page 143: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 143

Left Frame

The frame on the left contains all information and parameters to select the set of actions to bedisplayed. You can:

Select the system from which you want to read planning data.

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 planningcalendar but manually or by external job schedulers.

o All Actions

These are all plannable actions, regardless how they have been scheduled.

o DB Collectors

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

Select the week to be displayed using the calendar control

The default is the current week. To navigate to another week, double-click the weekyou want to display.

Select a factory calendar

Specifying a factory calendar only has an impact on the calendar display. Holidaysare the same color as weekend days. It does not result in any restrictions for plannedactions.

Action Pad

The frame on the right contains the following list of all plannable actions that are currentlyavailable for DB2 for Linux, UNIX and Windows:

Task Area Actions Involved

Backup and recovery of the database

Note

The actions involved have an impact on theavailability of the database.

End of the note.

Full Database Backup into TSM

Full Database Backup to Device

Full Database Backup withVendor Library

Archive Log File to Tape

Page 144: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

144 April 2007

Running statistics for tables

Note

These actions are only available if the automaticRUNSTATS by DB2 is disabled.

The actions involved have an impact on thedatabase performance.

End of the note.

RUNSTATS and REORGCHK(DBSTATC)

RUNSTATS and REORGCHK forAll Tables

Reorganization of tables and tablespaces

Note

The actions involved have an impact on thedatabase performance.

End of the note.

REORG and RUNSTATS ofFlagged Tables

REORG of Tables in Tablespace(s)

REORG and RUNSTATS for SingleTable

Automatic REORG

This action depends on dataprovided by action REORGCHK forall Tables. If the latter is notscheduled, the action will not workproperly. For more information, seeReorganizingTables [Page 155].

Note

This action is available only if theautomatic REORG by DB2 isdisabled.

End of the note.

REORGCHK for All Tables

Most actions that you can schedule using the DBA Planning Calendar should normally bescheduled as a recurring action. You can set up your DBA Planning Calendar using thepattern setup function as described in Setting Up the DBA Planning Calendar [Page 145].

Calendar Frame

The calendar can be displayed with either a weekly, daily or monthly view using either a top-bottom layout or left-right split view layout. To change the layout, choose AdministrationLeft-Right Split View or Top-Bottom Split View Layout . To change, for example, from a

weekly view to a daily or monthly view, choose the corresponding button in the applicationtoolbar.

Page 145: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 145

Note

You can only change the layout for the week or month view. For the day view, only the left-right split view layout is available.

To change your preferred settings – that is, the layout and the view – choose Save Settings.

The calendar shows the actions that were scheduled using background processing. Theseactions are then automatically executed.

End of the note.

Once the action has run, the status is indicated using the following colors:

Color Meaning

Light blue The action has not yet started.

Dark blue The action has not yet finished.

Green The action has run successfully.

YellowThe action has finished with a warning.

Check the job log for details.

RedAn error has occurred and the action was interrupted.

Check the job log for details and reschedule the action.

Dark yellow No more information is available.

Dark red Scheduling failed, that is, there is no status available and the action isoverdue.

You can display the meaning of each color by choosing Legend.

Drag & Drop of Actions

You can move or copy actions within the calendar by using the drag & drop function.

More Information

Setting Up the DBA Planning Calendar [Page 145]

6.2.1 Setting Up the DBA Planning CalendarYou need to set up the DBA Planning Calendar because – when you start your system for thefirst time – there are no actions planned.

The most important thing when setting up the DBA Planning Calendar is to choose a patternof actions covering your regular database administration (DBA) needs, specifying anyrequired action parameters and taking account of any dependencies between actions.

Page 146: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

146 April 2007

You must also consider that there are a number of database-related jobs that are notcontrolled by the DBA Planning Calendar but which you must take into account whenscheduling regular actions.

The jobs involve:

Collection of database performance history data done every two hours starting at00:00

Monitoring of database and database manager configuration changes done daily on8.00 am, 01.00 pm and 7.00 pm

Collection of database and tablespace history data done daily at 7:00 am and 8.00pm

Collection of tables and indexes space history data done weekly on Sunday at 12.00pm

Caution

Some of the actions available have an impact on database performance andavailability. Check the start and end times of scheduled actions to make sure thatthey do not impact each other and that they do not impact other activities in yoursystem.

You cannot perform all required DBA actions from the DBA Planning Calendar or theDBA Cockpit. For more information on actions that you must perform with the SAPsystem down, such as offline database backup, see the SAP DatabaseAdministration Guide for your database

End of the caution.

Optionally, you can configure the back end of the DBA Planning Calendar to be able tocontrol the execution of background jobs. For more information, see Configuring the BackEnd of the DBA Planning Calendar [Page 148].

Prerequisites

Check the following before you start using the DBA Planning Calendar:

SAP system authorizations

Check that you have authorization for DBA and background job scheduling, which isprovided by profiles S_RZL_ADMIN and S_BTCH_ALL.

Check that external programs are able to run on the database server so that actionsaffecting 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 on how to back up thedatabase in the SAP Database Administration Guide for your database.

Page 147: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 147

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.

You make sure that the media are initialized and ready so that the operator does nothave to interrupt scheduled backup runs. For example, Check that tapes are alreadyin the specified tape drive or tape changer. You might require different tape drives fordatabase backups and log backups.

Procedure

1. Start the DBA Planning Calendar from the DBA Cockpit by choosing Jobs DBAPlanning Calendar

2. Choose Pattern Setup.

The Add Planning Patterns dialog box appears providing a list of actions that you canschedule with this function.

Note

A set of recommended actions is already preselected by default. You may changethis selection set, for example, if you want to use TSM for backup and archivinginstead of backup and archive to devices.

End of the note.

3. Follow the wizard to set up a pattern of recurring actions that covers your regularDBA needs.

You can navigate between the actions in the pattern by choosing Next and Previous.

4. When you have finished defining the pattern, choose Save on the last screen to enterthe pattern into the DBA Planning Calendar.

Caution

When you start using the DBA Calendar in production operation, you must check daily thatscheduled actions have been executed correctly.

End of the caution.

More Information

Configuring the Back End of the DBA Planning Calendar [Page 148]

Scheduling an Action [Page 148]

Changing an Action [Page 150]

Deleting an Action [Page 151]

Executing an Action [Page 151]

Displaying the Status of a Day’s Actions [Page 151]

Displaying Scheduled Actions [Page 152]

Troubleshooting [Page 153]

Page 148: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

148 April 2007

Updating Statistics [Page 153]

Scheduling a REORGCHK for All Tables [Page 154]

Reorganizing Tables [Page 155]

Database Backup [Page 156]

Archiving Log Files To Tape [Page 159]

Scheduling Scripts [Page 160]

6.2.1.1 1 Configuring the Back End of the DBA PlanningCalendarYou can configure the back end of the DBA Planning Calendar to control the execution ofbackground jobs. You can configure the back end for all systems, for selected databaseplatforms, or for single systems only.

The system is configured by using the first available configuration from the following:The s yste m-sp ecific co nfigu rati on

The configuration for the database platform

The configuration valid for all platforms

The standard configuration – current user, selection of background server bybackground dispatcher, high priority

Procedure

1. From the DBA Planning Calendar, choose Goto Backend Configuration .

2. In Selected Scope, choose the scope of the configuration entry.

3. In Background Dispatching, choose appropriate values as follows:

Field Meaning

BackgroundServer

Specifies the server, where scheduled jobs are executed

If no server is specified, the background job dispatcher dynamicallyselects the server.

Job PrioritySpecifies the priority of the job

If no priority is specified, jobs run with default priority (medium).

UserName of the user to execute the job

If no user is specified, the dialog user is used.

4. Save your changes.

6.2.1.2 Scheduling an Action1. To add new actions to the DBA Planning Calendar, you can use one of the following

options:

Page 149: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 149

Double-click a calendar cell.

Position the cursor on a calendar cell and choose Add.

Drag and drop an action from the action pad into a calendar cell.

Note

You can also use drag and drop to move actions within the calendar. If you want tocopy an action, keep the CTRL key pressed while using drag & drop.

End of the note.

A dialog box appears with the details of an action.

2. If you chose the first or second option in the first step, you can select the action youwant to schedule from the group box Action Description. In the Planned Start field,you can enter date and time when the action is to start. If you are entering an actionfor today and want to start the action immediately, choose Execute.

If you chose the final option in the first step, the corresponding action is already listedas default.

The parameters for the required action are displayed under Action Parameters. Theyvary depending on the action.

3. On the Action Parameters tab page, change or enter the basic parameters for theaction.

4. On the Recurrence tab page, enter a recurrence pattern.

Parameter Description

RecurrencePattern

Interval for the action in weeks, days or hours

Depending on the selected recurrence pattern, you need to specify thepattern in more detail, that is the days of the week for weeks and thehours of the day for a daily period. The action is repeated at theinterval you enter. If you select Once only, the action is executed onlyonce.

RecurrenceRange

Range of time where the action recurs, that is for a specific timeinterval or for a limited number of occurrences

Page 150: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

150 April 2007

Caution

The system warns you if there is a conflict with an existing action, but it does notprevent you from inserting the new action.

You must decide whether the actions might conflict in terms of database accessor performance. The system does not check for conflicts between actions withidentical start times, but checks for actions within a range of approximately 30minutes.

End of the caution.

5. To schedule the action, choose Add.

Result

The schedule of the DBA Planning Calendar is updated.

6.2.1.3 Changing an ActionThis section tells you how to change an action in the DBA Planning Calendar.

If you want to change a recurring action, the changes only affect recurrences of the action inthe future. The action is split into two actions, one describing the old action and one the newaction.

Prerequisites

If you want to change an action, it must be in the state Planned (that is, not alreadyexecuted).

Note

If an action has already been executed, you can only display it. For more information, seeDisplaying Scheduled Actions [Page 152].

End of the note.

Procedure

1. Call the DBA Cockpit

2. Choose Jobs DBA Planning Calendar in the navigation frame of the DBACockpit.

3. Position the cursor on a calendar cell and choose Edit.

A dialog box with the action parameters and recurrence pattern appears.

4. Apply your changes and activate them by choosing either Change CurrentOccurrence or Change All Occurrences.

More Information

Scheduling an Action [Page 148]

Page 151: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 151

6.2.1.4 Deleting an ActionPrerequisites

If you want to delete an action from the DBA Planning Calendar, it must be in the statePlanned (that is, not already executed).

Note

If an action has already been executed, you can only display it. For more information, seeDisplaying Scheduled Actions [Page 152].

End of the note.

Procedure

1. Call the DBA Cockpit.

2. Choose Jobs DBA Planning Calendar in the navigation frame.

3. Double-click a calendar cell or position the cursor on a calendar cell and chooseDelete.

A dialog box appears with a list of all actions to be deleted, where you can decide ifyou want to delete only a single occurrence of a recurring action or all occurrences.

4. To delete an action, choose Delete.

6.2.1.5 Executing an ActionUse

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

Procedure...

1. Double-click the action you want to re-execute.

The Display Details of Action dialog box appears where you can check the actionparameters.

2. Choose Execute.

If you are sure that the action parameters are correct, you only need to positionthe cursor on the action and choose Execute.

Result

The action is rescheduled starting at the current time.

6.2.1.6 Displaying the Status of a Day’s Actions1. Double-click the header cell for a particular day.

The display switches to the day view. All scheduled actions are displayed.

Page 152: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

152 April 2007

Note

Unsuccessful or interrupted actions are shown in red.

End of the note.

2. If you want to view other days, select a new day by double-clicking a day on thecalendar control at the left side of the screen.

3. To return to the week view, choose Week.

6.2.1.7 Displaying Scheduled ActionsFrom 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 isinserted.

Select the action by double-clicking a calendar cell or by positioning the cursor on a cell andchoosing Action Details.

The Display Details of Action dialog box appears. In the Action Description group box,scheduling information and the return status of the finished action is displayed.

Action Parameters

The system displays tablespaces containing tables and indexes that need to be reorganized.

Recurrence

This tab page only appears if the action is part of a recurring action.

Caution

The timestamp is used to assign logs to scheduled actions. An action log is assigned to theaction which has the same type and the closest corresponding timestamp. In some cases, forexample, if no background work process is available, the action is delayed and evenpostponed until after the next scheduling time. Unfortunately, this means that the action log isthen assigned to the next scheduling time and the original scheduling time log is incorrect.This is the case if the logs for the previous schedules are displayed for the next schedule ofthe same type.

End of the caution.

Job Log

The background processing job log generated by the action is displayed under Job Log. Allmessages that have been written by the background job are also displayed.

To display long texts, if any are available, double-click a message.

Page 153: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 153

Program Log

Some actions write log files onto the database server. If such a program log exists, it isdisplayed on this tab page.

6.2.1.8 TroubleshootingSince any action scheduled in the DBA Planning Calendar can fail, you must at least checkthe more critical actions such as database backups.

Procedure

1. To check whether the background job was executed correctly, consult the job log. Ifno job log exists, the background job was probably not started.

For more details, call transaction SM37 and display the job overview.

Note

The names of all jobs scheduled in the DBA Planning Calendar start with DBA. Thejob log also tells you whether an external program was started.

End of the note.

2. If you are sure that the background job ran successfully, consult the job log orprogram log (if available).

3. After you have corrected the error, execute the action manually using Execute,making sure there are no conflicts with other scheduled actions.

6.2.1.9 Updating StatisticsYou can use the DBA Planning Calendar to schedule an update of the database statistics. Ingeneral, DB2 updates the database statistics automatically using its automatic RUNSTATSfunction.

If the automatically maintained statistics need to be up-to-date or if a different type ofstatistics – other than DB2’s default – is required, you can schedule the job RUNSTATS andREORGCHEK for Single Table using the DBA Planning Calendar. This job performs aRUNSTATS 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 recommendthat you schedule the job RUNSTATS and REORGCHEK for Single Table to run outsidenormal working hours, for example, on Sundays.

Procedure

1. In the Action Pad of the DBA Planning Calendar, choose RUNSTATS andREORGCHEK for Single Table and drag and drop it in the calendar frame.

The Schedule a New Action dialog box appears.

Page 154: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

154 April 2007

2. Specify the required parameters.

The parameters that you have to specify are the same as for RUNSTATS Control asin described in Space: Single Table Analysis [Page 93] – except Number of ParallelJobs.

By setting the value for Number of Parallel Jobs higher than one, the RUNSTATS jobcan be parallelized if there are enough system resources available (for example,background processes and the appropriate number of processors). Doing so resultsin additional jobs that are scheduled by the regular DB13 job and which perform theRUNSTATS on tables in parallel. The SAP system makes sure that the number ofparallel jobs does not exceed the number of available background processes.

Caution

However, you have to handle the parameter Number of Parallel Jobs with carebecause starting more jobs can have a high impact on the overall systemperformance even though it will significantly reduce the amount of time for the jobexecution.

End of the caution.

6.2.1.10 Scheduling a REORGCHK for All TablesYou can use the DBA Planning Calendar to schedule an overall check of all tables using thejob REORGCHK for All Tables.

Note

REORGCHK for All Tables is a prerequisite for the analysis of table and index details.Without scheduling this job, the analysis of tables and indexes in the Space task area will notwork correctly.

End of the note.

Procedure

1. In the Action Pad of the DBA Planning Calendar, choose REORGCHK for all Tablesand drag and drop it in the calendar frame.

The Schedule a New Action dialog box appears.

2. Specify the required parameters:

Parameter Description

All TablesSpecifies that the job is called for all tables

By default, this parameter is selected.

Selected Tables

Specifies that this job is restricted to a set of tables

If you choose this option, you also have to specify the TableSchema and Table Name.

Note

Page 155: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 155

Parameter Description

Only choose this option if you require an up-to-date analysis forthe selected tables.

End of the note.

CompressionCheck Analyzes the tables and checks for candidates to be compressed.

MaximumRuntime Restricts the runtime of this job

6.2.1.11 Reorganizing TablesYou can use the DBA Planning Calendar to schedule a reorganization of a set of tables. Ingeneral, DB2 reorganizes the tables using its automatic REORG function. If a reorganization isrequired that is not covered by automatic REORG, for example, table compression. Therefore,you are able to schedule the job REORG and RUNSTATS for Set of Tables using the DBAPlanning Calendar.

Procedure

1. In the Action Pad of the DBA Planning Calendar, choose REORG and RUNSTATSfor Set of Tables and drag and drop it in the calendar frame.

The Schedule a New Action dialog box appears.

2. Specify the following parameters:

Parameter Description

TableSchema Name of the schema to which the table belongs

Table Name of the table

Offline

Schedules an offline reorganization.

Optionally, you can also specify the following parameters:

Use Temporary Tablespace

If you select this option, a temporary tablespace is used for thereorganization.

Note

If no temporary tablespace is used for the REORG, it is performedin the tablespace where the table or index resides. You mustmake sure that there is enough free space in this tablespace(approximately the size of the table or index). If this tablespacealready has a high I/O load, we recommend that you use a

Page 156: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

156 April 2007

Parameter Description

temporary tablespace for performance reasons.

End of the note.

With Long Fields and LOB Data

If you select this option, long field and LOB data areas are alsoreorganized.

Keep Dictionary

If you select this option, a compression dictionary is kept and notrebuilt.

Note

This option is valid only for compressed tables.

End of the note.

Online Schedules an online reorganization of the table

All Indexes Schedules a reorganization of all indexes only

6.2.1.12 Database BackupA database backup is a complete copy of your database. To be able to restore the databaseto a consistent state that is as up-to-date as possible, you have to perform database backupson a regular basis.

Integration

You can perform database backups using the DBA Planning Calendar by calling the DBACockpit and choosing Jobs DBA Planning Calendar in the navigation frame of the DBACockpit. Depending on the storage device that you are using, you can choose one of thefollowing jobs from the action pad:

Full Database Backup into TSM

You back up the database to Tivoli Storage Manager (TSM).

Full Database Backup to Device

You back up the database to a specified tape or disk.

Full Database Backup with Vendor Library

You back up the database to any other vendor storage management product.

Activities

When scheduling one of the jobs mentioned above, the Schedule a New Action dialog boxappears. On the Action Parameter tab page, you can specify the following:

Page 157: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 157

Parameter Description

BackupMode

Online Access to the database is not blocked. The users can continue to worknormally during the backup.

Offline

The backup process connects to the database in exclusive mode. Thedatabase can be restored without log files.

Note

If you choose this option, the work processes of the SAP system will bedisconnected from the database and automatically reconnected after thebackup has finished. This prevents proper end processing of the job.

Therefore, the status of the job in the DBA Planning Calendar can bemisleading. To check whether the backup was successful, you always need tocheck the job log in addition to the job status in the overview.

End of the note.

Backup Type

Full The complete database is backed up.

IncrementalA cumulative (that is, incremental) backup image

An incremental backup image is a copy of all database data that has changedsince the most recent successful full backup operation.

IncrementalDelta

A non-cumulative (that is, delta) backup image

A delta backup image is a copy of all database data that has changed sincethe most recent successful backup operation.

Page 158: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

158 April 2007

Additionaloptions

Compress The backup is to be compressed.

Include Logs

Note

Only choose this option if you want to perform an online backup.

End of the note.

Only those log files are included in the backup that are required to get aconsistent database. Any further log files are not taken into consideration.

The following options are available for downward-compatibility reasons and we stronglyrecommend that you do not set them:

Number of Buffers

Buffer Size

Parallelism

Backup Considerations

When performing a backup, you should consider the following:

Regardless of the selected backup mode, you can only restore the database if youhave at least one valid full backup.

To restore the database completely and to bring the system up-to-date, you have toroll in the log files that were generated after the backup was performed.

The database may be local or remote. The backup, however, remains on thedatabase server unless a storage management product, for example, Tivoli StorageManager (TSM), is used.

After an online backup, DB2 forces the currently active log files to be closed and as aresult they are archived. Thus, an online backup has a complete set of archived logfiles that are available for database recovery.

Backup of a Multi-Partition Database

You have to back up partition by partition. Therefore, you have to schedule backup jobs foreach partition.

In a multi-partition database system, keep a copy of file db2nodes.cfg with any backupcopy that you take. This copy of file db2nodes.cfg is used as a safety copy in case ofpossible damage to the original file.

Page 159: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 159

Frequency of Backups and Time Required

You should take full database backups on a regular basis, regardless of how often log filesare archived. A current full backup means that there are fewer archived log files that you haveto apply in case of a database recovery. Thus, the amount of time required by theROLLFORWARD utility to recover the database decreases. In addition, the chance of a logfile 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 youconsider performing online backups.

Note

You can only use an online backup for recovery if the database log files that were createdduring 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 documentation Data Recovery and HighAvailability 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 backupbased on a file system, see the documentation Database Administration Guide: SAPon IBM DB2 Universal Database for UNIX and Windows.

Standby database for backup purposes

For more information about how to use the db2inidb tool to create a standbydatabase for backup purposes, see the documentation Database AdministrationGuide: SAP on IBM DB2 Universal Database for UNIX and Windows.

6.2.1.13 Archiving Log Files To TapeYou can archive log files to tape using the job Archive Log Files to Tape in the DBA PlanningCalendar.

Procedure

1. In the Action Pad of the DBA Planning Calendar, choose Achive Log Files to Tapeand drag and drop it in the calendar frame.

The Schedule a New Action dialog box appears.

2. Specify the required parameters.

Page 160: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

160 April 2007

Note

The DB2 tape manager is used to archive log files to tape. Besides the standardparameters (for example, start time, date, number of log files to be saved and tapelabel), you can also specify the option of the tape manager to use for archiving logfiles:

o Double Store

o Overwrite Expired Tapes

o Eject Tape at End of Operation

For more information about these options and how to use them, see the documentIBM DB2 Universal Database for UNIX and Windows: New Log File Management thatis available on the SAP Developer Network at https://www.sdn.sap.com/irj/sdn/db6SAP on DB2 for Linux, UNIX, and Windows Knowledge Center Key TopicsAdministration .

6.2.1.14 Scheduling ScriptsYou can use scripts to schedule time-consuming and non-standard database administrationtasks using the job CLP Script.

Procedure

1. In the Action Pad of the DBA Planning Calendar, choose CLP Script and drag anddrop it in the calendar frame.

The Schedule a New Action dialog box appears.

2. Specify SQL statements directly as job parameters.

Note

Alternatively, you can use scripts that have been created before. For moreinformation, see SQL Script Maintenance [Page 161].

End of the note.

6.3 The DBA LogThe DBA log provides information on protocol records written by all database-relatedprograms of the CCMS and SAP-DB2 admin tools.

You can access the DBA log by calling the DBA Cockpit and choosing Jobs DBA Log inthe navigation frame of the DBA Cockpit.

Page 161: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 161

The following information is displayed on the Jobs: DBA Action Log screen:

Column Description

Start Date Start date of action

Start Time Start time of action

End Date End date of action

End Time End time of action

Runtime Runtime in HH:MM:SS

Action Description of action

Return Code Return code of action

When you access the DBA log for the first time, the system displays the log information forthe current week.

If you want to display information on previous weeks, double-click a day in the correspondingweek in the calendar control.

If you only want to display certain log records, choose one of the following icons:

Icon Meaning

Total Total number of all log records

Errors Displays jobs that finished with an error. These jobs should be executed again

Warnings Displays jobs that finished with a warning

OK Displays log records of jobs that were completed without errors

6.4 The SQL Script MaintenanceYou use the function SQL Script Maintenance to manage your own DB2 scripts.

Integration

The SQL Script Maintenance is part of the Computing Center Management System (CCMS).You can access it using the DBA Cockpit.

Page 162: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

162 April 2007

Activities

To access the SQL Script Maintenance, call the DBA Cockpit and choose Jobs SQL ScriptMaintenance . The Jobs: SQL Script Maintenance screen appears and all the scriptslocated on your local monitoring system are displayed.

You can perform one of the following actions:

Display an existing SQL script

Edit an existing SQL script

Delete an existing SQL script

Add a new SQL script

Execute an existing SQL script

Displaying an SQL Script

To display an existing SQL script in detail, choose one entry from the list and choose Display.The Jobs: SQL Script Editor – Display Script screen appears.

Besides reading the script, you can also perform the following actions:

Switch to the editing mode by choosing Display <-> Change and save the scriptunder a new name by choosing Save as...

Execute the script.

Access the detail data of another script by entering its name in the Script Name field.

Editing an SQL Script

To edit an existing SQL script, choose one entry from the list of scripts and choose Edit. TheJobs: SQL Script Editor – Edit Script screen appears.

Besides modifying the script according to your requirements and saving it under a new name,you can also perform the following actions:

Switch to the displaying mode by choosing Display <-> Change.

Execute the script.

Access the detail data of another script by entering its name in the Script Name field.

Deleting an SQL Script

To delete a SQL script, choose one entry from the list of scripts and choose Delete.

Page 163: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 163

Adding a New SQL Script

1. To add a new script, choose Add.

The Jobs: SQL Script Editor – Add Script screen appears.

2. Enter a name in the Script Name field and start editing.

3. Choose Save.

Executing an SQL Script

1. To execute an existing SQL script, choose one entry from the list of scripts andchoose Execute.

The Execute SQL Script dialog box appears.

2. In the Execute SQL Script on System field, enter the name of the SAP system whereyou want the script to be executed.

3. To confirm your entry, choose Execute again.

The Jobs: SQL Script Editor – Display Script screen appears showing an editor in thelower half of the screen where the result is displayed.

Note

From each of the above mentioned screens, you can return to the Jobs: SQL ScriptMaintenance screen by choosing Back.

End of the note.

Note

As an alternative to the SQL Script Maintenance function, you can also use the DBAPlanning Calendar to execute a script by using the action SQL Script.

End of the note.

Page 164: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

164 April 2007

7 AlertsThe following sections provide information about alerts:

Alerts: Database System Monitoring in CCMS [Page 164]

Alerts: Configuring Database System Monitoring [Page 165]

Alerts: Alert Monitor [Page 166]

Alerts: Alert Message Log [Page 168]

Alerts: Alert Configuration [Page 169]

7.1 Alerts: Database System Monitoring inCCMSThe alert monitor analyzes and maintains configuration and snapshot data of DB2 for Linux,UNIX and Windows. It checks the contents of the admin database mirrored in the SAPsystem. If these checks find critical situations, for example, if given thresholds are exceeded,alerts are raised. This enables early recognition of critical situations by the databaseadministrator.

Integration

The monitoring functions are fully integrated into the new alert monitor and monitoringarchitecture.

Features

The following categories of information are currently monitored:

Disk space of the tablespaces and file systems required for the database system

Parameters relevant to performance

o Access behavior of database buffers

o Lock behavior of the application, monitoring of deadlock situations and lockescalations

Availability of backup and recovery mechanisms

o Last available backup

o Availability of the log files necessary to achieve the current state of thedatabase from the last available backup.

Page 165: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 165

Configuration parameters

Availability data of tablespaces and containers

Recommendation

We recommend that you check the information displayed on database systemmonitoring daily in the alert monitor.

More Information

Alerts: Configuring Database System Monitoring [Page 165]

Alerts: Alert Message Log [Page 168]

Alerts: Alert Configuration [Page 169]

7.2 Alerts: Configuring Database SystemMonitoringDB2 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 configuring database system monitoring:

Configuration using general alert monitoring consisting of:

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 defineyourself 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.

Page 166: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

166 April 2007

4. Select this entry and choose List Selected Entries Edit (or Edit in theapplication toolbar).

The Monitoring: Tool Administration screen appears.

5. Choose Parameter.

6. Choose Tool Definitions Display Change (or Display Change in the applicationtool bar).

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

8. In the RECIPIENT line in the Parameter value column, enter a valid user for yourSAP 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 Method Execution Activate BackgroundDispatching .

Caution

If you do not enable your system for background monitoring, the system will not bemonitored at all.

End of the caution.

Configuring DB2-Specific Parameters

You can specify additional parameters, for example, assignment of logged values for givenalerts.

For more information on specifying these additional parameters, see Alerts: AlertConfiguration [Page 169].

7.3 Alerts: Alert MonitorYou can choose one of the following options to retrieve information about alerts:

To get a short overview of alert situations, choose Alerts Alert Monitor in thenavigation frame of the DBA Cockpit.

Note

You are able to directly display the message log for a certain alert by double-clickingthe corresponding item.

End of the note.

Page 167: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 167

To start a detailed analysis, call transaction RZ20 and choose SAP CCMS MonitorTemplates Database DB2 Universal Database for NT/UNIX in the tree structureCCMS monitor sets.

Note

If you want to use transaction RZ20 for remote database systems, choose SAPCCMS 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 ofmessage:

Message Type Color

Information Green

Warning Yellow

Error Red

Note

If a check resulted in a warning or an error, a short text is additionally displayed next to theparameter.

End of the note.

Page 168: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

168 April 2007

7.4 Alerts: Alert Message LogYou can access an overview of the results of system monitoring by calling the DBA Cockpitand choosing Alerts Alert Message Log in the navigation frame of the DBA cockpit. TheAlerts: Alert Message Log screen appears.

Only the most important data is displayed in the overview. The results are displayed as notes,warnings or errors and are ordered by log date as default.

You can use the list boxes in the Current Selection group box to limit the display to specificerror levels, check categories, or partitions (only for multi-partition database systems). TheObjects and Attributes fields enable restrictions to single attributes. Additionally, you canspecify a time period for which the messages are displayed. The message of the last sevendays are displayed as default.

You can display more detailed information by selecting a line and choosing Details. TheAlerts: Alert Message Details screen appears. If you have selected more than one line, youcan use the page buttons on the screen to navigate between them.

The detail screen is divided into the following group boxes:

Alert Message Details

Complete description of the attribute, as displayed in the alert monitor tree

Logged Data

Information on the message, for example, type of error, reported value, and date andtime when it occurred

Description

Description of the type of error and which value or parameter is being monitored

Deleting Alert Messages

You can delete messages from any given time period by selecting a line and choosingDelete. If you choose Delete without selecting a line, 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 enterthe category or partition as selection criteria.

It is also possible to delete a selected alert message in the detail screen.

To ensure that the log table does not get too large, automatic clean-upprograms run and delete entries older than thirty days.

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.

Page 169: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 169

4. You can display information on:

Space management

Performance

Backup/restore

SAP consistency

Health

The checked parameters are displayed in the following colors depending on the type ofmessage:

Message Type Color

Information Green

Warning Yellow

Error Red

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

7.5 Alerts: Alert ConfigurationDB2 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 allthe configuration entries.

You can access alert configuration by calling the DBA Cockpit and choosing Alerts AlertConfiguration in the navigation frame of the DBA Cockpit. The Alert Configuration Overviewscreen appears.

On this screen, you can display details, sort entries, and make selections using the list boxes.In addition, you can activate or deactivate an entry by selecting the corresponding cell in theActive column.

Caution

If you deactivate an entry, there is no further notification of corresponding alerts.

End of the caution.

Page 170: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

170 April 2007

If you want to configure additional parameters, you can double-click a cell in the table orselect a line and choose Details. The Alerts: Display Configuration screen appears providingthe following information:

Threshold

This tab page is divided into three group boxes showing the respective status:

o Normal State

o Warning

Limited operation, for example, with reduced performance

o Error

Normal operation is endangered if the error is not corrected.

In each of these group boxes you can configure three values according to which thesystem is monitored:

o Relational operators

You can specify how the defined comparison value should be compared withthe current given value. In addition to the relational operators, you may enterwhether a value should lie inside of or outside of a range of values. A fullcolon ( : ) must separate the two values. You may also specify whether or notdiscrete values are within a set of explicit values. Semicolons ( ; ) mustseparate such values.

o Comparison value

You can specify a value, a list of values or a value range depending on theoperator. This value will later be compared with the current measured value.

o Unit of measurement of the comparison value

You can specify the unit of measurement of the comparison value. This isimportant for time values, which are normally calculated internally in seconds,to be correctly converted before comparison.

Additionally, you can specify whether or not you want to receive an automatice-mail notification in the event of an alert.

Note

Values do not need to be entered for every operation status. However, youmust make sure that the sum of comparison values must cover everypossible value. If this is not the case, a special alert is triggered with thefollowing message:

There is no configuration entry for the logged value

End of the note.

Page 171: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 171

General (RZ21)

This tab page displays the scheduling data from the basic alert monitor configuration.The values are displayed here for completeness. It is not possible to make changesin this transaction. You can make changes using the general maintenance function(transaction RZ21) in the alert monitor.

Administration

This tab page displays the user that made the last changes and tells you whether thisentry is currently active.After you have made your changes, save them. Changestake effect immediately.

Page 172: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

172 April 2007

8 DiagnosticsThe following sections provide information on diagnostics:

Diagnostics: Displaying the Audit Log [Page 172]

Diagnostics: Missing Tables and Indexes [Page 173]

Diagnostics: Deadlock Monitor [Page 174]

Diagnostics: SQL Commands [Page 179]

The EXPLAIN Function [Page 180]

Diagnostics: The Index Advisor [Page 185]

Diagnostics: Cumulative SQL Trace [Page 190]

Diagnostics: DBSL Trace Directory [Page 191]

Diagnostics: Trace Status [Page 191]

Diagnostics: Database Notification Log [Page 193]

Diagnostics: Database Diag Log [Page ]

Diagnostics: Dump Directory [Page 196]

Diagnostics: DB2 Help Center [Page 196]

8.1 Diagnostics: Displaying the Audit LogYou can track changes to the database made from the DBA Cockpit and to the monitoringsetup using the maintenance actions provided in the DBA Cockpit. Changes made fromoutside – for example, using native database commands – are not displayed here.

Procedure

1. Call the DBA Cockpit.

2. In the navigation frame, choose Diagnostics Audit Log .

The Diagnostics: Audit Log screen appears. The audit log consists of the followingfields:

Field Description

Date Start date of the action

Time Start time of the action

System Target system on which the action was performed

Action Type of action (name of the action in the DBA Cockpit)

Command Type of command (for example, ADD, DELETE or EDIT)

Page 173: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 173

Field Description

Object Name of the modified object (for example, database or tablespacename)

User Name of the SAP user who performed the action

FromSystem System from where the action was performed

3. By default, the system displays all audit entries logged during the current week. If youwant to display another week, double-click a day in the calendar.

To display more than one week, you can change the value in the field Number ofDays.

4. To display the details of an action, select the corresponding action and chooseDetails.

In the lower half of the screen, the SQL statements that have been executed aredisplayed.

8.2 Diagnostics: Missing Tables and Indexes

This function is only available for local systems or for systems for which an RFCdestination has been assigned.

You can find out whether tables or indexes are missing from either the database or the ABAPDictionary by calling the DBA Cockpit and choosing Diagnostics Missing Tables andIndexes in the navigation frame of the DBA Cockpit.

The results of the last consistency check are displayed in a tree structure that is grouped intothe following sections:

Section Description

Objects missing from the database Objects that are defined in the ABAPDictionary, but not found in the database

Unknown objects in the ABAPDictionary

Objects that are found in the database,but not defined in the ABAP Dictionary

Inconsistent objects Results of the detailed comparison of theABAP Dictionary and the database aredisplayed here

Page 174: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

174 April 2007

Other checks Different checks are performed here:

It is checked whether the primaryindex of tables defined in the ABAPDictionary was created uniquely onthe database.

Objects in the SAP system tablesare checked, which cannot bedescribed at all or which cannot becompletely described in the ABAPDictionary for technical reasons.

If inconsistencies for these objectsare detected, they are alsodisplayed here. In general,additional information on the type ofinconsistency will be provided.

Optional indexes Mismatch between ABAP Dictionary anddatabase regarding secondary indexes

If the database structure has been changed since the last consistency check, chooseRefresh.

For the local system you can:

Create objects that are defined in the ABAP Dictionary, but not found in the database,by selecting the object and choosing Create on DB

Display the definition of an object by double-clicking the object

To ensure consistency between ABAP Dictionary and database, the consistencycheck should be performed once a month or when database structure changeshave happened.

8.3 Diagnostics: Deadlock MonitorThe deadlock monitor records and analyzes deadlocks. Deadlocks occur when two or moreapplications lock each other. Each application is waiting for the other to release the lock. DB2automatically detects and resolves the deadlocks after a specified time period. This timeperiod is specified by database configuration parameter DLCHKTIME.

The data recorded provides detailed information about all involved database transactions. Inaddition, you can display the complete statement history of each transaction including thevalues that are bound to each statement.

Caution

Due to the detailed information that the deadlock monitor provides for each transaction,activating it can have a considerable impact on the system performance.

End of the caution.

Page 175: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 175

Integration

The deadlock monitor is part of the Computing Center Management System (CCMS). Youcan access the deadlock monitor by calling the DBA Cockpit and choosing DiagnosticsDeadlock Monitor in the navigation frame of the DBA Cockpit.

Activities

You can perform the following actions:

If it does not exist yet, you first have to create a deadlock monitor [Page 174].

You analyze deadlock monitor information [Page 176].

You stop the deadlock monitor by choosing Stop Monitor.

You reset the deadlock monitor by choosing Reset. The recorded data is deleted andyou can restart analyzing new deadlock situations.

You drop the deadlock monitor and all related tables by choosing Monitor DropMonitor .

Note

If you want to move the deadlock monitor tables into a different tablespace, you mustdrop the deadlock monitor and recreate it.

End of the note.

8.3.1 Creating the Deadlock MonitorAs long as the system cannot find an existing deadlock monitor, the message No DeadlockMonitor found on system <system_name> is displayed.

You then need to create and start the deadlock monitor.

Procedure

1. Call the DBA Cockpit.

2. Choose Diagnostics Deadlock Monitor in the navigation frame of the DBACockpit.

The Diagnostics :Deadlock Monitor screen appears.

3. Choose Create Deadlock Monitor.

The Create Deadlock Monitor: Introduction dialog box appears.

4. Choose Continue.

Note

If you are using DB2 Version 8 FixPak 10 or higher, you can also specify the buffersize of the deadlock monitor.

End of the note.

Page 176: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

176 April 2007

5. On the second screen of the dialog box, choose the tablespace where the deadlockmonitor tables should reside. The drop-down list displays all the tablespaces that arecurrently available.

Recommendation

The deadlock monitor works with an internal buffer that is allocated in the monitorheap of the database. If this buffer runs out of space or if the deadlock monitor getsflushed by the user, the recorded data is written to disk.

Depending on the system workload, the deadlock monitor tables can grow up toseveral GB in size. We therefore recommend that you use a separate tablespacemanaged by DB2’s automatic storage management.

6. Choose Create Monitor.

7. To start the deadlock monitor, choose Start Monitor.

8.3.2 Deadlock Monitor AnalysisWhen you have created and started the deadlock monitor, the following information isdisplayed on the Diagnostics: Deadlock Monitor screen:

The main view

Locks held

Statement history (per agent)

Statement history (per deadlock)

Main View

All recorded deadlocks are displayed using a tree structure. For each recorded deadlock, theroot node Deadlock Victim: <rolled back application name> is displayed as well as the dateand time when the deadlock was detected.

If you open the subnodes of a root node, a hierarchic structure appears displaying data asfollows:

Deadlock Victim <Application Name of rolled-back Agent>

o Agent <Agent ID> (<Application Name>) waiting for Agent <Agent ID>

Client Process ID: <Process ID>

Host: <Host>

Authorization ID:<DB2 User>

Lock Agent is waiting for:

Table: <Schema>.<Table>

Lock Object Type: <Lock Object Type>

Page 177: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 177

Lock Current Mode: <Lock Mode>

Requested Lock Mode : <Lock Mode>

Displaying Agent Details

To display further details about the agents involved, choose Agent Details. The DiagnosticsDeadlock Monitor – Agent Details screen appears. The following information is displayed:

Locks Held

Column Description

TableSchema Name of the schema to which the table belongs

Table Name Name of the database table

Lock ModeMode of the lock held

If the Lock Status is Waiting, this is the lock mode which the agent is intendedto request.

Lock ObjectType Type of object to be locked

Lock Status

Status of lock request:

Granted

Waiting

LockEscalation Indicates if a lock request was made as part of a lock escalation

Lock Count Number of locks on the lock being held

Lock HoldCount

Number of holds placed on the lock

Holds are placed on the locks by cursors registered with the WITH HOLDclause and some DB2 utilities. Locks with holds are not released whentransactions are committed.

LockAttributes Lock attributes

Page 178: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

178 April 2007

Statement History (per Agent)

Column Description

Last UseTime Timestamp when the statement was last executed

StatementText

Displays the complete statement

If the statement does not fit completely in the column, choose Details ordouble-click the row to get the complete statement text.

Isolation This element shows the isolation value in effect for the statement while it wasbeing run.

Opt. Level Optimization level

QueryDegree

The query degree specifies the intra–partition parallelism for the execution ofSQL statements.

StatementType

Statement type:

Dynamic

Static

To display more detailed information, select a row and choose Details. Alternatively, you candouble-click a field in a table row. As a result, the complete statement text is displayed in theeditor window.

In addition, the values bound to the SQL statement at execution time are displayed:

Column Description

Val. Index Value index (parameter marker index) in the statement text

Val. Type Data type of the value

Data Data

Null Value is null.

Reopt Value is used for REOPT.

Page 179: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 179

Statement History (per Deadlock)

To display the statement history of an entire deadlock situation, choose Statement History.The Diagnostics Deadlock Monitor – Statement History screen appears.

The following information is displayed:

Column Description

Last UseTime Timestamp when the statement was last executed

Agent ID ID of the agent that executed the SQL statement

StatementText

Displays the complete statement

If the statement does not fit completely in the column, choose Details ordouble-click the row to get the complete statement text.

Isolation This element shows the isolation value in effect for the statement while it wasbeing run.

Opt. Level Optimization level

QueryDegree

The query degree specifies the intra–partition parallelism for the execution ofSQL statements.

StatementType

Statement type:

Dynamic

Static

To display more detailed information, select a row and choose Details. Alternatively, you candouble-click a field in a table row. As a result, the complete statement text is displayed in theeditor window.

In addition, the values bound to the SQL statement at execution time are displayed:

Column Description

Val. Index Value index (parameter marker index) in the statement text

Val. Type Data type of the value

Data Data

Null Value is null.

Reopt Value is used for REOPT.

8.4 Diagnostics: SQL Commands

Page 180: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

180 April 2007

This screen provides a virtual DB2 command line processor.

You can access it by calling the DBA Cockpit and choosing Diagnostics SQL Commandsin the navigation frame. The Diagnostics: SQL Command Execution screen appears.

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 storedprocedure. The data is displayed in the same way as the corresponding CLP commands.

Note

If you enter an SQL commands that manipulate data, an error occurs

End of the note.

8.5 The EXPLAIN FunctionYou can use this function to explain all SELECT, INSERT, UPDATE or DELETE statements.

The statements may contain optional comments such as --OPTLEVEL( <optlevel> ) --QUERY_DEGREE(< query_degree> --LOCATION( <report> , <position> ). If nocomments are specified, the statements are explained using the default <optlevel> and default<query_degree> for the work process.

You can call the EXPLAIN function in the following ways:

Call the DBA Cockpit and choose Diagnostics EXPLAIN in the navigation frame ofthe DBA Cockpit. On the Diagnostics: EXPLAIN screen, enter an SQL statementmanually and choose Explain.

Call the DBA Cockpit and choose Performance Applications in the navigationframe of the DBA Cockpit. For more information, see Applications: Statements [Page67].

Call the DBA Cockpit and choose Performance SQL Cache in the navigation frameof the DBA Cockpit. For more information, see Performance: SQL Cache [Page 71]

Call the DBA Cockpit and choose Diagnostics Cumulative SQL Trace in thenavigation frame of the DBA Cockpit. For more information, see Diagnostics:Cumulative SQL Trace [Page 190].

Call transaction ST05 and choose Enter SQL statement. Enter an SQL statementmanually and choose Explain.

If a statement cannot be explained, the ERROR: Check SQL Statement screenappears 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 chooseExplain.

Page 181: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 181

Access Plan of a StatementIf a statement was explained successfully, the Display Execution Plan for SQL Statement screenappears, providing information on the SQL statement text, the OPTLEVEL and QUERY_DEGREE thatwas 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 alldatabase operations that will be performed when the statement is executed.

The estimated execution time is displayed in timerons (arbitrary IBM time unit). All operators arenumbered, starting with zero. Operators can have the following extensions:

Extension Description[O]/[I] Shows whether the operator acts as an outer/inner input branch

for a subsequent join operation

(<Partition>) 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 tablesand indexes of volatile tables are displayed in orange.

For each index used in the access plan, the number of key columns, that means index fieldsthat were really used within the access plan, is displayed.

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

See also:For additional information on the EXPLAIN function, see SAP Note 400938.

For more general information, see the IBM documentation: Administration Guide: Chapter 26,SQL Explain Facility.

8.5.1 EXPLAIN OptionsOn the Display Execution Plan for SQL Statement screen, the following options are available:

Option Description

Details If no operator in the access plan is highlighted when choosingthis option, a dialog box is displayed providing detailedinformation on the statement and each operator. This output issimilar to the one of the DB2 command line tool db2exfmt.For more information, see the IBM documentationAdministration Guide, Appendix I.

If operator no. 0 is highlighted, only the original statement andoptimized statement are displayed in a separate dialog box.

If any other operator is highlighted, the system displaysdetailed information on the selected operator only.

Page 182: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

182 April 2007

Optimizer The access plan may vary depending on the optimizerparameters specified. When you choose this button, theChange Query Optimization dialog box appears where youcan change the parameters OPTIMIZER LEVEL, QUERYDEGREE and the flag VOLATILE for the tables used in theaccess plan. To explain the statement with new parameters,choose Explain Again.

DB Catalog With this option, you can display system catalog informationon tables and indexes that are shown in the access plan. Thefollowing information is displayed:

For a table:Selected information from table SYSCAT.TABLES isdisplayed. Additionally, all indexes of the table are displayedwith their index columns.

For an index:Selected information from table SYSCAT.INDEXES for thisindex is displayed. Additionally, selected information fromtable SYSCAT.COLUMNS is displayed for all indexcolumns.

Depending on whether you have selected a table or an index,the following buttons are available:

Table

Displays selected information from tableSYSCAT.TABLES

Additionally, all indexes of the table are displayed withtheir index columns.

Columns

Displays selected information from tableSYSCAT.COLUMNS for all table columns

Indexes

Displays information from table SYSCAT.INDEXES for allindexes of the table as well as information from tableSYSCAT.COLUMNS for all index columns

Update Statistics

Updates the catalog statistics for the table

If the catalog statistics were updated successfully, thefield <stats-time> is displayed in green.

Table

Displays selected information from tableSYSCAT.TABLES

Additionally, all indexes of the table are displayed withtheir index columns.

Page 183: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 183

Dictionary With this option, you can display the ABAP Dictionarystructure (definition) of a table by selecting the table in theaccess plan.If you do not select a table in the access plan, the ABAPDictionary structure (definition) of the first dictionary object ofthe SQL statement is displayed.

With this option, you can display the structure of views, eventhough views never appear in the access plan.

This function is not available for systemsmonitored using a remote database connection.

Test Execution This option is only available, if a:

SELECT statement is explained using transaction ST05Trace list, the parameter values for all parameter

markers of the statement are provided and the operationis other than PREPARE

SELECT statement without parameter markers isexplained

When you use the EXPLAIN function, the entered SQLstatement is only prepared and the access plan of theoptimizer is chosen because of the system catalog statistics.On the basis of this information the optimizer estimates thecosts for the execution of this statement.

However, the estimated costs may not correspond to the realexecution time. Reasons for this might be bad statistics, a baddatabase layout or problems of the optimizer itself.

The Test Execution option measures the real execution timeand provides other snapshot data, such as the number ofbuffer pool accesses and sorts for the selected statement.When the statement is executed, the parameter markers arereplaced by the actual parameter values. A dialog box appearswhere you can change these values to investigate thedependence of the execution time from these values.

The result of several test executions of the same statementcan vary because, for example, the buffer pool may alreadycontain data that is necessary for the execution.

This function is not available for systemsmonitored using a remote database connection.

Page 184: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

184 April 2007

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 informationwhen you choose Details.

Edit When choosing this option, the system switches to an editorwindow in which you can modify the selected SQL statementand explain it again.

Source This option is only available when the statement contains aLOCATION comment, for example, when you call EXPLAINusing transaction ST05 Trace list.

The location of the statement in the ABAP source code isdisplayed in a separate window.

This function is not available for systemsmonitored using a remote database connection.

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

Page 185: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 185

8.6 Diagnostics: The Index AdvisorTo improve the performance of a query, you can retrieve recommendations about usefulindexes using the index advisor. In addition, you are able to design new virtual indexes thatcan be validated before they are actually created. You access the index advisor by calling theDBA Cockpit and choosing Diagnostics Index Advisor in the navigation frame.

Activities

You use the index advisor to perform one of the following actions:

To determine and recommend new virtual indexes that do not yet exist

On the basis of a given SQL statement, the DB2 Design Advisor determines andrecommends new virtual indexes that could improve the performance of the querybefore the query is executed. For more information, see Retrieving IndexRecommendations [Page 186].

Page 186: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

186 April 2007

To create user-defined virtual indexes

You use the recommended values that are provided by the DB2 Design Advisor, tocreate an index specifically tailored for your requirements. For more information, seeDefining Virtual User-Defined Indexes [Page 188].

To include the indexes in the EXPLAIN function when explaining a query

Thus, you can check if the virtually defined indexes would improve the performanceof the query. For more information, see Validating Indexes Using the EXPLAINFunction [Page 189].

8.6.1 Retrieving Index Recommendations1. Call the DBA Cockpit

2. Choose Diagnostics Index Advisor in the navigation frame of the DBA Cockpit.

The Diagnostics Index Advisor screen appears.

3. In the SQL Statement editor field, enter the SQL statement that you want toinvestigate.

4. Choose Recommend Indexes.

The DB2 Design Advisor evaluates existing indexes on the affected tables. If the DB2Design Advisor cannot find an appropriate index in the system catalog, the toolrecommends one or more indexes that might improve the performance of the query.

The result is displayed in the following table:

Column Description

Index Name Name of index

Type

o Existing (not-used)

Index exists in the system catalog, but for the investigated SQLquery it is not identified as usable by the DB2 optimizer.

o User-Defined

Index has been virtually defined by the user to determinewhether such an index could be used to improve the queryperformance. 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 fornew indexes to be created.

Note

Page 187: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 187

Column Description

Existing indexes are displayed with a green background color.Virtual indexes are displayed with a red background color.

End of the note.

Exists

o Yes

Index exists in the database.

o No

Index is a virtual index.

Table Name Table on which the index is defined

Schema Name of the index schema

Uniqueness

Specifies a unique rule:

o Primary Key

o Unique

o Duplicates Allowed

NLEAF Number of leaf pages

NLEVELS Number of index levels

Rev. Scans

o Yes

Index supports reverse scans.

o No

Index does not support reverse scans.

Columns Number of columns in the key plus the number of included columns ifthere have been any defined

INCLUDEs Number of included columns

ColumnNames List of column names

Note

If you do not want to display indexes that are not used, you can set a filter on thetable accordingly.

End of the note.

Page 188: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

188 April 2007

8.6.2 Defining Virtual User-Defined IndexesIn addition to the indexes that the DB2 Design Advisor recommends, you are also able todefine virtual user-defined indexes and validate their use by calling the EXPLAIN function.

Procedure

1. Call the DBA Cockpit.

2. Choose Diagnostics Index Advisor in the navigation frame of the DBA Cockpit.

3. In the SQL Statement editor field, enter the SQL statement that you want toinvestigate.

4. Choose Add Virtual Index.

The Define Virtual Index dialog box appears. To define the user-defined index,proceed as follows:

1. Enter the schema and the table on which you want define the virtual index.

2. Choose Load Table Columns.

The column names of the given table are displayed in the Table Columns Listfield.

3. To define index columns, either choose Add Column to Index or RemoveColumn From Index.

4. If you want the virtual index to be unique, select Unique.

Note

By default, all new virtual indexes are created with the Allow Reverse Scansoption on database level. However, in the ABAP Dictionary you cannot definethis option for new virtual indexes.

End of the note.

5. To continue, choose Add.

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. If you wantto remove all user-defined indexes, choose Remove User-Defined Indexes.

End of the note.

Result

You can now use the EXPLAIN [Page 180] function to validate existing, recommended andnewly created user-defined indexes.

Page 189: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 189

8.6.3 Validating Indexes Using the EXPLAIN FunctionOn the Diagnostics Index Advisor screen, choose EXPLAIN and one of the followingoptions from the drop-down list:

Only existing indexes

This option corresponds to the normal EXPLAIN function that is known from the SQLcache. Only indexes that are known from the system catalog are used to build theaccess plan.

Existing and recommended indexes

Indexes that are known from the system catalog and indexes recommended by DB2are 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 appears displaying the access plan that the DB2 optimizer considers tobe the most efficient one.

8.6.4 Creating Indexes in the ABAP Dictionary Note

This function is not available for systems 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 beenvirtually defined before but does not yet exist.

Recommendation

Additional indexes require additional space and need to be maintained when updating orinserting data in a table. We recommend that you only create additional indexes if they reallycan improve the performance of queries that put a heavy load on your database.

Procedure

1. On the Index Advisor screen, choose an index that has already been virtually defined.

2. Choose Create Index in ABAP Dictionary (that is located next to the Index Namecolumn).

The Create Index in ABAP Dictionary dialog box appears.

Page 190: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

190 April 2007

3. Enter a description for the index and choose Create.

The index is created in the ABAP Dictionary.

Note

After the index has successfully been created, you can decide if you want to schedulea RUNSTATS for the affected table.

End of the note.

8.7 Diagnostics: Cumulative SQL Trace

This function is not available for systems monitored using a remote databaseconnection.

You can access trace information on SQL statements by calling the DBA Cockpit andchoosing Diagnostics Cumulative SQL Trace in the navigation frame of the DBA Cockpit.The Diagnostics: Cumulative SQL Trace screen appears.

If you want to retrieve new data, choose Refresh.

The following information is displayed on the EXECUTE, PREPARE and FETCH times ofSQL statements:

Column Description

Total Time Cumulative execution time of a statement

% Proportional execution time of one statement with regardto all executed statements

Count Number of executions

Time/Stmt Average execution time of one statement

Table Name of the table the SQL statements reads from

If the statement reads from more than one table, only thename of the first table will be displayed on this screen. Theother names are displayed under Statement Informationon the detail screen.

SQL Statement Complete SQL statement

If you want to display more detailed information, double click a line or select a line andchoose Details. The Cumulative SQL Trace - Details screen appears providing informationon:

Statement Information

Displays the complete SQL statement, the application server where the statement wasexecuted 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

Page 191: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 191

If you want to display the access plan for the execution of a single statement, select a lineand choose Explain. This function provides a detailed analysis of expensive SQL statements.For more information, see The EXPLAIN Function [Page 180].

To display the ABAP source program where the statement was defined, choose one entry inthe list of ABAP reports. An editor screen appears which contains the related source.

Since all trace data remains permanently in the database, you should deleteobsolete data before starting a new trace. To do this, choose Delete on theDiagnostics: Cumulative SQL Trace screen.

For information on how to activate the cumulative SQL trace function, see SAP Note 139286.

8.8 Diagnostics: DBSL Trace Directory

This function is not available for systems monitored using a remote databaseconnection.

You can access information on the sequential DBSL trace and the DBSL deadlock trace bycalling the DBA Cockpit and choosing Diagnostics DBSL Trace Directory in the navigationframe of the DBA Cockpit.

By default, the trace files are stored in the following directories:

UNIX: /tmp/TraceFiles

Windows: <DRIVE>:\usr\sap\TraceFiles

For more information on DBSL trace files, see the following SAP Notes:

SAP Note 31707 for information on the sequential DBSL trace

SAP Note 175036 for information on the DBSL deadlock trace

8.9 Diagnostics: Trace Status

This function is only available for local systems.

You can access information on the current trace status trace by calling the DBA Cockpit andchoosing Diagnostics Trace Status in the navigation frame of the DBA Cockpit.

Page 192: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

192 April 2007

The following information is displayed:

Field Description

DBSL Trace

Trace Level Specifies the amount of data to be tracedThe following trace levels are available:

2: Only statements are traced.

3: Statements and results aretraced.

Number of I/O Records to Be Traced Number of result records to be traced fora statement

This value is only displayed if trace level 3is activated.

Display Length for String/Raw Data Maximum output length

DBSL Trace Search String If provided, only SQL statementscontaining this string are traced.

DBSL Trace Minimum Time Limit If provided, only SQL statements withexecution times higher than this time limitare traced.

Cumulative Trace

Trace Level Displays the trace level on the currentapplication server

It is set to:

0: Trace switched off

1: Trace switched o n

First Trace Entry Displays the start time of this trace if traceinformation already exists

Last Trace Entry Displays the end time of this trace if traceinformation already exists

Number of Entries Displays the number of entries in thistrace if trace information already exists

Deadlock Trace

Detection Interval Only SQL statements running longer thanthis time are recorded for deadlockdetection.

For each trace a status icon shows whether the trace is active or switched off.

In a local system you can activate or deactivate the trace function by clicking thestatus icon. You can also maintain trace parameters in a local system.

Page 193: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 193

8.10 Diagnostics: Database Notification LogThe DB2 notification log file is an error notification issued by the system when a severe erroroccurs. The <instance_name>.nfy file is an ASCII file that contains information logged byDB2. It is located in the directory specified by the DIAGPATH database manager configurationparameter. The <instance_name>.nfy file can be quite large. To avoid unnecessarysystem workload, you can restrict the amount of data that is processed on your screen bydefining a time range and a severity level according to your requirements.

You can access the Database Notification Log by calling the DBA Cockpit and choosingDiagnostics Database Notification Log in the navigation frame of the DBA Cockpit. Todisplay more details of a log entry, double-click the corresponding log entry.

The <instance_name>.nfy file grows continuously. When it becomes toolarge, we recommend that you save it to a different file and delete the originalfile.

See also:IBM DB2 Administration Guide

Page 194: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

194 April 2007

8.11 Diagnostics: Database Diag LogThe db2diag.log file is an ASCII file that contains diagnostic information logged by DB2. Itis located in the directory specified by the DIAGPATH database manager configurationparameter.

Recommendation

We recommend that you use a text editor to view the file on the machine where you suspecta problem has occurred.

The db2diag.log file contains the following information:

The location of the error being reported

Application identifiers allow matching up entries pertaining to an application in thedb2diag.log file.

A diagnostic message explaining the reason for the error

The messages usually begin with DIA.

Any available supporting data, such as SQLCA data structures and pointers to thelocation of any extra dump or trap files

Page 195: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 195

There are two types of entries in the db2diag.log file:

Administrative events

These entries are valuable, since they indicate whether actions such as backups andrestores started and finished.

Error information

This information is only useful if you are trying to analyze an external symptom or ifyou have already determined the error and are looking for more information.

Example

If an application receives an unexpected SQL code or if a database crashes, the filecan contain error information including pointers to dump files.

If the database is behaving normally, this type of information is not important and canbe ignored.

End of the example.

You can access the Database Diag Log by calling the DBA Cockpit and choosingDiagnostics Database Diag Log in the navigation frame of the DBA Cockpit. The diag

log can be quite large. To avoid unnecessary system workload, you can restrict the amount ofdata that is processed on your screen by defining a time range and a severity level accordingto your requirements. To display more details of a log entry, double-click the correspondinglog entry.

Caution

Reading information from the db2diag.log is very time-expensive. Make sure that youchoose your time range and severity level carefully. Otherwise, SAP GUI time–outs canoccur.

End of the caution.

Note

Since automatic RUNSTATS has been introduced by DB2, the db2diag.log rapidly grows insize up to several gigabytes – depending on the value of the DIAGLEVEL databaseconfiguration parameter. By default, the value of this parameter is 3. We thereforerecommend that you regularly switch the db2diag.log using the automation function that isprovided in the monitoring settings [Page 128].

End of the note.

More Information

IBM DB2 Administration Guide

Page 196: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

196 April 2007

8.12 Diagnostics: Dump DirectoryThe 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 DirectoryPath (diagpath). This path is configured within the database manager configuration.

You can access the dump directory by calling the DBA Cockpit and choosing DiagnosticsDump Directory in the navigation frame of the DBA Cockpit.

If you want to display the content of an error log or a trace file, double-click the file.

8.13 Diagnostics: DB2 Help CenterTo directly access information about DB2 in the Internet, choose Diagnostics DB2 HelpCenter in the navigation frame of the DBA Cockpit. The DB2 help center for your databaserelease is displayed.

Page 197: Database Administration Guide - SAP Help Portal · 4 Backup and Recovery ... 6.4 The SQL Script Maintenance ... Database Administration Guide: Performance. April 2007 9 1 The DBA

April 2007 197

9 Wizards: BI Data DistributionDuring the SAP system installation you can add additional database partitions either usingSAPinst or manually using db2start. Before the partitions that you have added can becomeactive, you have to perform the following actions:

Change the assignment of database partition(s) to database partition group(s)

Define tablespace containers on the new database partition

Determine if and when the affected tablespaces will be redistributed

To perform these tasks, you use the BI Data Distribution wizard.

You can access the BI Data Distribution wizard by calling the DBA Cockpit and choosingWizards: BI Data Distribution in the navigation frame of the DBA Cockpit.

For detailed information about the steps to perform, see the screens of the BI DataDistribution wizard.