steps to create ssis package · 2015. 3. 31. · steps to create ssis package the purpose of this...

Post on 15-Oct-2020

6 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

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.

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

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

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:

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)

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:

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

10. Specify an OLE DB Source connection

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]

Check the Mapping

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.

14. Enter Connection Type, SQLSourceType, SQL Statement

15. SAVE

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:

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.

top related