This is a discussion on List or Force Applications by Auth ID within the DB2 forums, part of the Database Server Software category; --> DB2 V7.2 Is it possible to list applications connected to a node by Auth ID? Is it possible to ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| 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. |
| |||
| Try piping the output of the list applications command thru grep. Ex) db2 list applications at node NODENUM | grep AUTHID Leo briggs@lsmp.com (Ray) wrote in message news:<f3c3a1a3.0312080755.bf50bf6@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 |
| |||
| > briggs@lsmp.com (Ray) wrote in message news:<f3c3a1a3.0312080755.bf50bf6@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 ------------------------------------------------------------------------ |
| |||
| 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 briggs@lsmp.com (Ray) wrote in message news:<f3c3a1a3.0312080755.bf50bf6@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 |
| |||
| 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" <JoKlassen@email.com> a écrit dans le message de news:b5788ff3.0312092338.42a075ea@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 > > briggs@lsmp.com (Ray) wrote in message news:<f3c3a1a3.0312080755.bf50bf6@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 |
| ||||
| 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 JoKlassen@email.com (Joachim Klassen) wrote in message news:<b5788ff3.0312092338.42a075ea@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 > > briggs@lsmp.com (Ray) wrote in message news:<f3c3a1a3.0312080755.bf50bf6@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 |