Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / July 2006

Tip: Looking for answers? Try searching our database.

db2_all help

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
chettiar - 02 Jul 2006 08:11 GMT
I am new to shell scripting. I need to use the db2_all command in a
shell script can someone help.

I need to use the following command in the shell script:

db2_all <<-0< db2 conncet to sample; db2 export to ./exp/tabname.ixf
select * from ixf where dbpartitionnum(customer) = current
dbpartitionnum;

Thanks in advance.
bala_e - 03 Jul 2006 03:31 GMT
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.
chettiar - 06 Jul 2006 17:34 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.