question

dataenthu avatar image
dataenthu asked

how to create a SSIS package to iterate though databases and look for a specific table name and delete rows older than a year

how to create a SSIS package to iterate though databases and look for a specific table name and delete rows older than a year. The deletion should be in batches of 20000 rows at a time. should i use for loop or for each loop container?
sqlssisdatabase
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
mdawini avatar image
mdawini answered
Why not use a stored procedure? Any reasons why you want to use a SSIS package? You can also create stored proc with deletion batches then put this in a job or call the stored proc within a SSIS package. You might also include some dynamic sequel here within your proc to meet your requirements for the query and its filters.
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.