Accessing SSIS Variables at Runtime
Hi, I'm developing a custom Logging Component for SSIS and wanted to log the variables and their valuesin the event of an Error. To do so, i tried using a Script-Component for the package on the OnError-Event. my problem now is this: to ensure that the logging is generic I need to access ALL variables defined by the user implementing that package. Is there any way to do so?
July 12th, 2011 10:00am

'Declaration Public ReadOnly Property Variables As Variables Get 'Usage Dim instance As ScriptObjectModel Dim value As Variables value = instance.Variables then use the value to iterate over each Found a related post that shows how to iterate: http://social.msdn.microsoft.com/Forums/en/sqlintegrationservices/thread/00395626-3faa-4738-966c-c5df1466ea62 Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
July 12th, 2011 10:21am

There is NO WAY to do so the way I think you want to do it. The only way to log a list of variable values is to tell the component what variable names to try to read. There is no enumerator on the variables collection you have access to - it's direct access only. The only other possible way to do this would be to have your component open the on-disk version of the package using the API to "read" the names of the variables, then it could request those values from the runtime. Unfortunately, in this case, the included variable logging features in SSIS are your best option. Talk to me now on
July 12th, 2011 11:37am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics