I would break it down into separate steps. The file requirement may be there, but consider it: while each line generates a file, is it really a transaction breaker, if it takes maybe five or ten minutes to create the file? And is it really worse than the hits that you will see from the launch of the SSIS package from the trigger?
So:
Step 1: the trigger simply inserts a row into another table with the information needed for the file being created.
Step 2: modify your SSIS package to get an extra early step that checks this table for any new entries, creates files as needed, and then notes that the entries are complete (or delete them completely, but I personally like the audit logs) .
Step 3: Add the scheduled task to the server that runs this SSIS package every 5 minutes.
If you do not want to modify your SSIS package, you can instead create a stored procedure that will test the table and execute the package, and schedule it in the task. The main thing is to get away from the idea of ββlaunching a package directly from a trigger.
The above method also minimizes the impact of potential problems such as file inaccessibility for any reason.
source share