db2GetSnapshot : own APPL_ID ?

db2GetSnapshot : own APPL_ID ?

Post by Mik » Sun, 16 Dec 2001 05:09:52



Using the db2GetSnapshot API,
for request type SQLMA_DBASE_APPLINFO
how can a program know *which* of the
many connections returned
is its own "APPL_ID" , when the program cannot
distinguish this by APPL_NAME or AUTH_ID.

I'm using UDB EE v7.2 on AIX.

In my case there are multiple instances
of the same program running locally
 (so I cannot distinguish by APPL_NAME)
and these are often with the same userid
 (so I cannot distinguish by AUTH_ID)
therefore the only method is to
distinguish by APPL_ID.

But how to recognize programmatically
which of the many records returned corresponds
to "my" own process ?

I don't know if it is actually possible.
But is there some other API available to retrieve the
current APPL_ID within an application ?

--

 
 
 

db2GetSnapshot : own APPL_ID ?

Post by Fan Ruo Xi » Fri, 21 Dec 2001 10:19:20


snapshot and "list applications show detail" (I don't know Which API is
for this).

> Using the db2GetSnapshot API,
> for request type SQLMA_DBASE_APPLINFO
> how can a program know *which* of the
> many connections returned
> is its own "APPL_ID" , when the program cannot
> distinguish this by APPL_NAME or AUTH_ID.

> I'm using UDB EE v7.2 on AIX.

> In my case there are multiple instances
> of the same program running locally
>  (so I cannot distinguish by APPL_NAME)
> and these are often with the same userid
>  (so I cannot distinguish by AUTH_ID)
> therefore the only method is to
> distinguish by APPL_ID.

> But how to recognize programmatically
> which of the many records returned corresponds
> to "my" own process ?

> I don't know if it is actually possible.
> But is there some other API available to retrieve the
> current APPL_ID within an application ?

> --


 
 
 

db2GetSnapshot : own APPL_ID ?

Post by Michael Bhol » Sat, 22 Dec 2001 01:31:16


I think I've seen this requirement before.... you need to write a UDF and
return the appl_id from the dbinfo input parameter.

http://groups.google.com/groups?hl=en&rnum=4&selm=slrn9u37v7.usf.stol...
olze.stl.ibm.com



> snapshot and "list applications show detail" (I don't know Which API is
> for this).


> > Using the db2GetSnapshot API,
> > for request type SQLMA_DBASE_APPLINFO
> > how can a program know *which* of the
> > many connections returned
> > is its own "APPL_ID" , when the program cannot
> > distinguish this by APPL_NAME or AUTH_ID.

> > I'm using UDB EE v7.2 on AIX.

> > In my case there are multiple instances
> > of the same program running locally
> >  (so I cannot distinguish by APPL_NAME)
> > and these are often with the same userid
> >  (so I cannot distinguish by AUTH_ID)
> > therefore the only method is to
> > distinguish by APPL_ID.

> > But how to recognize programmatically
> > which of the many records returned corresponds
> > to "my" own process ?

> > I don't know if it is actually possible.
> > But is there some other API available to retrieve the
> > current APPL_ID within an application ?

> > --