I have two IBM DB2 servers at separate remote locations.

I need to copy data from several tables on one database on the first server to another database in the second server.

Previously I've used the IBM data studio tool to export the data and Replace Load it into the other table in the second server.

I am in need of a way to automate this. Probably through command line shell scripts.

How can I accomplish this?

2 Answers 2


I think you may have answered your own question. I would use command line shell scripts. Seeing as you are on Linux, you have several to choose from (sh, ksh, and perl to name a few).

Another thing that could make things easier is if you catalog the remote server and database locally. Then you can connect to it and work with it without your script having to worry about ssh'ing over to another box.


The LUW flavour of DB2 includes a set of tools known (strangely enough) as "Replication tools". This includes a GUI and CLI based application that can automate the replication of data between Databases. See the IBM Infocenter page for more details.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.