[cvsnt] sessionid as foreign key

bwhicks at aep.com bwhicks at aep.com
Thu Jul 19 16:43:47 BST 2007

Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.

cvsnt-bounces at cvsnt.org wrote on 07/18/2007 05:23:32 PM:

> It gets the session id from a 'select identity_val_local()' appended to 
> the session insert string (the whole string is something like 'begin 
> atomic; insert into xxxxx; select identity_val_local(); end').
> I can't think of a reason why that would suddenly stop working if it 
> worked before unless there's a way to switch that functionality off 
> globally.

Our DB2 admin (Kristi) submitted a query using the above info and had 
success. Here's the full text of her results:

Insert Into cvsuser.SessionLog (Command, Date, Hostname, Username, 
SessionId, VirtRepos, PhysRepos, Client) 
('tag','2007-07-20 20:40:21', 
'Kristi Test')
DB20000I  The SQL command completed successfully.

db2 select identity_val_local() from cvsuser.sessionlog fetch first 1 row 


db2 select id, client from cvsuser.sessionlog where id = 68855

----- -----------
68855 Kristi Test

So the function works as expected. The return value just seems to get lost 
before the next query happens (to insert something like taglog data). 

Thanks for your help, Tony...


More information about the cvsnt mailing list
Download the latest CVSNT, TortosieCVS, WinCVS etc. for Windows 8 etc.
@CVSNT on Twitter   CVSNT on Facebook