how to run sap transaction st04 – database performance monitor _ sap application performance

15
How to run SAP transaction ST04 – database performance monitor Posted on Sunday April 14th, 2013 SAP transaction ST04 is used to monitor database performance. It provides all kind of historical data and statistics so database performance can be evaluated and improvement opportunity from application point view or system point view can be identified. In my previous post, I have given a high-level introduction on SAP database performance monitor. In this post, I would focus on how to run SAP database performance monitor and how to navigate through various screens. How to start SAP database performance monitor. 1. How to navigate to some frequent accessed screens/functions from application performance point view SQL Cursor Cache A. Different “Wait” event monitors like Session monitors, Lock monitor, Latch Monitor B. Oracle work load report which includes ASH, AWR, ADDM C. 2. 1. How to start SAP database performance monitor To start SAP database performance monitor, you can either use menu path or run SAP transaction ST04 directly. Database performance monitor is a part of DBA cockpit after SAP release 7.10. When I run ST04, I actually start SAP DBA cockpit but DBA cockpit would present me with database performance monitor screen. The initial screen of ST04 with “newer” SAP release is like SAP application performance How to run SAP transaction ST04 – database performance monitor | SA... http://www.sap-perf.ca/run-sap-st04/ 1 of 15 05-Feb-14 5:56 PM

Upload: barun581

Post on 21-Oct-2015

434 views

Category:

Documents


7 download

TRANSCRIPT

Page 1: How to run SAP transaction ST04 – database performance monitor _ SAP application performance

How to run SAP transaction ST04 –database performance monitorPosted on Sunday April 14th, 2013

SAP transaction ST04 is used to monitor database performance. It provides all kind ofhistorical data and statistics so database performance can be evaluated and improvementopportunity from application point view or system point view can be identified. In my previouspost, I have given a high-level introduction on SAP database performance monitor. In thispost, I would focus on how to run SAP database performance monitor and how to navigatethrough various screens.

How to start SAP database performance monitor.1.How to navigate to some frequent accessed screens/functions from applicationperformance point view

SQL Cursor CacheA.Different “Wait” event monitors like Session monitors, Lock monitor, LatchMonitor

B.

Oracle work load report which includes ASH, AWR, ADDMC.

2.

1. How to start SAP database performance monitor

To start SAP database performance monitor, you can either use menu path or run SAPtransaction ST04 directly. Database performance monitor is a part of DBA cockpit after SAPrelease 7.10. When I run ST04, I actually start SAP DBA cockpit but DBA cockpit wouldpresent me with database performance monitor screen. The initial screen of ST04 with“newer” SAP release is like

SAP applicationperformance

How to run SAP transaction ST04 – database performance monitor | SA... http://www.sap-perf.ca/run-sap-st04/

1 of 15 05-Feb-14 5:56 PM

Page 2: How to run SAP transaction ST04 – database performance monitor _ SAP application performance

Figure 1 ST04 Initial Screen – Database performance overview screen part 1

Figure 2 ST04 Initial screen – Database Performance overview screen part 2

In “older” SAP release, your initial screen of ST04 might look like the screen showed in Figure3.

How to run SAP transaction ST04 – database performance monitor | SA... http://www.sap-perf.ca/run-sap-st04/

2 of 15 05-Feb-14 5:56 PM

Page 3: How to run SAP transaction ST04 – database performance monitor _ SAP application performance

Figure 3 – ST04 Database performance Overview (Old version)

In the top of screen showed in Figure 1 and Figure 3,

, Click “Reset”,ST04 would create areset point for the data displayed in the new screen. Then you can click “Since Reset” to seelatest statistical data after the reset point. You click “Since DB start”, it would show statisticaldata since database was started last time – that is the default display for performanceoverview screen when you run ST04. You can refresh your display as well. ST04 allows onlyone reset point – always latest reset point regardless who click the “reset” Icon.

2. How to navigate through frequent accessed screens of database performancemonitor

Navigation depends on your ST04 version.

If your ST04 initial screen is similar to Figure 1, you can navigate to other ST04 statisticsscreens via the navigation panel. Navigation panel is highlighted in Figure-2 and expanded inFigure-1. You can click the entry and navigate to the corresponding screen. I would show

How to run SAP transaction ST04 – database performance monitor | SA... http://www.sap-perf.ca/run-sap-st04/

3 of 15 05-Feb-14 5:56 PM

Page 4: How to run SAP transaction ST04 – database performance monitor _ SAP application performance

navigation for some important screens based on my performance experience.

If your ST04 initial screen is similar to Figure 3, you can navigate to other ST04 statisticsscreens via “Detail analysis menu” screen similar to Figure 4. Click “Detail analysis menu” infigure 3, SAP ST04 would present you Figure-4 screen(below).

Figure 4 ST04 Detail Analysis Menu (old version)

There are more functions under following menu option for old ST04 version than what is listedin Figure 4(above), Please refer to Figure 5.

How to run SAP transaction ST04 – database performance monitor | SA... http://www.sap-perf.ca/run-sap-st04/

4 of 15 05-Feb-14 5:56 PM

Page 5: How to run SAP transaction ST04 – database performance monitor _ SAP application performance

Figure 5 ST04old menu path

2.1 SAP ST04 – SQL Cache Monitor

To see SQL statement screen, Click the “Shared Cursor Cache” (Figure 1) or “SQLstatement” (Figure 4), SAP would show you a pop-up window to allow you to specify“selection criteria” to limit output and sort display. However if you are not sure what data youshould put it, you can leave it blank, SAP would report all data. You do have opportunity tofilter the data later.

How to run SAP transaction ST04 – database performance monitor | SA... http://www.sap-perf.ca/run-sap-st04/

5 of 15 05-Feb-14 5:56 PM

Page 6: How to run SAP transaction ST04 – database performance monitor _ SAP application performance

Figure 6 ST04 Selection Criteria for SQL cache analysis

After you enter selection criteria and click the “continue” in Figure 6 (above), you would getSQL statement screens similar to Figure 7(below).

Figure 7 ST04 SQL cache statistics screen part 1,

Scroll right, there are more columns than what is listed there. Some of them are showed here(Figure 8 below).

How to run SAP transaction ST04 – database performance monitor | SA... http://www.sap-perf.ca/run-sap-st04/

6 of 15 05-Feb-14 5:56 PM

Page 7: How to run SAP transaction ST04 – database performance monitor _ SAP application performance

Figure 8 ST04 SQL cache statistics screen part 2

What do we normally do during SQL cache review, please refer to table 1.

Table 1 –ST04 Common function for SQL cache analysis

Your goal Button should beclicked

Comment

Filter display bycolumn

Filter display based on column like Diskreads, Program name etc. You can click acolumn first or you can select columns forsorting from available fields after you click thefilter button.

Sort display Sort in Ascending or Descending in expectedcolumn. Click the column name first before thesort button is clicked.

Search on thescreen

You can search the display based on specificvalue or string like FIELD in SQL statement orprogram name etc. to quickly identify the SQLentry which you are looking for.

Filter display viatable

Only display SQL statement for the specifictable.

Review SQLexecution plan

Access strategy would include index, accesspredicates etc. Click the row first before clickon the explain button.

Review sourcecode

Show ABAP source code for the SQLstatement. Click the expected row first.

Create a Resetpoint

This is for SQL cache. Separate from thereset point in the performance overviewscreen.

Review SQL sinceReset

Show all SQL cache data since last reset.

How to run SAP transaction ST04 – database performance monitor | SA... http://www.sap-perf.ca/run-sap-st04/

7 of 15 05-Feb-14 5:56 PM

Page 8: How to run SAP transaction ST04 – database performance monitor _ SAP application performance

Review all SQLcache

All SQL cache data since database startedlast time. This is the default display.

SQL load breakdown

Show SQL load at date and hour level for asql. Click the expected row first.

Wondering what SQL execution plan looks like, following is a sample which shows the tableaccess path, Using primary index MAKT~0 to get ROWID then use ROWID to getcorresponding data record.

Figure 9 ST04 SQL execution plan

Following is sample of SQL analysis report

How to run SAP transaction ST04 – database performance monitor | SA... http://www.sap-perf.ca/run-sap-st04/

8 of 15 05-Feb-14 5:56 PM

Page 9: How to run SAP transaction ST04 – database performance monitor _ SAP application performance

Figure 10 ST04 SQL analysis report

For older version of ST04, SQL statement statistics screen has a column “CurrentExecutions”.

2.2 SAP ST04 Database session monitor

To access database session monitor similar to Figure 11 (below), you can click “SessionMonitor” listed in the Navigation panel in Figure 1 or “Oracle sessions” button in Figure 4

Figure 11 ST04 Database Session Monitor

Please refer to table 1 to understand button in Figure 11. There are more columns or moreinformation for each listed session, you just need to scroll to the right. If there are moresessions, you can scroll down as showed in Figure 11.

You can change layout of SQL cache statistics screen. You can drag a column to a newposition in ST04.

2.3 SAP ST04 Database lock monitor

Click on “Lock Monitor” showed in Navigation panel in Figure 1, you would see following “lockMonitor” screen –default tab is “Without DBA Objects” for performance reasons. If you click“With DBA OBJECTS”, table name involved in the lock like “MDVM” would be displayed.

How to run SAP transaction ST04 – database performance monitor | SA... http://www.sap-perf.ca/run-sap-st04/

9 of 15 05-Feb-14 5:56 PM

Page 10: How to run SAP transaction ST04 – database performance monitor _ SAP application performance

Figure 12 ST04 Lock Monitor

“Without DBA Objects” and “With DBA Objects” show current lock contention. “DML locks”tab shows all current “locks” in the database.

In the old ST04 version, the lock monitor screen (see Figure 13 below ) has only basicinformation. You can access the lock monitor by clicking “Oracle Exclusive lock waits” inFigure 4.

Figure 13 ST04 lock monitor – older version

2.4 SAP ST04 Active Session History

If your system does not have “Active Session History” function, you can skip this section.

Click “Active Session History” in the navigation panel showed in Figure 1, following screenwould show up to allow you to specify a period which active sessions would come from.

How to run SAP transaction ST04 – database performance monitor | SA... http://www.sap-perf.ca/run-sap-st04/

10 of 15 05-Feb-14 5:56 PM

Page 11: How to run SAP transaction ST04 – database performance monitor _ SAP application performance

Figure 14 ST04 Active Session History Input screen

To select the period, you can click “Avail. Timeframe in” button in the Figure 13 to get apop-up window showed in Figure 15 (below).

Figure 15 ST04 Active session history Time frames

Click Button “Use GV$” or “Use DBA” based on your need. Here “Use GV$” is clicked – Soscreen is changed to Figure 16 screen (below)

Figure 16 ST04 Active session history- with input

Now click “load data” button showed in Figure 16 (above). SAP would report active session

How to run SAP transaction ST04 – database performance monitor | SA... http://www.sap-perf.ca/run-sap-st04/

11 of 15 05-Feb-14 5:56 PM

Page 12: How to run SAP transaction ST04 – database performance monitor _ SAP application performance

history in a screen similar to Figure 17 (below).

Figure 17 – ST04 Active session history

You can click “Set to last hour” and then click “Load data” button in Figure 13 to see activesession history in the last hour. The DBA views might be too much data to run from ST04screen.

2.5 SAP ST04 Oracle Workload Reporting

If your system does not have DBA cockpit or you do not have this feature/entry in ST04, youcan skip this section. Oracle workload Reporting includes:

AWR report – Automatic Workload Repository.SQL ReportASH report – Active Session History.ADDM report – Automatic Database Diagnostic Monitor.

Those would be included as part of standard SAP delivery for SAP ABAP server release 7.10and higher. For more details, please refer to SAP ossnote 1028068.

To access Oracle workload repository report (AWR, SQL, ASH and ADDM), you can click ”Workload Reporting” showed in Navigation panel in Figure 1. Upon click, the display ischanged to screen showed in Figure 18(below).

Figure 18 ST04 Workload report Input screen

How to run SAP transaction ST04 – database performance monitor | SA... http://www.sap-perf.ca/run-sap-st04/

12 of 15 05-Feb-14 5:56 PM

Page 13: How to run SAP transaction ST04 – database performance monitor _ SAP application performance

Based on report you want, you need to provide different input. Please refer to table 2.

Table 2 ST04 – Input for Oracle Performance report

You need Input

AWR DIFFreport

Two periods defined by: “Begin Snapshot” and “End Snapshot” ; “BeginSnapsh. 2 and “End Snapshot 2

SQL report SQL ID.

All otherreports

One period defined by: “Begin snapshot” and “End Snapshot”.

Figure 19 screen provides a sample of “push down” menu where you can find a list ofsnapshots. You need to select at least two snapshots for any report other than SQL report.

Figure 19 ST04 a list of oracle snapshots

For example, I would like to know Oracle statistics between 12:00:53 and 22:00:08 on Mar16 2013, so I choose the

begin snapshot – “47527 and

end snapshot - “47528 .

Input is reflected in following screen, please refer to Figure 20

Figure 20 ST04 Oracle workload report input

How to run SAP transaction ST04 – database performance monitor | SA... http://www.sap-perf.ca/run-sap-st04/

13 of 15 05-Feb-14 5:56 PM

Page 14: How to run SAP transaction ST04 – database performance monitor _ SAP application performance

Some reports are provided with two formats – text and HTML. You can click correspondingbutton to get needed report in the desired format. Here, a truncated AWR report (Figure 21)and ASH report (Figure 22) are listed:

Figure 21 ST04 Oracle Report – Part of AWR report

Figure 22 ST04 Oracle Report – Part of ASH report

3. How to navigate through frequent accessed screens of database performancemonitor

It is my belief that this posts covers navigation to all frequent accessed analysis/monitorfunctions provided by SAP ST04. Now you might wonder how to interpret those data and how

How to run SAP transaction ST04 – database performance monitor | SA... http://www.sap-perf.ca/run-sap-st04/

14 of 15 05-Feb-14 5:56 PM

Page 15: How to run SAP transaction ST04 – database performance monitor _ SAP application performance

we can use that to improve database and application performance. I would cover that in mynext post.

This entry was posted in SAP transaction and tagged how to run SAP transaction ST04;SAP ST04; SAP ST04 navigation; SAP database performance monitor by eric.Bookmark the permalink [http://www.sap-perf.ca/run-sap-st04/] .

How to run SAP transaction ST04 – database performance monitor | SA... http://www.sap-perf.ca/run-sap-st04/

15 of 15 05-Feb-14 5:56 PM