March 21, 2012 at 10:18 am
I have a basic SSIS package to copy old records from server A to Server B, then delete the records from Server A. I want to get a count of the copied records in the Data Flow task, then verify the destination has increased by that amount before deleting from the source.
In T-SQL, I would use variables to store the various counts, and compare them before going to the next step. I assume there's an SSIS way to do this, but I'm noew to SSIS.
Or is there a better way to verify the copy completed count ?
March 21, 2012 at 1:28 pm
You can add a Row Count component to a data-flow.
However, I like code for a certain level of paranoia so I don't trust simple record counts. I will often create a temp table and then copy the key fields back to the source and then use the temp table joined with the base table to do the deletes. This guarantees that the record being delete exists at the destination. However, as a table grows this may become less palatable. But a copy of 3-4M int rows only takes about 6-8 seconds so all together its a pretty painless operation.
CEWII
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply