SSIS ADO.NET Destination

The SSIS ADO.NET destination is used to load data into database tables or views using the .Net provider. SSIS ADO.Net destination editor provides us the choice to select the existing table(s), and views, or you can create a new table. In this article, we will show you how to configure SSIS ADO.Net destination to load or store data into the SQL Server Database.

NOTE: The SSIS ADO.NET Destination uses ADO.NET Connection Manager to create a connection with relational databases. For more information on data Loading >> Click Here.

Configuring SSIS ADO.NET Destination

STEP 1: Drag and drop the data flow task from the toolbox to control flow and rename it to SSIS ADO.NET Destination.

SSIS ADO.NET Destination 1

Double click on it will open the data flow tab.

STEP 2: Drag and drop OLE DB Source and ADO.NET destination onto the data flow region. In this example, we will explain the ADO.NET destinations only. So, Please refer to the OLE DB Source article.

SSIS ADO.NET Destination 2

Before we start, Double click on the OLE DB source to see the table / SQL Command we used. From the screenshot below, you can see that we are using the [Dim Products] and [Fact Internet Sales] tables present in the Adventure Works DW database

SSIS OLE DB Destination 2

SQL Command we used in the above screenshot is:

USE AdventureWorksDW2014
GO
SELECT PROD.[EnglishProductName]
     ,PROD.[Color]
     ,[SalesOrderNumber]
     ,[UnitPrice]
     ,[ExtendedAmount]
     ,[ProductStandardCost]
     ,[TotalProductCost]
     ,[SalesAmount]
     ,[TaxAmt]
     ,[Freight]
FROM [FactInternetSales]
INNER JOIN
[DimProduct] AS PROD ON
  [FactInternetSales].[ProductKey] = PROD.[ProductKey]

STEP 3: Double-click on the SSIS ADO.NET Destination will open the ADO.NET Destination Editor to configure the target database. The below screenshot will show you the list of available options in the Connection Manager tab:

  • Connection Manager: Here, you have to select the existing ADO.NET Connection Manager (if any); otherwise, click on the new button to create one.
  • Use a table or View: Here, you have to select the existing table or view to store the data. Otherwise, click the New button to create a new destination table.
  • Use Bulk Insert when Possible: This option will allow the SQL Server integration service to use the bulk insert option when it is possible. It is always good practice to select this option (for better performance).
SSIS ADO.NET Destination 3

STEP 4: Here, we are selecting the connection manager that we created previously. If you haven’t created ADO.NET Connection Manger before, click on the New button and configure it.

SSIS ADO.NET Destination 4

STEP 5: If you click on the down arrow button beside the Use a table or View option, it will display the list of available Tables and Views present in the current connection manager.

SSIS ADO.NET Destination 5

For the time being, we are selecting the existing table Table called “SSIS ADO.NET Destination.” If you haven’t created the table before or you want to create a new table, click on the New button. It opens a new window to write your custom Query to Create New table.

SSIS ADO.NET Destination 6

Preview Button: This button will help you to see the already existing data in your target table.

STEP 6: Click on the Mappings tab to check whether the source columns are exactly mapped to the destination columns.

SSIS ADO.NET Destination 7

NOTE: If your input column names and destination column names are the same, the intelligence will automatically map. If there are any changes in the column names (any alias columns or any calculated columns), we have to map them manually.

STEP 7: Click OK to finish configuring the SSIS ADO.NET Destination package. Let us run the package. Next, see whether we transferred the data from OLE DB Source to ADO.NET Destination or not

SSIS ADO.NET Destination 8

Let us open the SQL Server to Preview the data. From the below screenshot, you can observe that we successfully loaded the incoming data into the table using SSIS ADO.NET Destination.

SSIS ADO.NET Destination 9

Comments are closed.