Start learning with our library of video tutorials taught by experts. Get started
Viewers: in countries Watching now:
In SQL Server 2008 Essential Training, Simon Allardice explores all the major features of SQL Server 2008 R2, beginning with core concepts: installing, planning, and building a first database. Explore how Transact-SQL is used to retrieve, update, and insert information, and gain insight into how to effectively administer databases. The course also covers features outside SQL Server's database engine, including technologies that have grown up around it: SQL Server Reporting Services and Integration Services. Exercise files are included with the course.
To work with SQL Server Integration Services we're going to open a new program. Well, for some of you it might not be that new. I'm opening up my SQL Server 2008 R2 applications. I'm looking for SQL Server Business Intelligence Development Studio, sometimes known as BIDS. But when I open this up, it's really not a completely new application. As I can see here it's actually Visual Studio. In fact Business Intelligence Development Studio is just a cut-down version of Visual Studio.
If you have the full version of Visual Studio, every time you go to File > New > Project you might have dozens of choices to choose from, but here we only have a handful. We have a couple of Analysis Services Projects, we have a couple of specialized Reporting Services Projects and then the Integration Services one, and that's what I need to do. So I've gone into my File > New > Project and I'm going to create a sample here. I'll call it SSISTest and just accept the default location.
So this is creating a full Visual Studio project with a lot of subfolders and support files and this is what we get. And that can look little bit intimidating particularly if you're new to Visual Studio. And even if you're not this is certainly not a classic ASP.NET environment,. It's something very different, very visual. Inside this package and that's what we're working on a Package.dtsx file, we've got four tabs here, Control Flow, Data Flow, Event Handlers, Package Explorer. Well what are we actually doing here? Well this is all about taking in some data, performing some transformations on it, moving it somewhere else, copying it, merging it, exporting it.
And to do that we have a fairly significant toolbox. I'm going to pin my toolbox here just to show you this, but what you'll find is if you have the Control Flow tab highlighted we have all sorts of control flow items, dozens of them, things like Send an Email Task, do something with FTP Task, do something on the File System, Execute some SQL, Execute a Process. Down below that we have what are called Maintenance Plan Tasks, things like Check the Integrity of the Database, always a good idea if you're moving a lot of content from one place to another.
History Cleanup, Notify Operator Task , sending an e-mail message to a SQL Server Agent Operator, Rebuild an Index, Reorganize an Index, lots of stuff that you can build and plan for doing some substantial work with moving data around. And the idea is that what you do is you start to drag on the things that you want to do onto the Designer. So if you wanted to start off with a Check Database Integrity Task we drag that on there. It adds it visually. Now of course, it doesn't know which database we're actually talking about here.
So to configure this I could either select it and start to play around with the Properties, or I can just double- click it and it's going to kind of step me through the idea that it doesn't know what database to check so it's asking for a connection. What connection do I use? If I do where to find one they will be one in the drop-down, but we didn't. So I'll describe a connection to AdventureWorksLight (AWLT). It's going to be the dot, which is fine, and yes it's Windows Integrated Security. When I do that it says, well select a database please. I can say all databases.
Do I want to check the integrity of everything, just system databases, user databases, or these following databases? It allows me to select through them. I'm going to say set this one. Click OK. I could even view the T-SQL. Now surprisingly, what this is generating is a DBCC CHECKDB. So if that completes successfully, we could go onto the next task. Maybe at this point what I want to do is grab something from the file system, or send an email.
Perhaps notifying people that we're about to start a big SQL Server Integration Services package, but really the big task, the big important one doesn't look like it's that important, but it's this one, the Data Flow Task. The idea is that all of your packages at some point do data flow. They take data from one place and move it somewhere else. And in fact you could have a SSIS package that is just one Data Flow task, so I have deleted that first one that checks the database integrity.
And here is what happens when you drag this on and you double-click it, it's going to jump you to the second tab. We're basically jumping inside of that Data Flow task where we get to describe exactly what's happening just in that little piece of the flow. And if you notice what happens is your toolbox changes. We switch from things like FTP tasks and Email tasks to Data Flow sources of Excel, and flat files, and raw files, and Data Flow tasks. We can do things like character mapping to change things to lowercase or uppercase, data conversion, moving things from integers to floating points and back again.
We can lookup some other piece of data. We can do a row count. If you have the Enterprise level editions of SQL Server we can even do things like Fuzzy Lookup and Fuzzy Grouping to have very flexible questions that we're asking about our data. And then we end up with Data Flow Destinations. That's the whole point. If something is flowing it's flowing from somewhere to somewhere. So what's the destination? Now are we moving from a flat file into SQL Server, are we moving from SQL Server into an OLE DB database? What are we doing with it? And the benefit of defining all these is that at every step of the way whether choosing to for example start off with the flat file, then do some character mapping of it, sorting that information, and then outputting it into for example SQL Server, we can configure each step of the way.
We have the two arrows, the green one representing what happens if the output of that was successful and the red one representing what happens if it wasn't. So in this case we can just click on the steps and define them by double-clicking each part and setting up, or what is that input flat file, how would SQL Server Integration Services find it, how does it know where to look? What kind of mapping would we do on it? What would we convert to uppercase? What would we convert to lowercase? What are we sorting on? And then where does it go? As you can imagine, SQL Server Integration Services packages can get very complex indeed, the great thing about doing them in this environment is you even get a built-in debugger that allows you to take them visually step-by-step through each part and we'll see a simple example of that next.
Find answers to the most frequently asked questions about SQL Server 2008 Essential Training.
Here are the FAQs that matched your search "":
Sorry, there are no matches for your search ""—to search again, type in another word or phrase and click search.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.