Go Back   CORTEX Forums > Local Happenings > CORTEX Blogs > Random Procrastination
Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read

Random Procrastination Darren Gosbell is a SQL Server expert and Microsoft 'Most Valued Professional' who works as a Principal Consultant at James & Monroe. His blog covers Business Intelligence, SQL Server, .Net, Powershell and MDX Madness

Reply
 
LinkBack Thread Tools Display Modes
Old 23rd June 2009, 07:30 PM   #1 (permalink)
Member
 
Join Date: Jun 2009
Posts: 35
Darren Gosbell is on a distinguished road
Thumbs up Debugging SSIS ScriptTasks and ScriptComponents with Information Messages

I recently had to do some simple debugging of some script tasks and components in SSIS and through I would share the simple technique that I was using. While this is only just above the level of debugging using MessageBoxes it can still be quite handy. It basically consists of printing information messages to the Progress/Execution Results window in BIDS. The syntax differs between the ScriptTask and the ScriptComponent and I keep forgetting it, so I figured if I posted it here I should be able to find it later without too much trouble.

For ScriptTasks in the control flow you use the following

* Dts.Events.FireInformation(0, "", "", "", 0, true)

*

For ScriptComponents in the data flow you use the following

* ComponentMetaData.FireInformation(0, "", "", "", 0, true)

*

Both these calls cause an information message like* "[ ] " to be written to the Execution Results window in BIDS.

This can be useful for displaying the values of variables and for printing out trace messages when certain logic has been invoked.

The screen shots below are from a simple test package which just loops through every database on a server and selects a list of all the tables. In the data flow task I have a script destination component that raises information events with the database and table name in the description. below is a copy of the code and a snippet of the Execution Results window that shows the output.*

*

Then at the end of the control flow I have a script task that just prints out a message that the packages had finished.








More...
Darren Gosbell is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IBM Boosting 'Information On Demand' admin IBM and Cognos Forum 0 9th June 2009 03:12 PM
Navigating the Information Management maze Steve Bennett Oz Analytics 0 5th June 2009 01:02 PM
International Sources Of BOBJ Information Jo Vincent SAP and Business Objects Forum 0 25th May 2009 03:45 PM
IBM to Acquire Solid Information Technology to Broaden Information on Demand Portfoli Latest News Headlines 2007 News 0 26th December 2007 05:38 PM


All times are GMT +11. The time now is 07:08 AM.

© The Business Intelligence Group

Search Engine Optimization by vBSEO 3.3.0