delete old log files

  • I have a master package that calls about 10 child packages.

    I would like to setup log file for it. But I just want to log critical process like Error, warning etc,

    how can I do it? Also the log will eventually make the disk has little space.

    I would like to delete logs that is old than a week. What is the simplest way to set this up?

    Thanks

  • Easy enough. Just open the master package, go to SSIS->Logging... then create an SSIS Logging Provider for Text Files. In the details, just select OnError and OnWarning and they'll automatically bubble up from the child packages.

    This creates a text file connection manager, which you can then stick an expression in to datastamp it etc. according to whatever convention you want.

    As to clearing the old logs down, it's a rather common requirement. You can either google it for thousands of different ways to do it, or it's very easy to write your own in SSIS with a for each file enumerator or script task.

  • what is the common practice, if there is a master package and some child package, do you just log the master file, or do you also setup the log file in child package?

    It seems the parent package log includes the child package log into it too.

    THanks

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply