Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Report Progress with Variables

By Joseph Morgan,

I created a script task in the OnProgress event handler of a complex package in order to report the values of all of the variables at each step. This allowed me to grab the dynamic SQL from the variables used as data sources and run it in my query analyzer to make sure I was getting expected data.

It is a lot easier than stepping through the code in debug mode to grab the locals.

Note that the variables collection will only present those variables included in the ReadOnly or ReadWrite Variables selection of the script task, so it isn't cluttered with things you don't need. In my case I used it in the event handler of of the overall package, but it could have just as easily gone into a container's event handler to narrow things down.

We run our jobs through the Tidal scheduler, and by using the FireInformation method the job output will also contain the information I need, so I can get it even when running in test or QA.

Total article views: 906 | Views in the last 30 days: 2
 
Related Articles
FORUM

OnError Event Handler

OnError Event Handler

FORUM

SSIS logging, Event Handler, and OnVariableValueChanged

Using a scripting task in the event handler to log a variable value

ARTICLE

Using Event Handlers with Checkpoints (Part 3)

In Part 3 of his series on checkpoints in SSIS, Aaron Akin talks about how you can use event handler...

BLOG

SSIS - Event Handler Performance

Event handlers are a great tool for managing errors and other events that occur during the execution...

BLOG

SSIS - Event Handler Performance

Event handlers are a great tool for managing errors and other events that occur during the execution...

 
Contribute