Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2013
    Posts
    5

    Unanswered: Database Application Server connection association

    Hi all,
    I am not sure if this the correct forum to post this question but I am having the following idea to investigate and find out if it possible to work. I am having a db2 server in a linux machine and two kinds of application servers, geronimo and websphere. I would like to know whether it is possible to associate a geronimo or websphere connection to a db2 agent.
    In other words, I would like to know which user of a web application is running which query at the database at any given moment.
    Thank you in advance.
    Last edited by airmil; 05-10-13 at 10:25. Reason: Typos

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    It may be possible if your application uses Connection.setClientInfo() each time it gets a connection from the pool. In that case the application snapshot on the DB2 side will show some of that information, otherwise all you will see are identical application server connections.
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Nov 2010
    Posts
    99
    It would be tricky to get the userid of the user that logged into an application as all WebSphere connections to the database are going to use the JDBC connection setup in data source in the WAS Admin console, connection pooling is also most likely handled by WAS or outside via C3PO etc.

    You can certainly get the ip address of the server connecting to your database by simply running db2 "list applications" and look at the application id? the id is in hex so you will need to translate this to the ip address of your application server. i.e. GA =10, etc..

    maybe there is some useful information you can gather from the following SQL:
    SELECT substr(TPMON_CLIENT_WKSTN,1,25) as TPMON_CLIENT_WKSTN,SNAPSHOT_TIMESTAMP,substr(EXECU TION_ID,1,25) as EXECUTION_ID,AGENT_ID,substr(CORR_TOKEN,1,25) as CORR_TOKEN,APPL_STATUS,AUTHORITY_LVL,CLIENT_PLATFO RM,CLIENT_PROTOCOL,CLIENT_PID,COORD_AGENT_PID,subs tr(APPL_NAME,1,25) as APPL_NAME,substr(APPL_ID,1,25),substr(PRIMARY_AUTH _ID,1,25),substr(CLIENT_NNAME,1,25),substr(CLIENT_ PRDID,1,25),substr(DB_NAME,1,25) from sysibmadm.snapappl_info order by agent_id

  4. #4
    Join Date
    Jan 2013
    Posts
    5
    Quote Originally Posted by James123 View Post
    It would be tricky to get the userid of the user that logged into an application as all WebSphere connections to the database are going to use the JDBC connection setup in data source in the WAS Admin console, connection pooling is also most likely handled by WAS or outside via C3PO etc.

    You can certainly get the ip address of the server connecting to your database by simply running db2 "list applications" and look at the application id? the id is in hex so you will need to translate this to the ip address of your application server. i.e. GA =10, etc..

    maybe there is some useful information you can gather from the following SQL:
    SELECT substr(TPMON_CLIENT_WKSTN,1,25) as TPMON_CLIENT_WKSTN,SNAPSHOT_TIMESTAMP,substr(EXECU TION_ID,1,25) as EXECUTION_ID,AGENT_ID,substr(CORR_TOKEN,1,25) as CORR_TOKEN,APPL_STATUS,AUTHORITY_LVL,CLIENT_PLATFO RM,CLIENT_PROTOCOL,CLIENT_PID,COORD_AGENT_PID,subs tr(APPL_NAME,1,25) as APPL_NAME,substr(APPL_ID,1,25),substr(PRIMARY_AUTH _ID,1,25),substr(CLIENT_NNAME,1,25),substr(CLIENT_ PRDID,1,25),substr(DB_NAME,1,25) from sysibmadm.snapappl_info order by agent_id
    Thanks for the info, I'll check it out and see what I can get

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •