February 11, 2025 at 2:01 pm
Hi,
I an using VS 2022 to build a package that selects and then inserts a large number of records into a table. The volume of records in the source table exceeds 1 billion. As this will take a long time to process, I have to do this in a maintenance window of 2 hours. So I have to stop and restart the package, but this causes duplicate records to be inserted into the target table. SQL version is 2019
Is there a way that I can avoid getting duplicates when stopping and restring the package. Any help would be appreciated
Thanks
Kindest Regards,RJ
February 11, 2025 at 2:26 pm
Hi, I can think of this
Thanks,
Abhinav
February 11, 2025 at 4:30 pm
Can you somehow modify the process to make it incremental, or are all the rows always new?
If you have space, perhaps you could try running the insert to a staging table outside of the maintenance window and then use T-SQL to update the main table – this may or may not improve things.
If the > 1 billion rows is the complete record set for the table, have you considered having two identically structured tables and using aliases to switch between them? This would also enable you to do things outside of your maintenance window. I can outline the process in more detail if it's a possibility.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy