By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,105 Members | 1,452 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,105 IT Pros & Developers. It's quick & easy.

Number of applications only growing

P: n/a
I've installed a fresh DB2 V9.1 server (Express-C). Now I see, that the
number of applications (db2 list applications) is growing all the times
when a script is run which makes some database operations. This is on
Linux.

I tested the same script against an older DB2 V7 on AIX and the number
of applications (db2bp) is growing by one, but then the db2bp
disappears, so the number of applications is not growing all the time.

Here is the script:

#!/bin/sh
#
# CVS-ID: $Id: import_stammdaten.sh,v 1.1 2006/05/18 13:59:46 wagner
Exp $ #

init ()
{
LANG=C
expFormat=DEL
connect=0

# Kommandozeilen-Parameter abarbeiten
while [ -n "$1" ]
do
case $1 in
-del)
expFormat=DEL
shift;;
-ixf)
expFormat=IXF
shift;;
*)
usage;;
esac
done

db2 CONNECT TO telematx USER lzgneu USING lzg
connect=1
tableDeleteList="FORMATS SAMMELALARME SAMMELMELDUNG TEXTS WOERTER \
RELATION BFST MDST MWST SWST ZWST STPRIO NETZ VERZOEGERUNG \
VERZ_DAUER STST"
tableInsertList="FORMATS SAMMELALARME SAMMELMELDUNG WOERTER TEXTS \
STST STPRIO MDST BFST MWST SWST ZWST RELATION NETZ VERZ_DAUER \
VERZOEGERUNG"
}
usage ()
{
echo ""
echo "usage : import_stammdaten.sh <-del|-ixf>"
echo ""
fine 0
}
fine ()
{
if [ $connect -eq 1 ]
then
db2 terminate >/dev/null 2>&1
fi
exit $1
}
fatalError ()
{
echo ""
echo " ES IST EIN FATALER FEHLER AUFGETRETEN"
echo " TROTZDEM FORTFAHREN ? (y/n)"
read x
if [ "$x" != y ]
then
fine 1
fi
}
db2Command ()
{
echo "$1" | tr '[:blank:]' ' '
rv=`db2 "$1" | egrep -v "$2|----|selected" | tr '\n' ' ' \
| tr -s '[:blank:]'`
echo $rv

if [ $? -ne 0 ]
then
fatalError
fi
}
main ()
{
gzFiles=`ls *.gz 2>>/dev/null`
if [ $? -eq 0 ]
then
for fileName in `echo *.gz 2>>/dev/null`
do
gzip -d $fileName
echo " Unzipping $fileName"
done
fi

mkdir -p temp
for fileName in *
do
if [ -f $fileName ]
then
newFileName=`echo $fileName | tr '[:lower:]' '[:upper:]'`
ln -f $fileName temp/$newFileName
fi
done
cd temp
echo *

for tabName in $tableDeleteList
do
echo $tabName
if [ ! -f $tabName.$expFormat ]
then
echo "Datei $tabName.$expFormat wurde nicht gefunden"
echo "Die Daten aus der Tabelle werden jedoch später gelöscht!"
fatalError
fi
done

echo "SOLLEN JETZT ALLE STAMMDATEN GELÖSCHT WERDEN? (y/n)"
read x
if [ "$x" = y ]
then
for tabName in $tableDeleteList
do
if [ "$tabName" = "TEXTS" -o "$tabName" = "WOERTER" ]
then
db2Command "SELECT COALESCE (MAX(nr), 1) AS MAXIMUM FROM \
lzgneu.$tabName" MAXIMUM
maxNr=$rv
if [ "$maxNr" = " -" -o "$maxNr" = "-" -o "$maxNr" = "- " ]
then
maxNr=0
fi
aktNr=0
while [ $aktNr -lt $maxNr ]
do
aktNr=`expr $aktNr + 1000`
db2Command "DELETE FROM lzgneu.$tabName \
WHERE nr <= $aktNr" dummie
sleep 1
done
elif [ "$tabName" = "RELATION" ]
then
aktNr=0
while [ $aktNr -lt 260 ]
do
aktNr=`expr $aktNr + 20`
db2Command "DELETE FROM lzgneu.$tabName WHERE \
lfdnr < $aktNr" dummie
sleep 1
done
elif [ "$tabName" = "NETZ" ]
then
aktNr=0
while [ $aktNr -lt 260 ]
do
aktNr=`expr $aktNr + 20`
db2Command "DELETE FROM lzgneu.$tabName WHERE \
lfdnr_start < $aktNr" dummie
sleep 1
done
fi
db2Command "DELETE FROM lzgneu.$tabName" dummie
sleep 1
db2Command "REORG TABLE lzgneu.$tabName" dummie
sleep 1
done
fi

echo "SOLLEN JETZT DIE STAMMDATEN IMPORTIERT WERDEN? (y/n)"
read x
if [ "$x" = y ]
then
for tabName in $tableInsertList
do
if [ -f $tabName.$expFormat.gz ]
then
echo " Unzipping $tabName.$expFormat.gz"
gzip -d $tabName.$expFormat.gz
fi

db2Command "IMPORT from $tabName.$expFormat OF $expFormat \
COMMITCOUNT 10000 INSERT INTO lzgneu.$tabName" dummie
sleep 1
db2Command "REORG TABLE lzgneu.$tabName" dummie
sleep 1
done
fi

echo "SOLLEN JETZT DIE PACKAGES NEU GEBUNDEN WERDEN? (y/n)"
read x
if [ "$x" = y ]
then
for j in `db2 -x "SELECT pkgname FROM syscat.packages \
WHERE pkgschema != 'NULLID'"`
do
db2Command "REBIND lzgneu.$j" dummie
sleep 1
done
fi
cd ..
rm -rf temp
}

init $*
main
fine 0

During the delete loop I see the number of db2bp growing, I thing 1 for
every db2 statement. Why?
It's a big problem for me. I've never seen such a behavior before!

Regards,
Burkhard
Dec 20 '07 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Burkhard Schultheis schrieb:
I've installed a fresh DB2 V9.1 server (Express-C). Now I see, that the
number of applications (db2 list applications) is growing all the times
when a script is run which makes some database operations. This is on
Linux.

I tested the same script against an older DB2 V7 on AIX and the number
of applications (db2bp) is growing by one, but then the db2bp
disappears, so the number of applications is not growing all the time.

Here is the script:

#!/bin/sh
#
# CVS-ID: $Id: import_stammdaten.sh,v 1.1 2006/05/18 13:59:46 wagner
Exp $ #

init ()
{
LANG=C
expFormat=DEL
connect=0

# Kommandozeilen-Parameter abarbeiten
while [ -n "$1" ]
do
case $1 in
-del)
expFormat=DEL
shift;;
-ixf)
expFormat=IXF
shift;;
*)
usage;;
esac
done

db2 CONNECT TO telematx USER lzgneu USING lzg
connect=1
tableDeleteList="FORMATS SAMMELALARME SAMMELMELDUNG TEXTS WOERTER \
RELATION BFST MDST MWST SWST ZWST STPRIO NETZ VERZOEGERUNG \
VERZ_DAUER STST"
tableInsertList="FORMATS SAMMELALARME SAMMELMELDUNG WOERTER TEXTS \
STST STPRIO MDST BFST MWST SWST ZWST RELATION NETZ VERZ_DAUER \
VERZOEGERUNG"
}
usage ()
{
echo ""
echo "usage : import_stammdaten.sh <-del|-ixf>"
echo ""
fine 0
}
fine ()
{
if [ $connect -eq 1 ]
then
db2 terminate >/dev/null 2>&1
fi
exit $1
}
fatalError ()
{
echo ""
echo " ES IST EIN FATALER FEHLER AUFGETRETEN"
echo " TROTZDEM FORTFAHREN ? (y/n)"
read x
if [ "$x" != y ]
then
fine 1
fi
}
db2Command ()
{
echo "$1" | tr '[:blank:]' ' '
rv=`db2 "$1" | egrep -v "$2|----|selected" | tr '\n' ' ' \
| tr -s '[:blank:]'`
echo $rv

if [ $? -ne 0 ]
then
fatalError
fi
}
main ()
{
gzFiles=`ls *.gz 2>>/dev/null`
if [ $? -eq 0 ]
then
for fileName in `echo *.gz 2>>/dev/null`
do
gzip -d $fileName
echo " Unzipping $fileName"
done
fi

mkdir -p temp
for fileName in *
do
if [ -f $fileName ]
then
newFileName=`echo $fileName | tr '[:lower:]' '[:upper:]'`
ln -f $fileName temp/$newFileName
fi
done
cd temp
echo *

for tabName in $tableDeleteList
do
echo $tabName
if [ ! -f $tabName.$expFormat ]
then
echo "Datei $tabName.$expFormat wurde nicht gefunden"
echo "Die Daten aus der Tabelle werden jedoch später gelöscht!"
fatalError
fi
done

echo "SOLLEN JETZT ALLE STAMMDATEN GELÖSCHT WERDEN? (y/n)"
read x
if [ "$x" = y ]
then
for tabName in $tableDeleteList
do
if [ "$tabName" = "TEXTS" -o "$tabName" = "WOERTER" ]
then
db2Command "SELECT COALESCE (MAX(nr), 1) AS MAXIMUM FROM \
lzgneu.$tabName" MAXIMUM
maxNr=$rv
if [ "$maxNr" = " -" -o "$maxNr" = "-" -o "$maxNr" = "- " ]
then
maxNr=0
fi
aktNr=0
while [ $aktNr -lt $maxNr ]
do
aktNr=`expr $aktNr + 1000`
db2Command "DELETE FROM lzgneu.$tabName \
WHERE nr <= $aktNr" dummie
sleep 1
done
elif [ "$tabName" = "RELATION" ]
then
aktNr=0
while [ $aktNr -lt 260 ]
do
aktNr=`expr $aktNr + 20`
db2Command "DELETE FROM lzgneu.$tabName WHERE \
lfdnr < $aktNr" dummie
sleep 1
done
elif [ "$tabName" = "NETZ" ]
then
aktNr=0
while [ $aktNr -lt 260 ]
do
aktNr=`expr $aktNr + 20`
db2Command "DELETE FROM lzgneu.$tabName WHERE \
lfdnr_start < $aktNr" dummie
sleep 1
done
fi
db2Command "DELETE FROM lzgneu.$tabName" dummie
sleep 1
db2Command "REORG TABLE lzgneu.$tabName" dummie
sleep 1
done
fi

echo "SOLLEN JETZT DIE STAMMDATEN IMPORTIERT WERDEN? (y/n)"
read x
if [ "$x" = y ]
then
for tabName in $tableInsertList
do
if [ -f $tabName.$expFormat.gz ]
then
echo " Unzipping $tabName.$expFormat.gz"
gzip -d $tabName.$expFormat.gz
fi

db2Command "IMPORT from $tabName.$expFormat OF $expFormat \
COMMITCOUNT 10000 INSERT INTO lzgneu.$tabName" dummie
sleep 1
db2Command "REORG TABLE lzgneu.$tabName" dummie
sleep 1
done
fi

echo "SOLLEN JETZT DIE PACKAGES NEU GEBUNDEN WERDEN? (y/n)"
read x
if [ "$x" = y ]
then
for j in `db2 -x "SELECT pkgname FROM syscat.packages \
WHERE pkgschema != 'NULLID'"`
do
db2Command "REBIND lzgneu.$j" dummie
sleep 1
done
fi
cd ..
rm -rf temp
}

init $*
main
fine 0

During the delete loop I see the number of db2bp growing, I thing 1 for
every db2 statement. Why?
It's a big problem for me. I've never seen such a behavior before!
On a second machine with DB2 V9 it's the same problem! :-( For every
statement there is a new process until the maximum number of connections
is reached. Bug in 9.1?

Regards,
Burkhard
Dec 20 '07 #2

P: n/a
Burkhard Schultheis wrote:
Burkhard Schultheis schrieb:
>>I've installed a fresh DB2 V9.1 server (Express-C). Now I see, that the
number of applications (db2 list applications) is growing all the times
when a script is run which makes some database operations. This is on
Linux.

I tested the same script against an older DB2 V7 on AIX and the number
of applications (db2bp) is growing by one, but then the db2bp
disappears, so the number of applications is not growing all the time.

Here is the script:

#!/bin/sh
#
# CVS-ID: $Id: import_stammdaten.sh,v 1.1 2006/05/18 13:59:46 wagner
Exp $ #

init ()
{
LANG=C
expFormat=DEL
connect=0

# Kommandozeilen-Parameter abarbeiten
while [ -n "$1" ]
do
case $1 in
-del)
expFormat=DEL
shift;;
-ixf)
expFormat=IXF
shift;;
*)
usage;;
esac
done

db2 CONNECT TO telematx USER lzgneu USING lzg
connect=1
tableDeleteList="FORMATS SAMMELALARME SAMMELMELDUNG TEXTS WOERTER \
RELATION BFST MDST MWST SWST ZWST STPRIO NETZ VERZOEGERUNG \
VERZ_DAUER STST"
tableInsertList="FORMATS SAMMELALARME SAMMELMELDUNG WOERTER TEXTS \
STST STPRIO MDST BFST MWST SWST ZWST RELATION NETZ VERZ_DAUER \
VERZOEGERUNG"
}
usage ()
{
echo ""
echo "usage : import_stammdaten.sh <-del|-ixf>"
echo ""
fine 0
}
fine ()
{
if [ $connect -eq 1 ]
then
db2 terminate >/dev/null 2>&1
fi
exit $1
}
fatalError ()
{
echo ""
echo " ES IST EIN FATALER FEHLER AUFGETRETEN"
echo " TROTZDEM FORTFAHREN ? (y/n)"
read x
if [ "$x" != y ]
then
fine 1
fi
}
db2Command ()
{
echo "$1" | tr '[:blank:]' ' '
rv=`db2 "$1" | egrep -v "$2|----|selected" | tr '\n' ' ' \
| tr -s '[:blank:]'`
echo $rv

if [ $? -ne 0 ]
then
fatalError
fi
}
main ()
{
gzFiles=`ls *.gz 2>>/dev/null`
if [ $? -eq 0 ]
then
for fileName in `echo *.gz 2>>/dev/null`
do
gzip -d $fileName
echo " Unzipping $fileName"
done
fi

mkdir -p temp
for fileName in *
do
if [ -f $fileName ]
then
newFileName=`echo $fileName | tr '[:lower:]' '[:upper:]'`
ln -f $fileName temp/$newFileName
fi
done
cd temp
echo *

for tabName in $tableDeleteList
do
echo $tabName
if [ ! -f $tabName.$expFormat ]
then
echo "Datei $tabName.$expFormat wurde nicht gefunden"
echo "Die Daten aus der Tabelle werden jedoch später gelöscht!"
fatalError
fi
done

echo "SOLLEN JETZT ALLE STAMMDATEN GELÖSCHT WERDEN? (y/n)"
read x
if [ "$x" = y ]
then
for tabName in $tableDeleteList
do
if [ "$tabName" = "TEXTS" -o "$tabName" = "WOERTER" ]
then
db2Command "SELECT COALESCE (MAX(nr), 1) AS MAXIMUM FROM \
lzgneu.$tabName" MAXIMUM
maxNr=$rv
if [ "$maxNr" = " -" -o "$maxNr" = "-" -o "$maxNr" = "- " ]
then
maxNr=0
fi
aktNr=0
while [ $aktNr -lt $maxNr ]
do
aktNr=`expr $aktNr + 1000`
db2Command "DELETE FROM lzgneu.$tabName \
WHERE nr <= $aktNr" dummie
sleep 1
done
elif [ "$tabName" = "RELATION" ]
then
aktNr=0
while [ $aktNr -lt 260 ]
do
aktNr=`expr $aktNr + 20`
db2Command "DELETE FROM lzgneu.$tabName WHERE \
lfdnr < $aktNr" dummie
sleep 1
done
elif [ "$tabName" = "NETZ" ]
then
aktNr=0
while [ $aktNr -lt 260 ]
do
aktNr=`expr $aktNr + 20`
db2Command "DELETE FROM lzgneu.$tabName WHERE \
lfdnr_start < $aktNr" dummie
sleep 1
done
fi
db2Command "DELETE FROM lzgneu.$tabName" dummie
sleep 1
db2Command "REORG TABLE lzgneu.$tabName" dummie
sleep 1
done
fi

echo "SOLLEN JETZT DIE STAMMDATEN IMPORTIERT WERDEN? (y/n)"
read x
if [ "$x" = y ]
then
for tabName in $tableInsertList
do
if [ -f $tabName.$expFormat.gz ]
then
echo " Unzipping $tabName.$expFormat.gz"
gzip -d $tabName.$expFormat.gz
fi

db2Command "IMPORT from $tabName.$expFormat OF $expFormat \
COMMITCOUNT 10000 INSERT INTO lzgneu.$tabName" dummie
sleep 1
db2Command "REORG TABLE lzgneu.$tabName" dummie
sleep 1
done
fi

echo "SOLLEN JETZT DIE PACKAGES NEU GEBUNDEN WERDEN? (y/n)"
read x
if [ "$x" = y ]
then
for j in `db2 -x "SELECT pkgname FROM syscat.packages \
WHERE pkgschema != 'NULLID'"`
do
db2Command "REBIND lzgneu.$j" dummie
sleep 1
done
fi
cd ..
rm -rf temp
}

init $*
main
fine 0

During the delete loop I see the number of db2bp growing, I thing 1 for
every db2 statement. Why?
It's a big problem for me. I've never seen such a behavior before!


On a second machine with DB2 V9 it's the same problem! :-( For every
statement there is a new process until the maximum number of connections
is reached. Bug in 9.1?

Regards,
Burkhard
Did you try searching the APAR list for V9 fixpaks for candidates? Or
perhaps just applying the latest fixpak?

Larry
Dec 20 '07 #3

P: n/a
Larry schrieb:
Burkhard Schultheis wrote:
>Burkhard Schultheis schrieb:
>>I've installed a fresh DB2 V9.1 server (Express-C). Now I see, that the
number of applications (db2 list applications) is growing all the times
when a script is run which makes some database operations. This is on
Linux.

I tested the same script against an older DB2 V7 on AIX and the number
of applications (db2bp) is growing by one, but then the db2bp
disappears, so the number of applications is not growing all the time.

Here is the script:

#!/bin/sh
#
# CVS-ID: $Id: import_stammdaten.sh,v 1.1 2006/05/18 13:59:46 wagner
Exp $ #

init ()
{
LANG=C
expFormat=DEL
connect=0

# Kommandozeilen-Parameter abarbeiten
while [ -n "$1" ]
do
case $1 in
-del)
expFormat=DEL
shift;;
-ixf)
expFormat=IXF
shift;;
*)
usage;;
esac
done

db2 CONNECT TO telematx USER lzgneu USING lzg
connect=1
tableDeleteList="FORMATS SAMMELALARME SAMMELMELDUNG TEXTS WOERTER \
RELATION BFST MDST MWST SWST ZWST STPRIO NETZ VERZOEGERUNG \
VERZ_DAUER STST"
tableInsertList="FORMATS SAMMELALARME SAMMELMELDUNG WOERTER TEXTS \
STST STPRIO MDST BFST MWST SWST ZWST RELATION NETZ VERZ_DAUER \
VERZOEGERUNG"
}
usage ()
{
echo ""
echo "usage : import_stammdaten.sh <-del|-ixf>"
echo ""
fine 0
}
fine ()
{
if [ $connect -eq 1 ]
then
db2 terminate >/dev/null 2>&1
fi
exit $1
}
fatalError ()
{
echo ""
echo " ES IST EIN FATALER FEHLER AUFGETRETEN"
echo " TROTZDEM FORTFAHREN ? (y/n)"
read x
if [ "$x" != y ]
then
fine 1
fi
}
db2Command ()
{
echo "$1" | tr '[:blank:]' ' '
rv=`db2 "$1" | egrep -v "$2|----|selected" | tr '\n' ' ' \
| tr -s '[:blank:]'`
echo $rv

if [ $? -ne 0 ]
then
fatalError
fi
}
main ()
{
gzFiles=`ls *.gz 2>>/dev/null`
if [ $? -eq 0 ]
then
for fileName in `echo *.gz 2>>/dev/null`
do
gzip -d $fileName
echo " Unzipping $fileName"
done
fi

mkdir -p temp
for fileName in *
do
if [ -f $fileName ]
then
newFileName=`echo $fileName | tr '[:lower:]' '[:upper:]'`
ln -f $fileName temp/$newFileName
fi
done
cd temp
echo *

for tabName in $tableDeleteList
do
echo $tabName
if [ ! -f $tabName.$expFormat ]
then
echo "Datei $tabName.$expFormat wurde nicht gefunden"
echo "Die Daten aus der Tabelle werden jedoch später gelöscht!"
fatalError
fi
done

echo "SOLLEN JETZT ALLE STAMMDATEN GELÖSCHT WERDEN? (y/n)"
read x
if [ "$x" = y ]
then
for tabName in $tableDeleteList
do
if [ "$tabName" = "TEXTS" -o "$tabName" = "WOERTER" ]
then
db2Command "SELECT COALESCE (MAX(nr), 1) AS MAXIMUM FROM \
lzgneu.$tabName" MAXIMUM
maxNr=$rv
if [ "$maxNr" = " -" -o "$maxNr" = "-" -o "$maxNr" = "- " ]
then
maxNr=0
fi
aktNr=0
while [ $aktNr -lt $maxNr ]
do
aktNr=`expr $aktNr + 1000`
db2Command "DELETE FROM lzgneu.$tabName \
WHERE nr <= $aktNr" dummie
sleep 1
done
elif [ "$tabName" = "RELATION" ]
then
aktNr=0
while [ $aktNr -lt 260 ]
do
aktNr=`expr $aktNr + 20`
db2Command "DELETE FROM lzgneu.$tabName WHERE \
lfdnr < $aktNr" dummie
sleep 1
done
elif [ "$tabName" = "NETZ" ]
then
aktNr=0
while [ $aktNr -lt 260 ]
do
aktNr=`expr $aktNr + 20`
db2Command "DELETE FROM lzgneu.$tabName WHERE \
lfdnr_start < $aktNr" dummie
sleep 1
done
fi
db2Command "DELETE FROM lzgneu.$tabName" dummie
sleep 1
db2Command "REORG TABLE lzgneu.$tabName" dummie
sleep 1
done
fi

echo "SOLLEN JETZT DIE STAMMDATEN IMPORTIERT WERDEN? (y/n)"
read x
if [ "$x" = y ]
then
for tabName in $tableInsertList
do
if [ -f $tabName.$expFormat.gz ]
then
echo " Unzipping $tabName.$expFormat.gz"
gzip -d $tabName.$expFormat.gz
fi

db2Command "IMPORT from $tabName.$expFormat OF $expFormat \
COMMITCOUNT 10000 INSERT INTO lzgneu.$tabName" dummie
sleep 1
db2Command "REORG TABLE lzgneu.$tabName" dummie
sleep 1
done
fi

echo "SOLLEN JETZT DIE PACKAGES NEU GEBUNDEN WERDEN? (y/n)"
read x
if [ "$x" = y ]
then
for j in `db2 -x "SELECT pkgname FROM syscat.packages \
WHERE pkgschema != 'NULLID'"`
do
db2Command "REBIND lzgneu.$j" dummie
sleep 1
done
fi
cd ..
rm -rf temp
}

init $*
main
fine 0

During the delete loop I see the number of db2bp growing, I thing 1 for
every db2 statement. Why?
It's a big problem for me. I've never seen such a behavior before!

On a second machine with DB2 V9 it's the same problem! :-( For every
statement there is a new process until the maximum number of connections
is reached. Bug in 9.1?

Regards,
Burkhard
Did you try searching the APAR list for V9 fixpaks for candidates? Or
perhaps just applying the latest fixpak?
Nothing found for "connect" and "maximum". :-( Today I'll try 9.5.

Regards,
Burkhard
Dec 21 '07 #4

P: n/a
Now I have tested some scripts with 9.1:

Burkhard Schultheis schrieb:

An here is the problem:
>
db2Command ()
{
echo "$1" | tr '[:blank:]' ' '
rv=`db2 "$1" | egrep -v "$2|----|selected" | tr '\n' ' ' \
| tr -s '[:blank:]'`
echo $rv

if [ $? -ne 0 ]
then
fatalError
fi
}
If I change it to
db2Command ()
{
db2 "$1"
}

then I got no extra processes!

Any idea why? As I wrote, on AIX with V7.x it was ok with the original
script!

Regards,
Burkhard
Dec 21 '07 #5

P: n/a
On Dec 21, 9:45 am, Burkhard Schultheis <schulth...@tde-online.de>
wrote:
[...]
>
Any idea why? As I wrote, on AIX with V7.x it was ok with the original
script!
Not really. But you might be able to track your problem by executing
your script with -x (or add -x to the first line in your script as in
#!/bin/sh -x)

/Lennart
Dec 21 '07 #6

P: n/a
Ian
Burkhard Schultheis wrote:
Now I have tested some scripts with 9.1:

Burkhard Schultheis schrieb:

An here is the problem:
>db2Command ()
{
echo "$1" | tr '[:blank:]' ' '
rv=`db2 "$1" | egrep -v "$2|----|selected" | tr '\n' ' ' \
| tr -s '[:blank:]'`
echo $rv

if [ $? -ne 0 ]
then
fatalError
fi
}

If I change it to
db2Command ()
{
db2 "$1"
}

then I got no extra processes!

Any idea why? As I wrote, on AIX with V7.x it was ok with the original
script!
The difference here is that using the backticks causes the db2 command
to execute in a different shell.

Therefore, each time you execute db2Command(), the 'db2' command will
create a separate db2bp. Normally, when the shell goes away, the db2bp
process automatically goes away -- so it would seem that something is
awry here.


Dec 22 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.