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 > session settings in db2

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-04-12, 22:43
KAREENA KAREENA is offline
Registered User
 
Join Date: Feb 2012
Posts: 4
Exclamation 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..!!
Reply With Quote
  #2 (permalink)  
Old 02-05-12, 14:40
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
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
Reply With Quote
  #3 (permalink)  
Old 02-07-12, 09:28
KAREENA KAREENA is offline
Registered User
 
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..!!
Reply With Quote
  #4 (permalink)  
Old 02-07-12, 12:33
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
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
Reply With Quote
  #5 (permalink)  
Old 02-07-12, 19:23
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
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.
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