Discussion:
Transfering data tables between two remote databases
(too old to reply)
b***@hotmail.com
2007-10-17 15:14:04 UTC
Permalink
Hi,

Could you describe the procedure to copy data tables in
a remote database and store them in another remote database?


Thank you.
Larry
2007-10-17 18:26:46 UTC
Permalink
Post by b***@hotmail.com
Hi,
Could you describe the procedure to copy data tables in
a remote database and store them in another remote database?
Thank you.
Can you provide more detail as to exactly what you mean by "copy"? What
are the requirements?

Larry E.
Mark A
2007-10-17 22:43:43 UTC
Permalink
Post by b***@hotmail.com
Hi,
Could you describe the procedure to copy data tables in
a remote database and store them in another remote database?
Thank you.
If you just want the data, then look at the db2move command in the Command
Reference manual.
Knut Stolze
2007-10-17 22:46:40 UTC
Permalink
Post by b***@hotmail.com
Hi,
Could you describe the procedure to copy data tables in
a remote database and store them in another remote database?
If you want to do this via SQL statements and no utilities, then this would
be one way (assuming you have a proper federated setup):

INSERT INTO <nickname1>
SELECT ...
FROM <nickname2>
--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Mark A
2007-10-17 23:18:35 UTC
Permalink
Post by Knut Stolze
If you want to do this via SQL statements and no utilities, then this would
INSERT INTO <nickname1>
SELECT ...
FROM <nickname2>
--
Knut Stolze
Unless the tables are small, it might be too much data for a single unit of
work (no intermediate commits).
Knut Stolze
2007-10-18 18:07:46 UTC
Permalink
Post by Mark A
Post by Knut Stolze
If you want to do this via SQL statements and no utilities, then this would
INSERT INTO <nickname1>
SELECT ...
FROM <nickname2>
Unless the tables are small, it might be too much data for a single unit
of work (no intermediate commits).
Yes, of course. Breaking down this statement into a loop with intermediate
commits doesn't change anything significantly at this approach.

p.s: You could also increase the log size sufficiently -
whatever "sufficiently" would be in this case. ;-)
--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Kelly Schlamb
2007-10-18 20:33:32 UTC
Permalink
Again, assuming federated is setup, I think you could probably do a "load from cursor" rather than an insert/select. Logging should be minimal.

declare loadcurs cursor for select * from sourceTable
load from loadcurs of cursor insert into targetTable

Regards,
Kelly Schlamb

Loading...