If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > how to get the db2 session number

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-04-04, 04:38
newhu114 newhu114 is offline
Registered User
 
Join Date: Jul 2004
Posts: 17
how to get the db2 session number

I use "db2 get snapshot for all on zmccdb" to get the following information;
Database name = ZMCCDB
Database path = /home/zmccinst/zmccdb/db2inst2/NODE0000/SQL00001/
Input database alias = ZMCCDB
Database status = Active
Catalog database partition number = 0
Catalog network node name =
Operating system running at database server= AIX
Location of the database = Local
First database connect timestamp = 07-13-2004 21:00:52.200086
Last reset timestamp =
Last backup timestamp = 08-01-2004 21:00:42.086460
Snapshot timestamp = 08-02-2004 17:52:43.010177

High water mark for connections = 21
Application connects = 1331
Secondary connects total = 0
Applications connected currently = 7
Appls. executing in db manager currently = 0
Agents associated with applications = 7
Maximum agents associated with applications= 21
Maximum coordinating agents = 21


I want to know that the meanings of "Application connects" and "High water mark for connections " and "Applications connected currently".
Also, I want to know how to get the session number of DB2 just like oracle.
Thanks!
Reply With Quote
  #2 (permalink)  
Old 08-04-04, 05:50
blom0344 blom0344 is offline
Registered User
 
Join Date: Jan 2003
Location: Zutphen,Netherlands
Posts: 256
'list applications' will give you all sessions with their respective application handles (an integer).

With 'get snapshot for application applid xxx' you get all details on the connection (including the identity from the client)
__________________
Ties Blom
Senior Application Developer BI
Getronics Healthcare
DB2,ORACLE,Powercenter,BusObj,Access,
SQL, SQL server
Reply With Quote
  #3 (permalink)  
Old 08-04-04, 10:14
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
If you are on Version 8, you can use the snapshot table functions snapshot_appl_info and snapshot_appl ..
Eg:
db2 "select * from table(snapshot_appl_info('SAMPLE',-1)) a"
db2 "select * from table(snapshot_appl('SAMPLE',-1)) a"
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On