14
Steps to create SSIS Package The purpose of this tutorial is to provide detailed steps on how to create SSIS package. The package reads the data from price.xlsx excel source file and imports it to SQL server table SU_Homebrewr. The structure and data for the source file is given below: 1. Open business intelligence development studio. 2. Click on File-> New -> Project. 3. Click on Integration Services Project and give name and location for project. Then click OK.

Steps to create SSIS Package · 2015. 3. 31. · Steps to create SSIS Package The purpose of this tutorial is to provide detailed steps on how to create SSIS package. The package

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Steps to create SSIS Package · 2015. 3. 31. · Steps to create SSIS Package The purpose of this tutorial is to provide detailed steps on how to create SSIS package. The package

Steps to create SSIS Package

The purpose of this tutorial is to provide detailed steps on how to create SSIS package. The package reads the data from price.xlsx excel source file and imports it to SQL server table SU_Homebrewr. The structure and data for the source file is given below:

1. Open business intelligence development studio. 2. Click on File-> New -> Project. 3. Click on Integration Services Project and give name and location for project. Then click OK.

Page 2: Steps to create SSIS Package · 2015. 3. 31. · Steps to create SSIS Package The purpose of this tutorial is to provide detailed steps on how to create SSIS package. The package

4. The new project screen contains the following: a. Tool Box on left side bar b. Solution Explorer on upper right bar c. Property Window on lower right bar d. Control flow, data flow, event Handlers, Package Explorer in tab windows e. Connection Manager Window in the bottom

Drag into Control Flow in the middle the Data Flow Task from toolbox.

5. Then right click on Connection Managers to specify connections.

Per our exercise, we’re loading data from excel source to SQL table which is OLE DB Destination. For Excel Source data connection: We’re selecting Existing file -> Browse to location of the file-> OK

Page 3: Steps to create SSIS Package · 2015. 3. 31. · Steps to create SSIS Package The purpose of this tutorial is to provide detailed steps on how to create SSIS package. The package

6. Then right click on Connection Managers to specify connections

OLE DB Destination data connection: New-> Server name -> Select or enter a database name-> Test Connection-> OK

Page 4: Steps to create SSIS Package · 2015. 3. 31. · Steps to create SSIS Package The purpose of this tutorial is to provide detailed steps on how to create SSIS package. The package

7. Click on Data Flow tab and from three categories from Toolbox we will be using Excel Source from Data flow sources and OLE DB Destination from Data flow destinations. Here are descriptions what each of the toolbox categories are used for: a. Data flow sources - Source makes data from different external data sources available

to the other components in the data flow. b. Data flow transformations - Transformations can perform tasks such as updating,

summarizing, cleaning, merging, and distributing data. c. Data flow destinations - Destination writes the data from a data flow to a specific data

store, or creates an in-memory dataset.

8. Drag in Excel Source from Data flow sources and OLE DB Destination from Data flow destinations to Data Flow screen:

Page 5: Steps to create SSIS Package · 2015. 3. 31. · Steps to create SSIS Package The purpose of this tutorial is to provide detailed steps on how to create SSIS package. The package

To specify Excel Source connections double click on Excel Source and enter required data connection by clicking

->New (browse to the location of the file) ->Name of the Excel sheet (sheet name needs to be same as you assign here)

Page 6: Steps to create SSIS Package · 2015. 3. 31. · Steps to create SSIS Package The purpose of this tutorial is to provide detailed steps on how to create SSIS package. The package

Then Click on Preview to see if all the columns and names populating correctly:

Click on Columns under left bar to see source column names:

Page 7: Steps to create SSIS Package · 2015. 3. 31. · Steps to create SSIS Package The purpose of this tutorial is to provide detailed steps on how to create SSIS package. The package

9. Drag and connect Excel Source to OLE DB Destination by connecting green arrow from Excel Source to OLE DB Destination.

Page 8: Steps to create SSIS Package · 2015. 3. 31. · Steps to create SSIS Package The purpose of this tutorial is to provide detailed steps on how to create SSIS package. The package

10. Specify an OLE DB Source connection

Page 9: Steps to create SSIS Package · 2015. 3. 31. · Steps to create SSIS Package The purpose of this tutorial is to provide detailed steps on how to create SSIS package. The package

Test the connection

11. Go to View ->Properties window a-> AlwaysUseDefaultCodePage->select FALSE 12. New under Name of the table or the view->Instead CREATE TABLE [OLE DB Destination]

type in table name CREATE TABLE [SU_HOMEBREWR]

Page 10: Steps to create SSIS Package · 2015. 3. 31. · Steps to create SSIS Package The purpose of this tutorial is to provide detailed steps on how to create SSIS package. The package

Check the Mapping

Page 11: Steps to create SSIS Package · 2015. 3. 31. · Steps to create SSIS Package The purpose of this tutorial is to provide detailed steps on how to create SSIS package. The package

13. Go back to Control Flow tab and Drag in Execute SQL Task from Maintenance Plan Tasks assign SQL TRUNCATE function (truncate the table every time new source data comes in) and connect with Data Flow Task with green arrow.

Page 12: Steps to create SSIS Package · 2015. 3. 31. · Steps to create SSIS Package The purpose of this tutorial is to provide detailed steps on how to create SSIS package. The package

14. Enter Connection Type, SQLSourceType, SQL Statement

15. SAVE

Page 13: Steps to create SSIS Package · 2015. 3. 31. · Steps to create SSIS Package The purpose of this tutorial is to provide detailed steps on how to create SSIS package. The package

16. Saving the PK in the server

Go to the PK by clicking EDIT and SAVE the PK in server choosing 3rd SAVE AS option:

1. Write the server name to which you want to save the package 2. Click on flex field right by the package path and chose Maintenance Plans 3. Name the package PK_XXXXXXXX 4. Click on Protection level and pick Rely on server storage and roles for access control

Now the package is ready to be executed manually or via JOB as we saved in the server. Right click and open package to execute manually:

Page 14: Steps to create SSIS Package · 2015. 3. 31. · Steps to create SSIS Package The purpose of this tutorial is to provide detailed steps on how to create SSIS package. The package

If all components turn “GREEN”, it means package has run successfully, if there is any error, the component which has failed to execute will be shown in “RED” Color.