Craig Lister
2009-12-10 04:36:00 UTC
I have a requirement to import data from one SQL Server (2005)
database, to another, transforming the data on the way through. So,
DTS seems to fit that requirement perfectly.
My problem is, how to lanch that DTS package. Source database gets
populated, and then as soon as possible, we need to start importing
from that database. The data in the source is actually pumped in via a
3rd party. They are open to assisting us. I've propsed that they
create a 'ExportDetail' type table in the source database. Once their
import completes, the write the last ID of the master table table to
the ExportDetail table.
The master table would be last ID of the top most record. For example,
if we have a Customer->Orders->Products heirarchy, then CustomerId
would be the ID we're interested in. Once they complete their import,
when then grab from the Last ID back towards a locally stored
'FirstId'. Sorry, confusing.
We would know the lastId that we last imported. So we would then read
Customers from OUR last ID, to their last ID.
So, once they complete their import, they INSERT a row into the
ExportDetails table with the LastID. Now, there would be a trigger on
that table. An INSERT trigger. Could this trigger be used to set off a
DTS package? The package could then grab the LastID and store it on
our side, and then grab all the rows.
Does this seem like a good solution or is there better way to do this?
database, to another, transforming the data on the way through. So,
DTS seems to fit that requirement perfectly.
My problem is, how to lanch that DTS package. Source database gets
populated, and then as soon as possible, we need to start importing
from that database. The data in the source is actually pumped in via a
3rd party. They are open to assisting us. I've propsed that they
create a 'ExportDetail' type table in the source database. Once their
import completes, the write the last ID of the master table table to
the ExportDetail table.
The master table would be last ID of the top most record. For example,
if we have a Customer->Orders->Products heirarchy, then CustomerId
would be the ID we're interested in. Once they complete their import,
when then grab from the Last ID back towards a locally stored
'FirstId'. Sorry, confusing.
We would know the lastId that we last imported. So we would then read
Customers from OUR last ID, to their last ID.
So, once they complete their import, they INSERT a row into the
ExportDetails table with the LastID. Now, there would be a trigger on
that table. An INSERT trigger. Could this trigger be used to set off a
DTS package? The package could then grab the LastID and store it on
our side, and then grab all the rows.
Does this seem like a good solution or is there better way to do this?