mardi 4 août 2015

How to controll which rows were sent via SSIS

I'm trying to create SSIS package which will periodically send data to other database. I want to send only new records(I need to keep sent records) so I created status column. I want my package to update this column after successfuly sending data, but I can't update all rows wih "unsent" status because during package execution some rows may have been added, and I also can't use transactions(I mean on isolation levels that would solve my problem: I can't use Serializable beacause i musn't prevent users from adding new rows, and Sequence Container doesn't support Snapshot).

My next idea was to use recordset and after sending data to other db use it to get ids of sent rows, but I couldn't find a way to use it as datasource.

I don't think I should set status "to send" and then update it to "sent", I believe it would be to costly.

Now I'm thinking about using temporary table, but I'm not convinced that this is the right way to do it, am I missing something?

Aucun commentaire:

Enregistrer un commentaire