Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favourite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved 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: 843 | Views in the last 30 days: 7
 
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

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones