Im the author of this particular script so I can help you out here.  I built
my scripts as modular as possibvle to resuse code and make changes easier to
manage.  The "get.instance.names" is a subroutine.  In fact all this
subroutine does is issue the db2ilist command.  The get.database.names
script also uses DB2 commands to strip off the database names from a "list
database directory" command.  Make sure you do two other things.

1.  Change the directory name where the db2profile is located on your
companies machines
2.  Grep -v any datbase that are cataloged remote databases

Here is what it would look like:

> ALL_DB_ERRORS=false
        DB2INST="`db2ilist`"
        # . get.instance.names
> for DB2INST in $DB2ILIST
> do
>    . /db2_6000/$DB2INST/sqllib/db2profile >/dev/null 2>&1
>    echo "\nStarting Instance $DB2INST, Path $DB2IPATH"
           db2 attach to $DB2INST user ... using ...
>    # .attach.to.instance
           LOCDBNAMES="`db2 list database directory | grep alias | cut
-c36-45`"
>    # . get.database.names
>    ERRORS=false
>    for DBNAME in $LOCDBNAMES
>    do
>       RPTFILE="$DB2IPATH/spacereports/`echo $DBNAME | tr [':upper:']
> [':lower:']` \
> 
> 
> 
> TTFN and Hold Fast!
> Scott McLeod of MacLeod
> Best Buy, Inc.
> Sr. Database Architect
> 7750 Flying Cloud Dr.
> Eden Prairie, MN 55344
> 
> (612) 324-0031 (voice)
> (612) 324-0828 (fax)
> 
> [EMAIL PROTECTED]
> 
> 

=====
To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED]
For other info (and scripts), see http://people.mn.mediaone.net/scottrmcleod

Reply via email to