473,405 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 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 6908
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 for login until all browser (IE 6) windows are...
0
by: Constandinos Mavromoustakis | last post by:
CFP: CLADE 2004-Challenges of Large Applications in Distributed Environments ------------------------------------------------- PhD student - Dept.Informatics at Aristotle University of...
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 order to get the indices in the same schema as their...
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 ASP.NET page. This is for an internal application. ...
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 ASP.NET 2.0 Beta 2 application. App B is an ASP.NET...
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 Auth Id Application Appl. Application Id...
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 applications only show me the connection with the...
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 systems and provides the business and data layer...
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 applications. I have created an asp.net application...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.