472,342 Members | 1,447 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,342 software developers and data experts.

List or Force Applications by Auth ID

Ray
DB2 V7.2
Is it possible to list applications connected to a node by Auth ID?
Is it possible to force applications connected to a node by Auth ID or
am I forced to use App. Handle?

Thanks,
Ray
Nov 12 '05 #1
6 6799
Ray wrote:
DB2 V7.2
Is it possible to list applications connected to a node by Auth ID? Not from the clp...it would be easy to write an app that did this...you
can check out the database monitor samples to use as a template. Is it possible to force applications connected to a node by Auth ID or
am I forced to use App. Handle?

You can only force by app handle...but again, you could write an app
that pulled out all app handles for a particular id, and force them all
with a single request.
Nov 12 '05 #2
Leo
Try piping the output of the list applications command thru grep.

Ex) db2 list applications at node NODENUM | grep AUTHID

Leo
br****@lsmp.com (Ray) wrote in message news:<f3*************************@posting.google.c om>...
DB2 V7.2
Is it possible to list applications connected to a node by Auth ID?
Is it possible to force applications connected to a node by Auth ID or
am I forced to use App. Handle?

Thanks,
Ray

Nov 12 '05 #3
> br****@lsmp.com (Ray) wrote in message news:<f3*************************@posting.google.c om>...
DB2 V7.2
Is it possible to list applications connected to a node by Auth ID?
Is it possible to force applications connected to a node by Auth ID or
am I forced to use App. Handle?

Thanks,
Ray


not directly, on AIX (you didn't mention your OS, it's ALWAYS a good
idea to note the OS and the DB2-version as often answers depens on
that) i'm using the following script:

- the var DB2CMD points to the db2 command
- the user of this script must have the autorithy to force apps
(either as user or via "sudo")

------------------------------------------------------------------------
#!/bin/ksh
#----------------------------------------------------------------------------
# kill all applications of DB for given user
#
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
if [ $# -eq 0 ] ; then
echo " "
echo "*** no arguments given! list only DB-Appls connected to
databases"
$DB2CMD list applications
fi
if [ $# -ne 2 ] ; then
echo "\n usage: `basename $0` DB AuthId \n"
exit 1
fi
DB=$1
USER=`echo $2 | tr "a-z" "A-Z"`
$DB2CMD list applications for db $DB
echo "killing DB-applications: user $USER, db $DB"
export IDS=`$DB2CMD list applications for db $DB | grep -E "^$USER " |
cut -c 25-29`
export IDSK=`echo $IDS | sed -e "s/ /,/g"`
if [[ -z $IDSK ]]
then
echo "No Application to be forced."
else
export FDB="$DB2CMD force applications \("$IDSK"\)"
echo $FDB"\n"
eval $FDB
sleep 3
export IDS=`$DB2CMD list applications for db $DB | grep -E "^$USER"
| cut -c 25-29`
export IDSK=`echo $IDS | sed -e "s/ /,/g"`
if [[ -z $IDSK ]]
then
echo "Applications forced successfully"
else
echo "Applications $IDSK still connected!"
fi
fi

------------------------------------------------------------------------
Nov 12 '05 #4
In DB2 V8:

SELECT * FROM TABLE(SYSPROC.SNAPSHOT_APPL_INFO(CURRENT SERVER,-1)) as
SNAPSHOT_APPL_INFO WHERE EXECUTION_ID = 'your_user'

To force:
SELECT 'force application (' concat char(agent_id) concat ')' FROM
TABLE(SYSPROC.SNAPSHOT_APPL_INFO(CURRENT SERVER,-1)) as
SNAPSHOT_APPL_INFO WHERE EXECUTION_ID = 'your_user'
Pipe the output to a skript and execute it via DB2 CLP

HTH
Joachim

br****@lsmp.com (Ray) wrote in message news:<f3*************************@posting.google.c om>...
DB2 V7.2
Is it possible to list applications connected to a node by Auth ID?
Is it possible to force applications connected to a node by Auth ID or
am I forced to use App. Handle?

Thanks,
Ray

Nov 12 '05 #5
Additional info :

If i'm logged on windows as usera and connect to db2 with userb,
EXECUTION_ID=windows logon/usera
AUTH_ID=db2 connect to ... user /userb

PM

"Joachim Klassen" <Jo*******@email.com> a écrit dans le message de
news:b5**************************@posting.google.c om...
In DB2 V8:

SELECT * FROM TABLE(SYSPROC.SNAPSHOT_APPL_INFO(CURRENT SERVER,-1)) as
SNAPSHOT_APPL_INFO WHERE EXECUTION_ID = 'your_user'

To force:
SELECT 'force application (' concat char(agent_id) concat ')' FROM
TABLE(SYSPROC.SNAPSHOT_APPL_INFO(CURRENT SERVER,-1)) as
SNAPSHOT_APPL_INFO WHERE EXECUTION_ID = 'your_user'
Pipe the output to a skript and execute it via DB2 CLP

HTH
Joachim

br****@lsmp.com (Ray) wrote in message

news:<f3*************************@posting.google.c om>...
DB2 V7.2
Is it possible to list applications connected to a node by Auth ID?
Is it possible to force applications connected to a node by Auth ID or
am I forced to use App. Handle?

Thanks,
Ray

Nov 12 '05 #6
Ray
I am using V7.2 on Window 2000 Server.
I will try and write a quick and dirty app to do it for me. Thanks.

Ray

Jo*******@email.com (Joachim Klassen) wrote in message news:<b5**************************@posting.google. com>...
In DB2 V8:

SELECT * FROM TABLE(SYSPROC.SNAPSHOT_APPL_INFO(CURRENT SERVER,-1)) as
SNAPSHOT_APPL_INFO WHERE EXECUTION_ID = 'your_user'

To force:
SELECT 'force application (' concat char(agent_id) concat ')' FROM
TABLE(SYSPROC.SNAPSHOT_APPL_INFO(CURRENT SERVER,-1)) as
SNAPSHOT_APPL_INFO WHERE EXECUTION_ID = 'your_user'
Pipe the output to a skript and execute it via DB2 CLP

HTH
Joachim

br****@lsmp.com (Ray) wrote in message news:<f3*************************@posting.google.c om>...
DB2 V7.2
Is it possible to list applications connected to a node by Auth ID?
Is it possible to force applications connected to a node by Auth ID or
am I forced to use App. Handle?

Thanks,
Ray

Nov 12 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: thenetflyer | last post by:
<!-- The following sample should authorize the user to log on the site. This works once but after refreshing the browser, it does not prompt again...
0
by: Constandinos Mavromoustakis | last post by:
CFP: CLADE 2004-Challenges of Large Applications in Distributed Environments ------------------------------------------------- PhD student -...
6
by: Bob Stearns | last post by:
I was under the impression that the primary key had to be a unique index. Since I usually create my primary indices before my primary keys, in...
8
by: Keith H | last post by:
I'm looking for a way to force the user to re-authenticate with their Windows username/password/domain after clicking the submit button on an...
1
by: Tod Birdsall, MCSD for .NET | last post by:
Hi All, I have two ASP.NET applications which I am trying to have share forms authentication. But I am running into problems. App A is an...
1
by: db2udbgirl | last post by:
When I issue an db2 list applications on my DB2 UDB V8.2 database on AIX 5.3 I get the following o/p /home/card30/admin] > db2 list applications ...
0
by: mel_apiso | last post by:
Hi, after uncatalog one database, and catalog again with other name, if I try to connect with this database, everything is ok, but list...
5
by: David Longnecker | last post by:
I'm working to create a base framework for our organization for web and client-side applications. The framework interfaces with several of our...
4
by: =?Utf-8?B?RmFyaWJh?= | last post by:
It know that we can use the following method http://msdn2.microsoft.com/en-us/library/eb0zx8fc.aspx to form authenticate across multiple...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.