I have an SSIS Package, call it PackageA. Sometimes, I want to have it logging to a text file, while other times, I do not. My initial though was to have the package check a table, then use a variable/expression to enable/disable logging. I am assuming this is not possible?
My work around is to create a “master” package, PackageB, with a SQL task to get whether or not to enable logging. PackageB would call PackageA1 or PackageA2 depending on the value–PackageA1 would be PackageA deployed with logging enabled and PackageA2 would be PackageA deployed with logging disabled.
That makes deployment a hassle and easy to mess up, however. Is there any way to accomplish, at the very least, something similar to what I am looking for?
Thanks!
Packages have
LoggingModeproperty, which you can change when you run package using GUI ordtexeccommand line switch: (more info)If you use
SSIS 2012andProject Deployment Modelyou can also setLOGGING_LEVELparameter fromNonetoVerboseby using for examplecatalog.set_execution_parameter_valuestored procedure (more info).