SQL Server Integration Services is the ETL tool for the Microsoft SQL Server platform. SSIS allows you to take data from various sources (from Excel files, to text files, to other databases, etc), and bring it all together.
If you are new to concept of ETL, SSIS is great place to start. Click here to learn about ETL
If you are well versed in another ETL platform, SSIS is a relatively easy system to get up to speed on.
SSIS comes as part of SQL Server Data Tools, which you should be able to install with your SQL Server installation software. You will need SQL Server Standard, Developer or above editions to run SQL Server Data Tools. SQL Server Express does not support Data Tools.
For some unknown reason, once it is installed, you will not find a program called SSIS. Maybe the engineers at Microsoft think this is funny, but in order to run SSIS you will need to look for the following program instead.
I’m using 2015, but for most of what I am doing here, any version should be compatible.
When you launch data tools, you will notice it run in Visual Studios
To start an SSIS job, you will either need to open an existing project, or create a new one. In this example, I will create a new one.
File ->New -> Project (or Ctrl+Shift+N)
Inside the Business Intelligence Templates, select Integration Services. I always just select Integrations Service Project, I’m not a big fan of the Wizard
Next step: Name your project
Now you are in SSIS. Here are the 3 main windows you will be starting with.
From right to left:
Inside solutions, packages are the collections of jobs or scripts found inside a project. It is inside the package that you will build out your ETL job.
For our first lesson, we are just going to build a simple package. Your new solution should have opened with a new package when it opened. If it is, right click on the green arrow to rename it, if not, right click on the red arrow to create a new package.
I renamed my package First_Package, you can name your package whatever you choose.
This first package will simply just display a pop up message. In the SSIS Toolbox, go to Script Task and drag it into the package designer window.
Double click on the Script Task Box in the Design window
Note in my example, I have C# set as the scripting language. The other default option is Visual Basic. If you are more comfortable with that, feel free to use it. I prefer C# mainly because I spent more time working with it.
You don’t need to know any C# for this tutorial. This is literally a single line of code assignment. I will cover more C# in the future.
Click Edit Script… to continue
Note, this step can take a minute or so for the script editor to appear. Don’t panic if your computer appears locked up.
Once the script editor opens, don’t panic by all the code you see. Luckily Microsoft has done most of the ground work for us. We only need to scroll down until you see:
public void Main()
Now place your cursor below //TODO: Add your code here
The code you need to type for this script is:
MessageBox.Show(“This is my first SSIS Package”);
Now I know you will be looking for a save button. But again, our friends at Microsoft might have been drinking when they coded this. Instead, just click the upper right X to close out the whole window –
I know – why would they do it that way? how much effort would a save and close button have cost them? I don’t know. It just is what it is. Just click the X and move on with your life.
Now click the OK button – again I guess Save was too much to type
Now right click on your package (green arrow) and click Execute Package
Your message will pop up in a Message box window
Click OK on the messagebox and Click the red square to end the package execution.
Congrats, you have just built and executed your first SSIS Package.