Hi,
After I implemented the framework, my boss suggested to configure the logging feature to be able to turn on/off. I understand his point of view that the logging of each task execution details may not be necessary, and it only needs to be turned on for debugging and troubleshooting.
I implemented this configuration of turning logging on/off by change the event handler property 'disable' - make this configurable via the configuration table:
- add SSIS package configuration (SQL SERVER Type) with below value:
- This can be done by adding a new sql server type configuration in the package configuration wizard and choose the correct property e.g. "EventHandlers[OnPostExecute].Properties[Disable]". The value end up being added into the configuration table:
ConfigurationFilter ConfiguredValue PackagePath ConfiguredValueType
PkgLevel_PostExecuteEvent False \Package.EventHandlers[OnPostExecute].Properties[Disable] Boolean
PkgLevel_PreExecuteEvent False \Package.EventHandlers[OnPreExecute].Properties[Disable] Boolean
PkgLevel_VaraibleValueChangedEvent False \Package.EventHandlers[OnVariableValueChanged].Properties[Disable] Boolean
- Or just add the configuration value in the table, and use the SSIS package configuration wizard to filter each configuration.
INSERT INTO [Framework].[SSISConfigurations]
([ConfigurationFilter]
,[ConfiguredValue]
,[PackagePath]
,[ConfiguredValueType])
VALUES
('PkgLevel_PreExecuteEvent'
,'False'
,'\Package.EventHandlers[OnPreExecute].Properties[Disable]'
,'Boolean')
;
INSERT INTO [Framework].[SSISConfigurations]
([ConfigurationFilter]
,[ConfiguredValue]
,[PackagePath]
,[ConfiguredValueType])
VALUES
('PkgLevel_PostExecuteEvent'
,'False'
,'\Package.EventHandlers[OnPostExecute].Properties[Disable]'
,'Boolean')
;
INSERT INTO [Framework].[SSISConfigurations]
([ConfigurationFilter]
,[ConfiguredValue]
,[PackagePath]
,[ConfiguredValueType])
VALUES
('PkgLevel_VaraibleValueChangedEvent'
,'False'
,'\Package.EventHandlers[OnVariableValueChanged].Properties[Disable]'
,'Boolean')
;
- I can then change the ConfiguredValue to true if the logging needs to be turned on.
Because we must keep the 'OnError' event handler logging, I could not turn on/off on the "SQL LogPackageStart" or "SQL LogPackageEnd" as this will break the FK constraints.
Hope this is helpful to anyone who wants to do similar thing. And please let me know if you have better ideas.
Kind Regards,
Min