Académique Documents
Professionnel Documents
Culture Documents
SSIS ( SQL Server Integration Services ) is one of technologies which is in high demand
currently in IT industry.
All organizations (be it small, medium or large) have to maintain their data in different databases
like spreadsheet, flat files, RDMS systems etc.
Sometimes we need to access data from different sources and need to modify the data according
to business needs. Need for accessing the data from multiple data sources and need for
performing broad range of data migration tasks and transforming them according to the business
needs has been very much in demand now.
In 2000, Microsoft released DTS (Data Transformation Services) to transform data from one
source to different destination.
After 5 years in 2005, Microsoft launched another version of DTS with more powerful features.
This is named as SSIS. SSIS is more powerful than DTS and its user friendly. SSIS has wide range
of new features added to it. SSIS is part of SQL SERVER Business Intelligence Studio.
Following Services are part of SQL SERVER Business Intelligence Studio.:
Control Flow: Work flow or Process flow in SSIS is known as Control flow. Control flow
consists if one of more tasks that will be executed when SSIS package runs.
Data Flow: Data Flow in SSIS defines/indicates how data should flow from one data
source to other destination. It holds information about data source, data destination and data
transformation.
Even Handlers: Event handlers are the tasks that are executed when some event occurs
during SSIS package execution. Ex: If some error occurs during SSIS package execution, then
event handler can be programmed to run to ignore that error and continue to the next step.
Package Explorer: Package Explorer contains complete information about the Variables,
Precedence constrains, Event handlers, Connection Managers, Log providers, Executable.
Precedence Constraints: Precedence Constraints links various tasks in SSIS. In simple
words it is the arrow marks that connect 2 difference tasks in SSIS. Based on the direction of
Precedent Constraints tasks will be executed in order. In other words Precedence constraints are
needed for ordering / organizing the control flow in SSIS.
Connection Managers: Connection Managers contain information that is needed to
connect to various data sources and to data destinations.
Toolbox: Toolbox contains is collection of Control Flow items, Maintenance plan Tasks,
Data Flow Sources, Data Flow Destinations and Data Flow Transformations. In simple words
Toolbox in SSIS contains different tasks/ containers. Task is nothing but a work unit to perform
certain job/work/action.
Variables: Variables parameters store information that can be used by Containers/tasks
in SSIS during the SSIS package execution.
Advantages of SSIS:
SSIS has a very user friendly Graphical User Interface (GUI) through which difficult tasks
can also be done with very much ease.
We can perform different types of tasks (like loading data, extracting data, renaming file,
sending mails, sending files through FTP , Data mining and lot more) in a single SSIS package
without any manual intervention.
SSIS package can be scheduled to run at a given time as per the business needs.
SSIS can be used to connect to different data sources (like flat file, MS Access, Excel, SQLS
ERVER, SYBASE, MYSQL, ORACLE etc.,). In simple words using SSIS we can connect to almost all
the external data sources.
Deploying SSIS package is very easy.
Go to Start --> All Programs --> Microsoft SQL Server 2005 --> SQL Server Business
Intelligence Development Studio.
Click on SQL Server Business Intelligence Development Studio. Following Screen will be
displayed.
Select Business Intelligence Studio from the left side list and Select Integration Services
Project. Then, Provide the Name for your SSIS Package. Here I gave name as Load Data_SSIS_1.
Then, click on OK.
When you click on SSIS Import and Export Wizard , following screen will appear:
Select
Select the Spread Sheet Name from the Source and tables from Destination.
Click on Edit Mappings . Map source and destination fields. Then, click on Ok
Now, the SSIS package is ready. This SSIS Package can be executed by clicking on Start
Debugging icon or by pressing F5.
Before Executing this package, let me show you the data in STUDENTS table in
database (SQL SERVER).
STUDENTS Table dont have any information.
Now, Execute the SSIS package by Pressing F5. All executables in the Control Flow of
SSIS package are turned to Green Color. Which indicates SSIS Package is executed successfully.
Now, lets check the data in STUDENTS Table after SSIS package execution.
Go to Start All Programs Microsoft SQL Server 2005 SQL Server Business Intelligence Development
Studio.
Click on SQL Server Business Intelligence Development Studio. Following Screen will be displayed.
Select Business Intelligence Studio from the left side list and Select Integration Services
Project. Then, Provide the Name for your SSIS Package. Here I gave name as Extract_Data_SSIS.
Then, click on OK.
Welcome Screen for SSIS Import and Export Wizard will appear. Click on Next
Choose the appropriate data source from the drop down menu . Here in this example we
want to extract data from sql server table. So, Choose data source as Microsoft OLEDB Provider
for SQL Server. Connect to the required Server and Database as shown below. Then, Click on
Next
Choose the appropriate Destination. In this example, we want to extract data from sql
server table into a flat file. So, chose destination as Flat File Destination and provide the
destination path. Select the Column Names in the first data row Check box if you want to
display column names in the extract file. Then Click on Next.
Select the Source table Name. I am using STUDENTS table in this example. So, I have
selected STUDENTS table from the drop down tables list.
Also, Specify the Row Delimiter and Column Delimiters to be used in the extract file.
For this example, I am using New Line {CR}{LF} as the row delimiter and Comma(,) as
the column delimiter.
By Clicking on the Preview button we can they see the data preview
Click on Next once your done with choosing table name and delimiters for the file. Click
on Finish to complete the SSIS Import and Export Wizard setup.
Once the Wizard setup is completed successfully, then following screen will appear. Click
on Close to go the SSIS report.
Now, SSIS package is created by the SSIS import and Export Wizard successfully with 1
data flow task in the control flow panel. Control flow and Data flow Screen shots for this SSIS
package are provided below.
Before running the SSIS package let's check the data in the flat file and data in Sql server
table STUDENTS.
Data n Flat File:
Flat file is empty.
Now, Execute the SSIS package by clicking on Start Debugging button or by pressing
F5.
SSIS Package is executed successfully. Lets check the data in the flat file now.
Data is extracted into the flat file. Columns are separated by Comma delimiter and rows
are separated by new line.
Similarly, we can extract data from any data source into any required destination.