This is Partition wise export.
db2_all "<<+0< db2 connect to sample; db2 export to ./exp/tabname.0.ixf
of ixf select * from tabname where nodenumber(Partitionkey) = 0 ;" >
outputfilename.0
db2_all "<<+11< db2 connect to sample; db2 export to
./exp/tabname.11.ixf of ixf select * from tabname where
nodenumber(Partitionkey) = 11 ;" > outputfilename.11
Need to add as per ur node entries in db2nodes.cfg file & save it as a
.sql file say test.sql and need to invoke this .sql file as like given
below.
db2 -tvf test.sql -z test.sql.out
With Regards
Balakrishnan Ethiraju
> I am new to shell scripting. I need to use the db2_all command in a
> shell script can someone help.
[quoted text clipped - 6 lines]
>
> Thanks in advance.
Hi Bala,
I understand that it is a partition wise export, but the syntax you
gave me wont help me. I need it to run from one command rather than
split it into multiple nodes.
Sandip
> This is Partition wise export.
>
[quoted text clipped - 26 lines]
> >
> > Thanks in advance.
chettiar - 10 Jul 2006 10:16 GMT
Hi,
I am trying to do this in my shell
for n in 0 1 2 3 4 5 6 7 8
do
st="export to test.ixf.00"${n}" of ixf select "${ln}" from
ADW.DETECTEDCF_06025 where dbpartitionnum(Customerid) = current
dbpartitionnum AND DateDetected < '2006-06-29 23:00:04.530000'"
db2_all "<<+$n< db2 connect to mldwdb; db2 \" select * from
ADW.DETECTEDCF_06025 where dbpartitionnum(Customerid) = current
dbpartitionnum and DateDetected = '2006-06-29 23:00:04.530000' \"; db2
terminate "
# echo $st
done
But it errors out. Can some one pls help
> Hi Bala,
>
[quoted text clipped - 34 lines]
> > >
> > > Thanks in advance.