INSERT'ing from SQL Server into DB2

John Lantz

INSERT'ing from SQL Server into DB2
We are trying to use a 4 part name to insert into DB2 from a SQL Server


The problem is performance. Behind the scenes via a monitor, I can see that
a " select * from "M1DB2T"."PACST"."PAT_TRAN_DTL" FOR FETCH ONLY;" is
being done. The problem is that this is a 7 million row table. Needless to say
the INSERT takes forever because of the SELECT that is being done.

Has anybody tried this? Any solution? I seem to remember before when
trying to do it via an openquery that a suggestion was to put some kind of
WHERE criteria that would not find any rows (eg. where 1=2). But the 4 part
naming syntax does not allow that.


* IDUG 2009 Denver, CO, USA * May 11-15, 2009 * http://IDUG.ORG/lsNA *

The IDUG DB2-L Listserv is only part of your membership in IDUG. The DB2-L list archives, FAQ, and delivery preferences are at under the Listserv tab. While at the site, you can also access the IDUG Online Learning Center, Tech Library and Code Place, see the latest IDUG conference information and much more. If you have not yet signed up for Basic Membership in IDUG, available at no cost, click on Member Services at