Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2012
    Posts
    4

    Exclamation Unanswered: session settings in db2

    H Guys,

    I am a new bie to the world of database ....is there any sql statement in db2 which will bring out our session no. which we see as unique one..? As I am connected to the db2 with an ip , tat is in form of client..!!

    And what about if one user is making the changes will it also impact the other one also...what about setting that a user should do , so that he can also do the changes in database table also for his analysis and that would not impact the other also...that the changes should be in buffer itself,and whenever he closes his session all the changes that he had made should not be saved the tables should return back as original one...how can we achieve this in db2..!!
    That is I want my session should not be in autocommit mode..!!

  2. #2
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    Code:
    VALUES APPLICATION_ID()
    or
    Code:
    SELECT APPLICATION_ID()
    FROM   sysibm.sysdummy1
    This is assuming you are using DB2 LUW.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  3. #3
    Join Date
    Feb 2012
    Posts
    4

    Regarding cross checking of different queries fired by different users..!!

    Hi Guys,

    Thanks a lot , the suggested query works..Thanks a lot,..!!

    Is there any query, for the scenario say 5 users are connected as client on a particular ip to db2 with same credentials , now five of them fire different queries , Can I track which queries are fire by whom with the time period of 10 minutes , this is a sort tracking that I want to do..!!

  4. #4
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    An application ID is a unique identifier for a session. So if your question is concerned with multiple clients using the same IP address, you don't have to worry about that. Each client has its own session and, thus, its own application ID.

    Now, if you want to track the specific queries executed by each client, you'll probably use some auditing features instead of trying to roll your own stuff.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  5. #5
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    Quote Originally Posted by stolze View Post

    Now, if you want to track the specific queries executed by each client, you'll probably use some auditing features instead of trying to roll your own stuff.
    Or event monitors
    Visit the new-look IDUG Website , register to gain access to the excellent content.

Posting Permissions

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