SQL Server Integration Services (SSIS) Part 8 - Debugging — Transcript
Full transcript
- 0:00welcome to this wiow tutorial on
- 0:02debugging and SQL Server integration
- 0:04Services here's what you'll learn in the
- 0:07tutorial we'll Begin by looking at how
- 0:09to solve runtime errors so I'll show how
- 0:12to set up an example package and we'll
- 0:14look at how to solve a genuine runtime
- 0:17error using the output
- 0:18window we'll then look at how to debug
- 0:21data flow tasks using data
- 0:23viewers and finally we'll look at how to
- 0:25debug control flow tasks by setting
- 0:28break points and then by by using the
- 0:30watch and the locals and other windows
- 0:32to monitor the value of variables so
- 0:35let's get
- 0:37started before we start looking at
- 0:39debugging in ssis let's take a moment
- 0:42just to see which example we're going to
- 0:44be using I've got here a workbook of
- 0:47xact contestants from the UK version of
- 0:49the show anybody who's been watching the
- 0:51other videos in this series will
- 0:53probably be familiar with this by now
- 0:55and if I scroll down you can see there's
- 0:58actually 109 rows in the
- 1:01spreadsheet now what I'm going to do is
- 1:04import this into integration services
- 1:07and display how many rows there are so
- 1:09if I run my package which I've already
- 1:11created you can see it displays a
- 1:13message saying the number of rows
- 1:15imported is
- 1:17109 here's how this works I've got two
- 1:21control flow tasks the first is a
- 1:24responsible for importing the Excel
- 1:25contestants into a variable so if I
- 1:28double click on that you can you can see
- 1:30it cons consists of a source based on an
- 1:33Excel workbook and then a rowon
- 1:36transform which stores the information
- 1:38the number of rows imported in a
- 1:40variable called number
- 1:42rows my second control flow task is a
- 1:45script which passes in the number of
- 1:47rows variables into the script and then
- 1:50uses C in this case to display a message
- 1:54saying how many rows have been found and
- 1:57there's the value of the variable which
- 1:58is being cons pated with other bits of
- 2:00text to form the
- 2:04message so that's what my package is
- 2:06doing and as I said when I run it
- 2:08everything seems to be going alarmingly
- 2:10well for
- 2:14now in the previous part of this
- 2:16tutorial I showed you the example we
- 2:18were going to be using but I wasn't
- 2:20quite honest with you I made out that
- 2:22the first time I ran it it work
- 2:24perfectly but that sadly wasn't the case
- 2:26this is what actually happened the first
- 2:28time I ran it although it appeared to be
- 2:31working perfectly I couldn't see the
- 2:33message box at the end and when I went
- 2:35to the data flow I could see that it had
- 2:37stumbled on the Excel source so what was
- 2:40going
- 2:42wrong if you've got a problem like this
- 2:44and you can't work out where your
- 2:46package is going wrong a good place to
- 2:48look is the output window now I've got
- 2:51mine visible down there but in the
- 2:53unlikely event you can't see it you can
- 2:55get to it by choosing View for the menu
- 2:57and choosing output but I don't need to
- 3:00do that cuz as I say mine is visible and
- 3:02if I bring that up you can see that the
- 3:04problem has happened shortly after the
- 3:06validation phase the requested olb
- 3:10provider is not registered if the 64-bit
- 3:13drive is not installed run the package
- 3:15in 32-bit
- 3:17mode so what I did is I Googled some
- 3:20combination of those words and I quickly
- 3:22found that I was by no means the only
- 3:24person with the same problem if you're
- 3:26running an application running
- 3:27integration services on a 64 machine
- 3:30you'll probably run into this problem
- 3:32too the problem is that when you deploy
- 3:34the application it will run perfectly in
- 3:36the operating system but when you're
- 3:38designing the application it runs in
- 3:4032-bit mode and there's no 64-bit jet
- 3:43driver for Excel or
- 3:45access so the solution is to right click
- 3:49on your package choose the
- 3:52properties and change it so that in
- 3:56debugging it's
- 3:58using it's rather not using 64-bit
- 4:01runtime so if I choose that and then
- 4:04stop debugging and then start again
- 4:07you'll see this time it works absolutely
- 4:10perfectly now my point behind showing
- 4:12you that isn't to show off about the
- 4:14fact I know about 32 and 64-bit
- 4:16applications I'm not an expert to be
- 4:18honest more to show you that you can use
- 4:21the output window to keep track of
- 4:22what's going on in your
- 4:27application there's two ways you can
- 4:29find problem s in ssis packages one is
- 4:32by debugging the control flow to check
- 4:34the order in which commands are
- 4:35executing and that's what we'll do in
- 4:37the next part of this tutorial what
- 4:39we'll do in this part is have a look at
- 4:40the data flow to check if data's flowing
- 4:43down the system as we expect it to be
- 4:46and the way to do that is to rightclick
- 4:48on any pipe of data and choose to enable
- 4:51something called a data viewer which we
- 4:53looked at briefly in an earlier
- 4:55tutorial you can see a little symbol
- 4:57pops up there and I can write click on
- 5:00that and choose to edit it to see what's
- 5:02actually going
- 5:03on if I click on the metadata tab it
- 5:06gives me a description or a list of all
- 5:08of the columns which are coming out of
- 5:10Excel and one useful feature is that I
- 5:12can copy that of the clipboard and
- 5:14perhaps paste it into Excel or some
- 5:16other application for further
- 5:20analysis what I can also do is see which
- 5:22columns are going to be listed in my
- 5:24data viewer now I'm going to click on
- 5:26this button to transfer them all over to
- 5:28the left hand side and instead just
- 5:30decide to display the name of the
- 5:32contestant and the series in which
- 5:34they're competing and then choose
- 5:37okay what will happen now when I run the
- 5:40application is that it will pause at the
- 5:42data viewer and that will come up in a
- 5:44separate window and again I could copy
- 5:47this data if I wanted to to a separate
- 5:51spreadsheet again presumably so that I
- 5:54can analyze it further to check it's
- 5:56doing what I think it should be doing
- 5:58but I'm not going to do that I'm just
- 5:59going to carry on running the
- 6:01application and you can see it's now
- 6:02resumed where it left off and it's
- 6:05actually displaying the message and if I
- 6:09press all tab with a bit of luck I can
- 6:10find that message it tends to be a bit
- 6:13tricky to get to and then choose okay to
- 6:15clear
- 6:17it when I finish with my data
- 6:19viewer I can just right click on it and
- 6:23choose to disable it you need to be
- 6:26careful not to delete it because what
- 6:28that will actually do is delete the ENT
- 6:29entire pipe of data so if I disable the
- 6:31data viewer it vanishes from View and
- 6:34will no longer be executed when I run
- 6:36the
- 6:38package in the previous part of this
- 6:40tutorial we had a look at data flow
- 6:42tasks and data viewers but what's the
- 6:44equivalent way of controlling what's
- 6:46happening within a control flow task as
- 6:49it turns out the answer is to right
- 6:51click on the control flow task and
- 6:53choose to edit
- 6:54breakpoints and when you do that
- 6:56integration Services gives you a list of
- 6:57all of the events which can happen in
- 6:59this t asks life the two main ones I can
- 7:03begin the onpreexecute event happens
- 7:06just before that happens and it can end
- 7:08at which point the on post execute event
- 7:10will happen so I'm going to set a break
- 7:13point for both of those two so that I
- 7:15can see when the task begins and when it
- 7:17ends for any breakpoint you can also set
- 7:20a hit count type this is only really
- 7:22relevant when you've got some sort of
- 7:24loop occurring so for example you might
- 7:27want to you might be looping over files
- 7:29on your hard disk and you might want to
- 7:31set a counter that after the 10th file
- 7:33is um loaded in then a breakpoint will
- 7:37uh occur and you'll go into debug mode
- 7:39but we'll keep that as always for both
- 7:41the two
- 7:42breakpoints if you then choose okay I
- 7:45can now run my package but just before I
- 7:47do that can I show you what the debug
- 7:49menu looks like at the moment if I
- 7:51choose debug from the menu and choose
- 7:52Windows you'll see there's only three
- 7:54options on that menu that's going to
- 7:56change quite radically in a second so if
- 7:59I now run my application by choosing to
- 8:01start debugging it will execute until it
- 8:04hits the first break point and you can
- 8:06see it's at a breakpoint because there's
- 8:08a little yellow arrow on the breakpoint
- 8:10symbol another way to tell what's
- 8:12happened is to go to the output window
- 8:15and you can see that it's broken when
- 8:17the container receives the on pre
- 8:19execute event it's not exactly friendly
- 8:21but it's pretty obvious what's going on
- 8:24going back to my point about the debug
- 8:25window now you can see I've got loads
- 8:28and loads of Windows there available to
- 8:30me because I'm now in debugging mode and
- 8:31I've hit a breakpoint but I'm going to
- 8:34ignore all of them for the moment and
- 8:35just continue executing and what you can
- 8:38now see is on the output window I've
- 8:41reached the post execute
- 8:43event and if I carry on executing this
- 8:47it will run and finish a task and finish
- 8:49in fact the entire package because
- 8:51there's no more break points so I can
- 8:53now find my message and choose okay to
- 8:56clear it and then stop debugging
- 9:00so that's how you can set break points
- 9:01for a task just right click and choose
- 9:03edit break points but at the moment to
- 9:06be honest they're not a great deal of
- 9:07use so what we'll now have a look is how
- 9:10you can look at the value of variables
- 9:11to see what's actually going on within a
- 9:13control flow
- 9:16task we've just created two break points
- 9:20for this control flow task one to be hit
- 9:23when it begins and one to be hit when it
- 9:24ends what I now want to see is how the
- 9:26value of the variable number rows
- 9:28changes during these break points so to
- 9:31do that I'm going to start debugging my
- 9:33package and then what I'm going to do
- 9:35firstly is look at the locals window
- 9:39whoops so the locals window allows me to
- 9:42display the value of all variables in my
- 9:44package so I can click on the plus next
- 9:46to variables to expand that section but
- 9:48unfortunately I see not only my user
- 9:50ones but also the system ones and it's
- 9:52quite difficult to locate the value of
- 9:54my variable called number rows but now
- 9:57that I found it you can see its current
- 9:58value is
- 10:00zero so I'm not a big fan of the locals
- 10:02window because I find it a bit confusing
- 10:04because everything's muddled up together
- 10:07so what I'm going to do instead is to
- 10:08set a watch and you can do that by
- 10:12choosing debug from the menu choosing
- 10:14windows and choosing to create one of
- 10:16four watch windows and because I haven't
- 10:18got any at the moment I'll put
- 10:20everything in watch window number one
- 10:23now I want to look at the value of the
- 10:24variable called number rows so what I
- 10:26can do is display the variables window
- 10:28by clicking on the symbol
- 10:30and then drag my number rows variable
- 10:33onto my watch window and release the
- 10:35mouse button you can see the mouse Point
- 10:37has a Plus on to show I'm copying
- 10:39something so now I'm watching the value
- 10:41of that variable and I could add others
- 10:43if I had any in my package when I run my
- 10:46application
- 10:47now you can see the value of that
- 10:49variable has just changed from 0 to 109
- 10:52so the watch window provides a way to
- 10:54monitor variables to see when their
- 10:56value
- 10:58changes in in addition to the watch
- 11:00window I'll just delete that watch
- 11:03there's also something called quick
- 11:05watch and you can get to that either by
- 11:08pressing shift F9 or by choosing quick
- 11:11watch what that allows you to do is to
- 11:14click on the drop Arrow or type in an
- 11:17expression and quickly evaluate the
- 11:19value of that and you can also add it to
- 11:22your watch window in which case it's
- 11:24just another way to watch the value of
- 11:26the
- 11:27variable now there's lots of other
- 11:29things available to you when debugging
- 11:31ssis packages but to be honest the ones
- 11:34I've just shown you are the ones which I
- 11:35find most useful and some of these I
- 11:38think will only be used by the very most
- 11:40advanced system
- 11:42programmers so I'll just stop debugging
- 11:45and that completes this look at how to
- 11:47debug packages in
- 11:50ssis you can find lots more training
- 11:52resources on Microsoft applications
- 11:54online at www.wow.com
About this transcript
This page contains the full transcript of SQL Server Integration Services (SSIS) Part 8 - Debugging by WiseOwlTutorials, generated from the public captions YouTube serves with the video. The transcript has 2,202 words across 311 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.