Blogs Classifieds Downloads FlashChat Gallery Googlemap Invite Friends Links Projects Reviews Wiki
 


Welcome to the pSeries Tech Forums, our free peer-based support site for administrators, engineers and architects working with IBM pSeries servers and software.

You are currently viewing our site as a guest which gives you limited access to view most discussions, articles, tutorials and access our other free features. By joining our community you will be able to collaborate with administrators, engineers and architects charged with designing, delivering or maintaining IBM pSeries server environments.

Founded by a recognized IBM pSeries consultant and IBM Redbook author, pSeries Tech Forums was developed with the single mission of bringing IBM pSeries professionals together into a single self-help community.

Registration is fast, simple and absolutely free to all IT professionals with responsibility for or interest in IBM pSeries servers. We invite you to join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

Our Sponsors
Want to advertise?  


Reply
 
LinkBack Thread Tools
  #1  
Old April 19th, 2008
cdelgadop's Avatar
cdelgadop Offline
Senior Member
 
Join Date: November 2006
Posts: 313
Send a message via MSN to cdelgadop
Help with UNIX pipe concepts

Hi

Let's say i have a program that creates several files while running and i want to move those files to a remote server without actually store those files locally cause i don't have enough space. I'm thinking about tar pipes with rsync or netcat commands but i have tried these approach before with commands whose result were just one file (like tar or pax commands), something like this:

cd /sourcedir; tar -cvf - | nc -q 10 -l -l 7878

then in the remote server:

cd /targetdir; nc remoteserver 7878 | tar -xvf -

This somehow have worked for me. I have even used rsync and ssh tunneling in order to make such transfer as secure as possible.

Now i want to use the db2move command in DB2 (whose creates several files) in order to create all output files needed to migrate our DB2 Datawarehouse of about 1TB based on Linux on Mainframe to one LPAR on AIX. I don't have 1TB of aditional space in the Mainframe so i need to use the pipe feature of UNIX to move those N files resulting of the runnning of db2move to AIX through the network.

Thanks in advanced


__________________
cd3lgad0p
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2  
Old April 19th, 2008
pedz's Avatar
pedz Offline
Member
 
Join Date: July 2006
Location: Leander, TX (just north of Austin)
Posts: 58
Re: Help with UNIX pipe concepts

Well, first. Your "working" example isn't really working is it? All the data is stored on both machines -- at least until you remove it from the source machine. Right?

With PostgreSQL, you can do what db2move is doing from a client machine. You simply specify the hosting machine, port, and db name. I bet db2 has a similar function. That implies that you have to have the db2 client software on the client machine. There may be a licensing issue there.

Another option is NFS. Create and export a directory on the client machine. This machine will be the NFS server. Then from the db server machine, mount that directory into the file system. Now, do the db2move command but have it go to the mounted NFS directory. The files, in this case, never touch the db server's file system but are sent to the NFS server's file system as they are created. You can use DFS, AFS, GPFS, etc instead of NFS.

I would go with using the db2move command from the client if at all possible. I bet it is.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old April 20th, 2008
esanchezvela's Avatar
esanchezvela Offline
Junior Member
 
Join Date: January 2008
Posts: 6
Re: Help with UNIX pipe concepts

Quote:
Originally Posted by cdelgadop
Hi
Let's say i have a program that creates several files while running and i want to move those files to a remote server without actually store those files locally cause i don't have enough space. I'm thinking about tar pipes with rsync or netcat commands but i have tried these approach before with commands whose result were just one file (like tar or pax commands), something like this:

Now i want to use the db2move command in DB2 (whose creates several files) in order to create all output files needed to migrate our DB2 Datawarehouse of about 1TB based on Linux on Mainframe to one LPAR on AIX. I don't have 1TB of aditional space in the Mainframe so i need to use the pipe feature of UNIX to move those N files resulting of the runnning of db2move to AIX through the network.

Thanks in advanced
Would it be fair to say that all you want to do is to create a db2dump and send it to db2 on AIX???

sometimes I do this...

ssh remuser@remhost mysqldump <rem_database> | mysql <local_db>, this allows me to replicate my remote database to the localhost where the hosts are connected by a limitting socks server which does not allow mysql replication.

would it be possible to create a dump of the database and send it to stdout?

A different solution would be to create a tunnel between Linux and AIX using ssh using remote port forwarding, establish a session from the linux box to AIX establishing port-forwarding on the command line, next dump the db2 database to stdout and establish a connection to the aix db2 instance using the local port.

linux> ssh -L 8080:127.0.0.1:<db2port_on_AIX> remuser@aixhost
On a different terminal session:
linux>db2dump database | db2 --port 8080 (you'll have to specify the login credentials here for the AIX instance of the database> remdb

Now, this and the netcat solutions should work fairly well and are kind of cool to implement, but they will not be supported by IBM and I would like to believe that if your customer is running Linux on the mainframe and the database is close to 1 TB on each side of the equation, they would expect a commercial level type support for their data replication.


DB2 must have replication tools specifically desgined for this purpose and supported.

best regards,
esv.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old April 20th, 2008
cdelgadop's Avatar
cdelgadop Offline
Senior Member
 
Join Date: November 2006
Posts: 313
Send a message via MSN to cdelgadop
Re: Help with UNIX pipe concepts

Hi

Not in this case. This is not a dump of the DB2. If such case i'd just take that dump and send to TSM and restore in AIX. We are here changing from Mainframe to PowerPC, we are changing binaries. Pretty much the same as a SAP Heterogenous Copy from different HW. When you run a (some other DB) dump one file is created and you can move that file through a pipe, in this case db2move will create several files needed to create the DB in the AIX.

About DB2 replication tools, according to the IBM web site there's no way to migrate from different platforms unless using db2move command. Again, db2move creates several files, and i don't have enough space to hold them in the mainframe. I'm thinking about using a NFS FS.

Thanks for your answer.
__________________
cd3lgad0p
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks

These are the 100 most searched terms
Search Cloud
0042-001 0042-001 nim 0513-001 the system resource controller daemon is not active 0513-001 the system resource controller daemon is not active. 0514-061 0514-061 cannot find a child device 0514-061 cannot find a child device. 0516-787 0516-787 extendlv 0516-787 extendlv: maximum allocation for logical volume 110000ac aa00e1f3 aio aix aix aio aix freeware aixif_arp_dup_addr b150f22a b181f22a b181fb53 ba010004 c1001020 d133c002 dacnone dcb47997 fcp_array_err6 fget_config gnu tar aix gsclvmd gtar aix hi yall hmc root password hmc vmware hscl05db ibm p6 ibm p6 520 libpopt aix libpopt.a libpopt.a(libpopt.so.0) is needed by rsync-2.6.2-1 migratelv mksysb navisphere agent nim server pseries pseriestech rsync aix sc_disk_err4 scan_error_chrp vio server websm xhost file ... powered by Simple Search Cloud


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Powered by vbWiki Pro 1.3 RC5. Copyright ©2006-2007, NuHit, LLC

vBulletin Skin developed by: vBStyles.com


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50