all groups > sql server dts > september 2006 >
You're in the

sql server dts

group:

Event Debugging



Event Debugging Brian Bagley
9/27/2006 10:32:01 AM
sql server dts: I am trying to debug a script task in an event, is this possible? I get a
window that opens and contains the script task from the control flow but that
is all I ever see. Any help would be appreciated. I am not sure what
additional info is needed to help diagnose this, but I will provide whatever
is needed.
--
RE: Event Debugging Charles Kangai
9/27/2006 11:29:02 AM
Assuming this is SSIS - Do you want to bug the script in the task or the task
itself?
There are two things you can do:

1) Debug the task. This applies to all tasks:
Right-click on the task and choose Edit Breakpoints from the context menu.
Enable breakpoints on any events you want, e.g. OnPreExecute, OnPostExecute,
OnError. While debugging the task like this you can display the Locals window
(Debug/Windows/Locals) and watch any variables change their values.

2) You can debug the script itself. To do this open the script in VSA
(Visual Studio for Applications). Press F9 on any line where you'd like to
create the breakpoint.

Execute the package.

Hope this helps,

Charles Kangai, MCT, MCDBA
Author of Learning Tree's 4-day course: "SQL Server 2005 Integration
Services" http://www.learningtree.com/courses/134.htm
Author of Learning Tree's 4-day course: "SQL Server Reporting Services"
http://www.learningtree.com/courses/523.htm
email alias: charles
email domain: kangai.demon.co.uk


[quoted text, click to view]
RE: Event Debugging Brian Bagley
9/27/2006 11:53:02 AM
Hi Charles,

I was not clear, I have a package that is using the WMIEventWatcher which
raises the event WMIEventWatcherEventOccurrred. On the Event pane is where
the script I want to debug is located. I have added a breakpoint to this
Script Task. The problem is that the code is never displayed and my
breakpionts are never hit. I even added a msgbox to the script which is
executed, but I am never able to get this to display in debug mode.


--
Brian Bagley


[quoted text, click to view]
RE: Event Debugging Charles Kangai
9/27/2006 12:26:02 PM
Hi Brian!

I just twigged who you are! Good to hear from you again - I enjoyed being
with you guys last week in Virginia - just this morning felt free from jet
lag!

To get back to the question: I assume you set the task property
ActionAtEvent to "Log the event and fire the SSIS event" - it's important to
have the event fire. You should also right-click the package, go into Logging
and make sure the WMIEventWatcherEventOccurred event's checkbox is checked.
You will need to set the checkboxes under Containers for both the package and
the task, although you will not specify any log providers.

I just tested it now with a script on the Event Handlers tab and it works
for me.

Cheers,


Charles Kangai, MCT, MCDBA

Author of Learning Tree's 4-day course: "SQL Server 2005 Integration
Services" http://www.learningtree.com/courses/134.htm
Author of Learning Tree's 4-day course: "SQL Server Reporting Services"
http://www.learningtree.com/courses/523.htm
email alias: charles
email domain: kangai.demon.co.uk



[quoted text, click to view]
AddThis Social Bookmark Button