Met de DB2-monitor wordt een doorlopend overzicht van belangrijke systeemgegevens bijgehouden. U kunt op elk gewenst moment een overzicht van de systeemstatus opvragen door de opdracht GET SNAPSHOT op te geven. Als u de machtiging SYSMAINT, SYSCTRL of SYSADM hebt voor het Database Manager-subsysteem dat u wilt bewaken, kunt u momentopnamen met de monitor maken.
U kunt de volgende vijf opdrachten voor momentopnamen gebruiken voor de bewaking van DCS-gegevens:
Met elke opdracht wordt een detailrapport gegenereerd over het gevraagde onderdeel.
Als u bijvoorbeeld de opdracht GET SNAPSHOT FOR DCS DATABASE ON DCSDB opgeeft, wordt het volgende rapport gegenereerd:
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
Dit rapport bevat gegevens over databaseverbindingen, performance, fouten en doorvoer van SQL-opdrachten. Momentopnamen van de DB2-monitor kunnen echter veel meer details bevatten. Als u bijvoorbeeld de opdracht GET SNAPSHOT FOR ALL DCS APPLICATIONS opgeeft, krijgt u een rapport dat er ongeveer als volgt uitziet:
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)
Raadpleeg de System Monitor Guide and Reference voor meer informatie over de opdracht GET SNAPSHOT en andere handige opdrachten voor de DB2-monitor.