Tim ,
In Unix, I have a short Shell that get me back just the LOCAL databases, avoiding 
ALIAS or REMOTEs.
You can traslate it to W/NT.
================================================
#!/bin/ksh
#
 $HOME/sqllib/db2profile;
#
# The parameter |sort|uniq will filter the same DB's and get the output for just one DB
#
 LOCALDBNAME=`db2 list database directory |grep 'Database name' |awk '{print $4 }' 
|sort|uniq`
 echo $LOCALDBNAME
#
=================================================
Maybe it can help you.

Miguel Celi
DB2 DBA
Northern Trust Bank
Chicago


Subj:   [DB2EUG] How can I get a listing of local databases via a db2 command line. 
Date:   Thu, 21 Mar 2002 2:52:25 PM Eastern Standard Time 
From:   [EMAIL PROTECTED] 
To:   [EMAIL PROTECTED] 
 
Hello list,

I am currently working on some automation and want to know of a way to get
a listing
of only the local databases that are cataloged on a machine.  I thought the
list active
databases might be the direction to go, but would only be effective if all
of the databases
had a connection at all times.  Apparently that is not the case here.

DB2 UDB NT version 6.1
REXX for Windows

Anyone have any other ideas?

Thanks,
Tim Traxson
[EMAIL PROTECTED]
479-820-8811

-
:::  When replying to the list, please use 'Reply-All' and make sure
:::  a copy goes to the list ([EMAIL PROTECTED]).
***  To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED]
***  For more information, check http://www.db2eug.uni.cc
 

-
:::  When replying to the list, please use 'Reply-All' and make sure
:::  a copy goes to the list ([EMAIL PROTECTED]).
***  To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED]
***  For more information, check http://www.db2eug.uni.cc

Reply via email to