OLE DB Source in SSIS

The OLE DB Source in SSIS is used to extract data from a wide variety of databases that support OLE DB Connections. The SSIS OLE DB Source uses the OLE DB Connection Manager to connect with the Database Tables or Views.

Configuring OLE DB Source in SSIS

In this article, we show you how to set OLE DB Source in SSIS to extract data from SQL Server Database. To do so, please drag and drop the data flow task from the toolbox to the control flow. And change the name to Configuring OLE DB Source in SSIS.

OLE DB Source in SSIS 1

Double-click on it will open the data flow tab. Drag and drop OLE DB Source from the SSIS toolbox into the data flow region. For more information on data Loading >> Click Here.

OLE DB Source in SSIS 2

Double click on the OLE DB source in the data flow region will open the connection manager settings. If you haven’t created the OLE DB Connection Manager before, click on the New button and configure it.

OLE DB Source in SSIS 3

In this example, we are selecting the already created Connection Manager. Please refer to the OLE DB Connection Manager article.

OLE DB Source in SSIS 4

Data Access Mode: This property of SSIS OLE DB Source provides four options for us:

  • Table Or View: If you select this option, It will display the list of available Tables present in the Database. And our job is to select the required tables from them.
  • SQL Command: If you select this option, We have to write our own SQL Command.
  • Table name Or View name variable: For this option, you must provide the variable name that holds the Table name or View name.
  • SQL Command from the variable: If you select this option, We have to provide the variable name that holds the Command.
OLE DB Source in SSIS 5

The SQL Command option provides the following options

  • SQL Command Text: If you are familiar with SQL Queries, write it in the empty space provided by this option.
  • Build Query: It will open a Query Designer to design the required query using the Graphical User interface. Please refer to the Query Builder article.
  • Parameters: If your query is parameterized (with ?), please assign the appropriate parameters using the dialog box.
  • Browse: Allow us to select the Query present in the file system.
  • Parse Query: This option checks whether the query was successfully parsed or not
OLE DB Source in SSIS 6

Here, we are selecting the Table or View option. Once you choose this option, the Name of the table or the View option displays the list of available Tables and Views present in the current connection manager.

OLE DB Source in SSIS 7

From the above screenshot, you can observe that we selected the SalesPerson table from the Adventure Works Database. Click on the preview button to see the data present in the table.

OLE DB Source in SSIS 8

Click on the columns tab to verify the columns. We can also remove the unwanted columns by unchecking them.

OLE DB Source in SSIS 9

Click ok to finish configuring OLE DB Source in SSIS.

OLE DB Source in SSIS 10