|
D:\TEMP\GA\AIX6495>db2 "select APPL_NAME from sysibmadm.applications as applicat
ions"
APPL_NAME
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
----------------
db2taskd
db2stmm
db2bp.exe
3 record(s) selected.
D:\TEMP\GA\AIX6495>db2 "select appls_cur_cons from sysibmadm.snapdb as snapdb"
APPLS_CUR_CONS
--------------------
1
1 record(s) selected.
D:\TEMP\GA\AIX6495>
1) you should remove WHERE APPL_STATUS='CONNECTED' clause, because the application status may changed to UOW Waiting, UOW Exeucting or etc....
2) the second way seems only show the real application, but there's also connections like STMM or db2taskd that not normal applications.
so the first method (without WHERE clause) should be same as "list applications", the second method should be same as "get snapshot for database on <dbname>"
D:\TEMP\GA\AIX6495>db2 list applications
Auth Id Application Appl. Application Id
DB # of
Name Handle
Name Agents
-------- -------------- ---------- ---------------------------------------------
----------------- -------- -----
TAOEWANG db2taskd 960 *LOCAL.DB2.080827205006
SAMPLE 1
TAOEWANG db2stmm 959 *LOCAL.DB2.080827205005
SAMPLE 1
TAOEWANG db2bp.exe 962 *LOCAL.DB2.080827205004
SAMPLE 1
D:\TEMP\GA\AIX6495>db2 get snapshot for database on sample | more
Database Snapshot
Database name = SAMPLE
Database path = D:\DB2\NODE0000\SQL00002\
Input database alias = SAMPLE
Database status = Active
Catalog database partition number = 0
Catalog network node name =
Operating system running at database server= NT
Location of the database = Local
First database connect timestamp = 08/27/2008 16:50:03.797799
Last reset timestamp =
Last backup timestamp =
Snapshot timestamp = 08/29/2008 09:05:53.367903
Number of automatic storage paths = 1
Automatic storage path = D:
File system ID = 604554608
Storage path free space (bytes) = 29831479296
File system used space (bytes) = 77704491008
File system total space (bytes) = 107603079168
High water mark for connections = 7
Application connects = 1957
Secondary connects total = 3
Applications connected currently = 1
Appls. executing in db manager currently = 0
Agents associated with applications = 3
Maximum agents associated with applications= 7
Maximum coordinating agents = 7
|