DB2 Snapshot information | Monitor level : Application
- Jha Chandan

- Feb 17, 2021
- 3 min read
In this article we will see and learn how to get snapshot information about databases and instances for monitor level Application.
1) get snapshot for application applid appl-id : Application level information, including cumulative counters, status information, and most recent SQL statement executed (if statement switch is set).
Example :
db2 connect to db <db_name>
db2 list applications show detail
db2 get snapshot for application applid appl-idOutput:
[db2inst1@l00lnx1100 ~]$ db2 connect to bfent
Database Connection Information
Database server = DB2/LINUXX8664 11.5.0.0
SQL authorization ID = DB2INST1
Local database alias = BFENT
[db2inst1@l00lnx1100 ~]$ db2 list applications show detail
CONNECT Auth Id Application Name Appl. Application Id Seq# Number of Coordinating Coordinator Status Status Change Time DB Name DB Path
Handle Agents member number pid/thread
-------------------------------------------------------------------------------------------------------------------------------- -------------------- ---------- -------------------------------------------------------------- ----- ---------- ---------------- --------------- ------------------------------ -------------------------- -------- --------------------
DB2INST1 db2pcsd 55335 *LOCAL.DB2.210218131533 00001 1 0 439 Connect Completed Not Collected BFENT /home/db2inst1/db2inst1/NODE0000/SQL00001/MEMBER0000/
DB2INST1 db2stmm 55328 *LOCAL.DB2.210218131526 00001 1 0 411 Connect Completed Not Collected BFENT /home/db2inst1/db2inst1/NODE0000/SQL00001/MEMBER0000/
[db2inst1@l00lnx1100 ~]$ db2 get snapshot for application applid 55335
SQL1611W No data was returned by Database System Monitor.
[db2inst1@l00lnx1100 ~]$Here No data was returned coz might application connection is not active or session is completed.
2) get snapshot for application agentid appl-handle : Application level information, includes cumulative counters, status information, and most recent SQL statement executed (if statement switch is set).
Example:
db2 connect to db <db_name>
db2 list applications show detail
db2 get snapshot for application agentid appl-handleOutput:
[db2inst1@l00lnx1186 ~]$ db2 connect to bfent
Database Connection Information
Database server = DB2/LINUXX8664 11.5.0.0
SQL authorization ID = DB2INST1
Local database alias = BFENT
[db2inst1@l00lnx1186 ~]$ db2 list applications show detail
CONNECT Auth Id Application Name Appl. Application Id Seq# Number of Coordinating Coordinator Status Status Change Time DB Name DB Path
Handle Agents member number pid/thread
-------------------------------------------------------------------------------------------------------------------------------- -------------------- ---------- -------------------------------------------------------------- ----- ---------- ---------------- --------------- ------------------------------ -------------------------- -------- --------------------
DB2INST1 db2dbctrld 1868 *LOCAL.DB2.210218162835 00001 1 0 539 Connect Completed Not Collected BFENT /home/db2inst1/db2inst1/NODE0000/SQL00001/MEMBER0000/
DB2INST1 db2cmpd 1874 *LOCAL.DB2.210218162841 00001 1 0 545 Connect Completed Not Collected BFENT /home/db2inst1/db2inst1/NODE0000/SQL00001/MEMBER0000/
DB2INST1 db2lused 1867 *LOCAL.DB2.210218162834 00001 1 0 538 Connect Completed Not Collected BFENT /home/db2inst1/db2inst1/NODE0000/SQL00001/MEMBER0000/
[db2inst1@l00lnx1186 ~]$ db2 get snapshot for application agentid 1868
SQL1611W No data was returned by Database System Monitor.
[db2inst1@l00lnx1186 ~]$3) get snapshot for applications on dbname : Application level information for each application that is connected to the database on the partition. This includes cumulative counters, status information, and most recent SQL statement executed (if statement switch is set).
Example:
get snapshot for applications on <db_name>Output:

4) get snapshot for all applications : Application level information for each application that is active on the partition. This includes cumulative counters, status information, and most recent SQL statement executed (if statement switch is set).
Example:
db2 get snapshot for all applicationsOutput:

5) get snapshot for dcs application applid appl-id : Application level information, including cumulative counters, status information, and most recent SQL statement executed (if statement switch is set).
Example:
get snapshot for dcs application applid <appl-id>6) get snapshot for all dcs applications : Application level information for each DCS application that is active on the partition. This includes cumulative counters, status information, and most recent SQL statement executed (if statement switch is set).
Example:
db2 get snapshot for all dcs applications7) get snapshot for dcs application agentid appl-handle : Application level information, including cumulative counters, status information, and most recent SQL statement executed (if statement switch is set).
Example:
db2 get snapshot for dcs application agentid <appl-handle>8) get snapshot for dcs applications on dbname : Application level information for each DCS application that is connected to the database on the partition. This includes cumulative counters, status information, and most recent SQL statement executed (if statement switch is set).
Example:
db2 get snapshot for dcs applications on <db_name>9) get snapshot for remote applications on dbname : Application level information, includes cumulative counters, status information, and most recent SQL statement executed (if statement switch is set).
Example :
db2 get snapshot for remote applications on <db_name>10) get snapshot for all remote applications : Application level information for each federated system application that is active on the partition. This includes cumulative counters, status information, and most recent SQL statement executed (if statement switch is set).
Example:
db2 get snapshot for all remote applicationsIn next post we will see DB2 Snapshot information | Monitor level : Table. Please Like, Follow, Share & Subscribe.











Comments