top of page

DB2 Snapshot information | Monitor level : Application

  • Writer: Jha Chandan
    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-id

Output:

[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-handle

Output:

[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:

ree

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 applications

Output:

ree

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 applications

7) 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 applications

In next post we will see DB2 Snapshot information | Monitor level : Table. Please Like, Follow, Share & Subscribe.

Comments


jc_logo.png

Hi, thanks for stopping by!

Welcome to my “Muse & Learn” blog!
Muse a little, learn a lot.✌️

 

Here you’ll find practical SQL queries, troubleshooting tips with fixes, and step-by-step guidance for common database activities. And of course, don’t forget to pause and muse with us along the way. 🙂
 

I share insights on:​​

  • Db2

  • MySQL

  • SQL Server

  • Linux/UNIX/AIX

  • HTML …and more to come!
     

Whether you’re just starting out or looking to sharpen your DBA skills, there’s something here for you.

Let the posts
come to you.

Thanks for submitting!

  • Instagram
  • Facebook
  • X
2020-2025 © TechWithJC

Subscribe to Our Newsletter

Thanks for submitting!

  • Facebook
  • Instagram
  • X

2020-2025 © TechWithJC

bottom of page