DB2 Connect User's Guide


Using the GET SNAPSHOT Commands

The DB2 monitor maintains a running tally of valuable system information. You can get a summary of system status at any time by issuing the GET SNAPSHOT command. You can take monitor snapshots if you have SYSMAINT, SYSCTRL, or SYSADM authority for the database manager instance that you wish to monitor.

There are five snapshot commands useful for monitoring DCS information. They are:

Each snapshot command will produce a detailed report about the area you requested.

For instance, issuing the GET SNAPSHOT FOR DCS DATABASE ON DCSDB will produce the following report:

             DCS Database Snapshot
 
DCS database name                        = DCSDB
Host database name                       = GILROY
First database connect timestamp         = 12-15-1999 10:28:24.596495
Most recent elapsed time to connect      = 0.950561
Most recent elapsed connection duration  = 0.000000
Host response time (sec.ms)              = 0.000000
Last reset timestamp                     =
Number of SQL statements attempted       = 2
Commit statements attempted              = 1
Rollback statements attempted            = 0
Failed statement operations              = 0
Total number of gateway connections      = 1
Current number of gateway connections    = 1
Gateway conn. waiting for host reply     = 0
Gateway conn. waiting for client request = 1
Gateway communication errors to host     = 0
Timestamp of last communication error    = None
High water mark for gateway connections  = 1
Rows selected                            = 0
Outbound bytes sent                      = 140
Outbound bytes received                  = 103

This report provides information on database connections, performance, errors and throughput of SQL requests. DB2 Monitor snapshots can be much more detailed, in fact. For instance, if you issue the GET SNAPSHOT FOR ALL DCS APPLICATIONS command, you will receive a report similar to the following:

           DCS Application Snapshot
 
Client application ID                      = 09150F74.B6A4.991215152824
  Sequence number                          = 0001
  Authorization ID                         = SMITH
  Application name                         = db2bp
  Application handle                       = 1
  Application status                       = waiting for request
  Status change time                       = 12-15-1999 10:29:06.707086
  Client node                              = sys143
  Client release level                     = SQL06010
  Client platform                          = AIX
  Client protocol                          = TCP/IP
  Client codepage                          = 850
  Process ID of client application         = 49074
  Client login ID                          = smith
  Host application ID                      = G9150F74.B6A5.991215152825
  Sequence number                          = 0000
  Database alias at the gateway            = MVSDB
  DCS database name                        = DCSDB
  Host database name                       = GILROY
  Host release level                       = DSN05012
  Host CCSID                               = 500
 
Outbound communication address             = 9.21.21.92 5021
Outbound communication protocol            = TCP/IP
Inbound communication address              = 9.21.15.116 46756
First database connect timestamp           = 12-15-1999 10:28:24.596495
Host response time (sec.ms)                = 0.000000
Time spent on gateway processing           = 0.000000
Last reset timestamp                       =
Rows selected                              = 0
Number of SQL statements attempted         = 2
Failed statement operations                = 0
Commit statements                          = 1
Rollback statements                        = 0
Inbound bytes received                     = 404
Outbound bytes sent                        = 140
Outbound bytes received                    = 103
Inbound bytes sent                         = 287
Number of open cursors                     = 0
Application idle time                      = 1 minute and 32 seconds
 
UOW completion status                      =
Previous UOW completion timestamp          = 12-15-1999 10:28:25.592631
UOW start timestamp                        = 12-15-1999 10:29:06.142790
UOW stop timestamp                         =
Elapsed time of last completed uow (sec.ms)= 0.034396
 
Most recent operation                      = Execute Immediate
Most recent operation start timestamp      = 12-15-1999 10:29:06.142790
Most recent operation stop timestamp       = 12-15-1999 10:29:06.707053
 
Statement                                  = Execute Immediate
Section number                             = 203
Application creator                        = NULLID
Package name                               = SQLC2C07
SQL compiler cost estimate in timerons     = 0
SQL compiler cardinality estimate          = 0
Statement start timestamp                  = 12-15-1999 10:29:06.142790
Statement stop timestamp                   = 12-15-1999 10:29:06.707053
Host response time (sec.ms)                = 1.101612
Elapsed time of last completed stmt(sec.ms)= 0.564263
Rows fetched                               = 0
Time spent on gateway processing           = 0.013367
Inbound bytes received for statement       = 220
Outbound bytes sent for statement          = 130
Outbound bytes received for statement      = 49
Inbound bytes sent for statement           = 27
SQL statement text:
create table t12 (col1 int, col2 char)

For more information about the GET SNAPSHOT command and other useful DB2 Monitor commands, refer to the System Monitor Guide and Reference.


[ Top of Page | Previous Page | Next Page ]