How to enable or disable LOGGING using task,package?

  • Hi All,

    I have created SSIS package which keeps the track of SysSsisLog table into another table. However I want an option to keep loggin ON or OFF through task/package by passing parameters 0 - ON , 1 -OFF. Is anybody came across such requirement or done this type of code before. Please let me know.

    Thanks in advance 🙂

    Nikhil

  • I'm not sure it is possible. Either you log, or you don't.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Nikku (4/24/2014)


    Hi All,

    I have created SSIS package which keeps the track of SysSsisLog table into another table. However I want an option to keep loggin ON or OFF through task/package by passing parameters 0 - ON , 1 -OFF. Is anybody came across such requirement or done this type of code before. Please let me know.

    Thanks in advance 🙂

    Nikhil

    What version of SSIS?

    😎

  • I am using 2008 R2 version.

  • For SSIS 2008, the simplest way I have found to manipulate the logging is to use a Scrip Task in a "Master" package.

    As the logging is initialized before any other parts of the package, it is impossible to change this at runtime. The workaround is to use a parent or master package, load the package into an app variable and manipulate it before execution. A simpler alternative is having two packages, one wit logging and the other without.

    😎

  • Thank you Sir 🙂

  • Eirikur Eiriksson (4/25/2014)


    For SSIS 2008, the simplest way I have found to manipulate the logging is to use a Scrip Task in a "Master" package.

    As the logging is initialized before any other parts of the package, it is impossible to change this at runtime. The workaround is to use a parent or master package, load the package into an app variable and manipulate it before execution. A simpler alternative is having two packages, one wit logging and the other without.

    😎

    It's still all or nothing (and I'm OK with that). I see no reason why one would want to switch off logging during an execution.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Koen Verbeeck (4/25/2014)


    It's still all or nothing (and I'm OK with that). I see no reason why one would want to switch off logging during an execution.

    I agree, cannot see an obvious reason to switch it off. Normally one would be changing the log configuration depending on the environment and that's of course where the package manipulation comes in handy.

    😎

Viewing 8 posts - 1 through 7 (of 7 total)

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