theog
theog

Reputation: 1064

How do I configure SSIS logging to overwrite the log file?

My SSIS package has logging configured with a SSIS log provider for text files, which works fine, but each time the package is run the log appends to the end of the log file. I want it to truncate the file and only keep the log from the most recent execution of the package, but I don't see an option anywhere to do that.

I've tried both file usage types (Existing file and New file) in the File Connection manager with the same results.

Upvotes: 2

Views: 4676

Answers (2)

user11089346
user11089346

Reputation: 1

In Flat file destination component, please tick the overwrite data in the File to truncate the file and only keep the log from the most recent execution of the package

Upvotes: 0

Sreejesh Kumar
Sreejesh Kumar

Reputation: 2499

I suggest you to clear the text file before Executing the package, using Script Task under Event Handler, by firing the event "OnPreExecute". I hope this works.

Upvotes: 1

Related Questions